@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&display=swap");

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: #000;
  color: #f7f7f7;
  --success-green: #4bff7a;
  --debug-panel-width: clamp(710px, calc(52vw + 30px), 830px);
  --debug-panel-gap: 24px;
  --safe-env-top: env(safe-area-inset-top, 0px);
  --safe-env-right: env(safe-area-inset-right, 0px);
  --safe-env-bottom: env(safe-area-inset-bottom, 0px);
  --safe-env-left: env(safe-area-inset-left, 0px);
  --safe-area-top: var(--safe-env-top);
  --safe-area-right: var(--safe-env-right);
  --safe-area-bottom: var(--safe-env-bottom);
  --safe-area-left: var(--safe-env-left);
  overflow: hidden;
  overscroll-behavior: none;
  cursor: var(--player-cursor), auto;
  user-select: none;
  -webkit-user-select: none;
}

body[data-telegram="1"] {
  --safe-area-top: max(var(--safe-env-top), var(--tg-content-safe-area-inset-top, 50px));
  --safe-area-right: max(var(--safe-env-right), var(--tg-content-safe-area-inset-right, 0px));
  --safe-area-bottom: max(var(--safe-env-bottom), var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-area-left: max(var(--safe-env-left), var(--tg-content-safe-area-inset-left, 0px));
}

input,
textarea,
.join-input {
  user-select: text;
  -webkit-user-select: text;
}

#root {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

@font-face {
  font-family: "OmbudsmanStencil";
  src: url("/assets/OmbudsmanStencil.ttf?v=2026-06-17T09%3A25%3A53.000Z") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body[data-loading="true"] .app-header,
body[data-loading="true"] .stage,
body[data-loading="true"] .sound-toggle {
  opacity: 0;
  pointer-events: none;
}

body[data-phase="join"] .app-header,
body[data-phase="join"] .stage,
body[data-phase="join"] .center-hud,
body[data-phase="join"] .total-time,
body[data-phase="join"] .cursor-layer {
  opacity: 0;
  pointer-events: none;
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: calc(24px + var(--safe-area-top)) calc(32px + var(--safe-area-right))
    calc(24px + var(--safe-area-bottom)) calc(32px + var(--safe-area-left));
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 1000;
}

body[data-loading="true"] .loading-screen {
  opacity: 1;
  pointer-events: auto;
}

.loading-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  overflow: visible;
  padding-top: 2px;
  padding-bottom: 2px;
}

.loading-brand .brand-icon {
  border-left: none;
}

.loading-status {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9d9d9;
  width: 100%;
  position: relative;
}

body[data-intro="true"] .loading-status {
  opacity: 0;
  visibility: hidden;
}

.intro-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-area-top)) calc(32px + var(--safe-area-right))
    calc(24px + var(--safe-area-bottom)) calc(32px + var(--safe-area-left));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  text-align: center;
}

body[data-intro="true"] .intro-screen {
  opacity: 1;
  pointer-events: auto;
}

.intro-text {
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(22px, 4vw, 46px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
  max-width: 720px;
  color: #f7f7f7;
  position: relative;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3), 0 0 38px rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .intro-text {
    font-size: clamp(36px, 10vw, 78px);
    letter-spacing: 0.1em;
    white-space: normal;
    max-width: 92vw;
  }
}

.intro-text::before,
.intro-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

body[data-intro-glitch="true"] .intro-text {
  animation: introGlitchOut 0.55s steps(2) 1 forwards;
  filter: blur(0.4px);
}

body[data-intro-glitch="true"] .intro-text::before {
  opacity: 0.75;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-0.04em, -0.03em);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
  animation: introGlitchTop 0.55s steps(2) 1 forwards;
}

body[data-intro-glitch="true"] .intro-text::after {
  opacity: 0.75;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(0.05em, 0.04em);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.7);
  animation: introGlitchBottom 0.55s steps(2) 1 forwards;
}

.loading-line {
  display: flex;
  align-items: center;
  direction: ltr;
  unicode-bidi: isolate;
  transition: opacity 0.25s ease, color 0.25s ease, transform 0.25s ease;
  width: 100%;
  white-space: nowrap;
  opacity: 0.92;
}

.loading-line--active {
  color: #f2f2f2;
}

.loading-line--dim {
  color: #8a8a8a;
  opacity: 0.55;
}

.join-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: calc(32px + var(--safe-area-top)) calc(32px + var(--safe-area-right))
    calc(32px + var(--safe-area-bottom)) calc(32px + var(--safe-area-left));
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  text-align: left;
  overflow-y: auto;
}

body[data-phase="join"] .join-screen {
  opacity: 1;
  pointer-events: auto;
}

.join-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.join-screen[data-intro="true"] {
  pointer-events: auto;
}

.join-intro-target {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.join-intro-hitbox {
  position: absolute;
  inset: -20px -34px;
  z-index: 2;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.join-screen:not([data-intro="true"]) .join-reveal {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.join-brand.join-reveal {
  transition-delay: 0.08s;
}

.join-subtitle.join-reveal {
  transition-delay: 0.14s;
}

.join-actions.join-reveal {
  transition-delay: 0.2s;
}

.join-telegram.join-reveal {
  transition-delay: 0.26s;
}

.join-link.join-reveal {
  transition-delay: 0.32s;
}

.join-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(720px, 92vw);
  color: #f7f7f7;
  text-align: center;
}

.join-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  overflow: visible;
  padding-top: 2px;
  padding-bottom: 2px;
}

.join-brand .brand-icon {
  width: 34px;
  height: 34px;
}

.join-brand .brand-title {
  font-size: 34px;
}

.join-screen[data-step="main"] .join-card--create,
.join-screen[data-step="main"] .join-card--code,
.join-screen[data-step="main"] .join-card--training,
.join-screen[data-step="main"] .join-card--profile {
  display: none;
}

.join-screen[data-step="create"] .join-card--main,
.join-screen[data-step="create"] .join-card--code,
.join-screen[data-step="create"] .join-card--training,
.join-screen[data-step="create"] .join-card--profile {
  display: none;
}

.join-screen[data-step="code"] .join-card--main,
.join-screen[data-step="code"] .join-card--create,
.join-screen[data-step="code"] .join-card--training,
.join-screen[data-step="code"] .join-card--profile {
  display: none;
}

.join-screen[data-step="training"] .join-card--main,
.join-screen[data-step="training"] .join-card--create,
.join-screen[data-step="training"] .join-card--code,
.join-screen[data-step="training"] .join-card--profile {
  display: none;
}

.join-screen[data-step="profile"] .join-card--main,
.join-screen[data-step="profile"] .join-card--create,
.join-screen[data-step="profile"] .join-card--code,
.join-screen[data-step="profile"] .join-card--training {
  display: none;
}

.join-title {
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 47px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.join-title.intro-text {
  font-size: clamp(12px, 3.3vw, 46px);
  letter-spacing: clamp(0.04em, 0.9vw, 0.18em);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .join-title.intro-text {
    font-size: clamp(36px, 10vw, 78px);
    letter-spacing: 0.1em;
    white-space: normal;
  }
}

.join-subtitle {
  font-size: 21px;
  max-width: 560px;
  color: #a7afc0;
  line-height: 1.4;
  text-transform: uppercase;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.join-card--code .join-subtitle {
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.join-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: min(540px, 92vw);
}

.join-actions .join-button,
.join-actions .join-link {
  width: 100%;
  text-align: center;
}

.join-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #9ea8bb;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 14px;
}

.join-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.join-training-panel {
  width: min(980px, 96vw);
  padding: 4px 0;
  text-align: left;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

.join-card--training {
  width: min(1040px, 96vw);
  gap: 14px;
}

.join-card--training .join-subtitle {
  max-width: 880px;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 18px;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

.join-card--profile {
  width: min(1080px, 96vw);
  gap: 14px;
}

.join-card--profile .join-subtitle {
  max-width: 880px;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 18px;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

.join-profile-panel {
  width: min(1080px, 96vw);
}

.join-profile-frame {
  width: 100%;
  height: min(70vh, 760px);
  border: 1px solid rgba(140, 154, 179, 0.38);
  border-radius: 12px;
  background: rgba(10, 14, 22, 0.85);
}

.join-training__status {
  color: #a7afc0;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-transform: none;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

.join-training__status--error {
  color: #d67878;
}

.join-training__status--hint {
  color: #b7bfce;
  font-size: 14px;
  margin-bottom: 2px;
}

.join-training-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: min(540px, 92vw);
  margin: 0 auto;
}

.join-training-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  --training-accent: #f5c542;
  --training-accent-rgb: 245, 197, 66;
  --training-accent-light: #f8d574;
  --training-accent-dark: #d9a51f;
}

.join-training-group[data-direction="memory"] {
  --training-accent: #f5c542;
  --training-accent-rgb: 245, 197, 66;
  --training-accent-light: #f8d574;
  --training-accent-dark: #d9a51f;
}

.join-training-group[data-direction="concentration"] {
  --training-accent: #8bb7ff;
  --training-accent-rgb: 139, 183, 255;
  --training-accent-light: #a9caff;
  --training-accent-dark: #5a8fe6;
}

.join-training-group[data-direction="spatial"] {
  --training-accent: #ff7878;
  --training-accent-rgb: 255, 120, 120;
  --training-accent-light: #ff9a9a;
  --training-accent-dark: #d85656;
}

.join-training-group[data-direction="multitasking"] {
  --training-accent: #74e26a;
  --training-accent-rgb: 116, 226, 106;
  --training-accent-light: #8bea84;
  --training-accent-dark: #45b83d;
}

.join-training-group__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f0f2f7;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  cursor: var(--player-cursor), pointer;
}

.join-training-group__tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.join-training-task {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d8deea;
  font-size: 16px;
  letter-spacing: 0.01em;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  cursor: var(--player-cursor), pointer;
}

.join-training-task__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.crown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 0.625em;
  line-height: 1;
  flex: 0 0 auto;
}

.crown-icon__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.join-task-crown {
  color: #f5c542;
  font-size: 12px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(245, 197, 66, 0.45));
}

.join-training-task__lock {
  color: #f5c542;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.join-training-task.is-locked {
  color: #9ba5b8;
  cursor: default;
}

.join-training-group__title input[type="checkbox"],
.join-training-task input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  border-radius: 3px;
  border: 1px solid rgba(247, 247, 247, 0.9);
  background: #f7f7f7;
  box-shadow: inset 0 0 0 1px rgba(22, 26, 34, 0.45);
  position: relative;
  flex: 0 0 17px;
  cursor: var(--player-cursor), pointer;
}

.join-training-group__title input[type="checkbox"]::after,
.join-training-task input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 4px;
  height: 8px;
  border-right: 2px solid #f7f7f7;
  border-bottom: 2px solid #f7f7f7;
  transform: translate(-50%, -60%) rotate(45deg);
  opacity: 0;
}

.join-training-group__title input[type="checkbox"]:checked,
.join-training-task input[type="checkbox"]:checked {
  border-color: var(--training-accent);
  background: linear-gradient(
    180deg,
    var(--training-accent-light) 0%,
    var(--training-accent-dark) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 0 0 1px rgba(var(--training-accent-rgb), 0.38);
}

.join-training-group__title input[type="checkbox"]:checked::after,
.join-training-task input[type="checkbox"]:checked::after {
  opacity: 1;
}

.join-training-group__title input[type="checkbox"]:focus-visible,
.join-training-task input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(247, 247, 247, 0.92);
  outline-offset: 1px;
}

.join-training-group__title input[type="checkbox"]:disabled,
.join-training-task input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: default;
}

.join-telegram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.join-telegram__label {
  font-size: 12px;
  letter-spacing: 0.32em;
  color: rgba(190, 202, 222, 0.7);
  text-transform: uppercase;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.join-telegram__widget {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.join-telegram__widget--menu {
  width: 100%;
  display: flex;
  justify-content: center;
}

.telegram-login-widget {
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.telegram-login-widget.join-telegram__widget--menu {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  align-self: center;
}

.telegram-login-widget__button {
  width: auto;
  min-height: 50px;
  border-radius: 0;
  border: 1px solid #cf5b4a;
  background: linear-gradient(180deg, #c74a3a 0%, #8f1d14 100%);
  color: #f7f7f7;
  padding: 12px 26px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 21px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
}

.telegram-login-widget__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  pointer-events: none;
}

.telegram-login-widget[data-widget-ready="1"] .telegram-login-widget__overlay {
  position: static;
  inset: auto;
  pointer-events: auto;
}

.telegram-login-widget__overlay iframe {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  opacity: 1;
  border: 0;
  pointer-events: auto;
}

.telegram-login-widget[data-widget-ready="1"] .telegram-login-widget__button {
  display: none;
}

.join-telegram__status {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(166, 192, 255, 0.9);
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.join-telegram__status[data-status="error"] {
  color: rgba(255, 128, 128, 0.95);
}

.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-area-top)) calc(24px + var(--safe-area-right))
    calc(24px + var(--safe-area-bottom)) calc(24px + var(--safe-area-left));
  background: rgba(6, 9, 14, 0.78);
  backdrop-filter: blur(8px);
}

.intro-modal__card {
  width: min(92vw, 560px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 22, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.intro-modal__title {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 20px;
  font-weight: 600;
  color: #f7f7f7;
}

.intro-modal__text {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  color: #cdd5e5;
}

.intro-modal__button {
  align-self: center;
  border-radius: 8px;
  border: 1px solid #cf5b4a;
  background: linear-gradient(180deg, #c74a3a 0%, #8f1d14 100%);
  color: #f7f7f7;
  padding: 12px 30px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 18px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: var(--player-cursor), pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    filter 0.15s ease;
}

.join-button {
  border-radius: 6px;
  border: 1px solid #cf5b4a;
  background: linear-gradient(180deg, #c74a3a 0%, #8f1d14 100%);
  color: #f7f7f7;
  padding: 12px 26px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 21px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: var(--player-cursor), pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    filter 0.15s ease;
}

.intro-modal__button:hover,
.intro-modal__button:focus-visible,
.join-button:hover,
.join-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(219, 98, 83, 0.92);
  box-shadow:
    0 0 0 1px rgba(170, 40, 40, 0.22),
    0 12px 24px rgba(0, 0, 0, 0.44);
  filter: brightness(1.02) saturate(1.03);
}

.intro-modal__button:active,
.join-button:active {
  transform: translateY(0);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.34);
}

.join-button:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
  transform: none;
  filter: none;
}

.buy-premium-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.buy-premium-label > span {
  letter-spacing: inherit;
}

.buy-premium-label__crown {
  width: 0.92em;
  min-width: 0.92em;
  height: 0.62em;
  color: #f5c542;
  transform: translateY(-0.04em);
  filter:
    drop-shadow(0 1px 0 rgba(255, 238, 182, 0.34))
    drop-shadow(0 0 4px rgba(0, 0, 0, 0.45));
}

.join-button--premium {
  border-color: rgba(245, 197, 66, 0.68);
  background: linear-gradient(180deg, #20252f 0%, #080b12 100%);
  color: #f8f9fd;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.join-button--profile {
  border-color: rgba(168, 176, 190, 0.72);
  background: linear-gradient(180deg, #565e6d 0%, #353b46 100%);
  color: #f1f4fb;
}

.join-button--premium:hover,
.join-button--premium:focus-visible {
  border-color: rgba(245, 197, 66, 0.92);
  background: linear-gradient(180deg, #2a313d 0%, #0c1019 100%);
}

.join-link {
  border: none;
  background: transparent;
  color: #cdd5e5;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: var(--player-cursor), pointer;
}

.join-link:disabled {
  opacity: 0.6;
  cursor: default;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  width: min(420px, 90vw);
}

.join-input {
  width: 100%;
  text-align: center;
  background: rgba(9, 12, 18, 0.9);
  border: 1px solid #3a3f4a;
  color: #f7f7f7;
  padding: 12px 16px;
  font-size: 22px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  outline: none;
}

.join-color-prefs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.join-color-prefs__label {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #a7afc0;
  text-transform: uppercase;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

.join-color-prefs__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.join-color-prefs__option {
  border-radius: 6px;
  border: 1px solid rgba(167, 176, 192, 0.6);
  background: rgba(10, 14, 22, 0.8);
  color: #d7ddeb;
  padding: 8px 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  cursor: var(--player-cursor), pointer;
}

.join-color-prefs__option.is-active {
  border-color: #cf5b4a;
  background: linear-gradient(180deg, #c74a3a 0%, #8f1d14 100%);
  color: #f7f7f7;
}

.join-color-prefs__option--yellow {
  border-color: rgba(245, 197, 66, 0.7);
}

.join-color-prefs__option--blue {
  border-color: rgba(75, 132, 255, 0.75);
}

.join-color-prefs__option--green {
  border-color: rgba(41, 161, 31, 0.75);
}

.join-color-prefs__option--red {
  border-color: rgba(220, 3, 3, 0.78);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(18px + var(--safe-area-top)) calc(28px + var(--safe-area-right)) 18px
    calc(28px + var(--safe-area-left));
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  position: relative;
  z-index: 9;
}

.header-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.header-channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9aa4b7;
  text-decoration: none;
  letter-spacing: 0.22em;
  font-size: 22px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.header-login {
  display: inline-flex;
  align-items: center;
  color: #9aa4b7;
  text-decoration: none;
  letter-spacing: 0.22em;
  font-size: 22px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.header-login--identity {
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 24px;
}

.header-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: #9aa4b7;
  text-decoration: none;
  letter-spacing: 0.22em;
  font-size: 22px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  padding: 0;
  cursor: var(--player-cursor), pointer;
}

.header-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: #9aa4b7;
  text-decoration: none;
  letter-spacing: 0.22em;
  font-size: 22px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  padding: 0;
  cursor: var(--player-cursor), pointer;
}

.premium-cta__text--header {
  color: #f6d56b;
  font-size: 14px;
  letter-spacing: 0.26em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.premium-cta__text--header:hover,
.premium-cta__text--header:focus-visible {
  color: #ffe7a8;
}

.header-channel:hover,
.header-channel:focus-visible {
  color: #f7f7f7;
}

.header-login:hover,
.header-login:focus-visible {
  color: #f7f7f7;
}

.header-logout:hover,
.header-logout:focus-visible {
  color: #f7f7f7;
}

.header-menu:hover,
.header-menu:focus-visible {
  color: #f7f7f7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: var(--player-cursor), pointer;
  overflow: visible;
  padding-top: 2px;
  padding-bottom: 2px;
}

.brand--alpha {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
}

.brand--alpha .brand-icon {
  grid-row: 1 / span 2;
  align-self: flex-start;
  margin-top: 1px;
}

.brand--alpha .brand-alpha-exit {
  grid-column: 2;
  justify-self: start;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.brand-icon {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  position: relative;
  overflow: visible;
}

.brand-icon.glitch {
  animation: logoTextGlitch var(--logo-glitch-duration, 0.75s) steps(2) 1;
  filter: drop-shadow(0.05em 0 0 #00fffc)
    drop-shadow(-0.03em -0.04em 0 #fc00ff)
    drop-shadow(0.025em 0.04em 0 #fffc00);
  will-change: transform, filter;
}

.brand-dot {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #f7f7f7;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.brand-dot[data-color="yellow"] {
  background: #f5c542;
}

.brand-dot[data-color="blue"] {
  background: #4b84ff;
}

.brand-dot[data-color="red"] {
  background: #dc0303;
}

.brand-dot[data-color="green"] {
  background: #29a11f;
}

.brand-icon--status .brand-dot {
  background: #6e7686;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
}

.brand-icon--status[data-active-color="yellow"] .brand-dot[data-color="yellow"] {
  background: #f5c542;
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.85);
}

.brand-icon--status[data-active-color="blue"] .brand-dot[data-color="blue"] {
  background: #4b84ff;
  box-shadow: 0 0 10px rgba(75, 132, 255, 0.85);
}

.brand-icon--status[data-active-color="red"] .brand-dot[data-color="red"] {
  background: #dc0303;
  box-shadow: 0 0 10px rgba(220, 3, 3, 0.85);
}

.brand-icon--status[data-active-color="green"] .brand-dot[data-color="green"] {
  background: #29a11f;
  box-shadow: 0 0 10px rgba(41, 161, 31, 0.85);
}

.brand-title {
  font-size: 14px;
  letter-spacing: 0.32em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  position: relative;
  display: inline-block;
  cursor: inherit;
  overflow: visible;
}

.brand-title__alpha {
  margin-left: 2px;
  font-size: 0.7em;
  letter-spacing: 0.08em;
  vertical-align: super;
  color: #9aa4b7;
  text-transform: none;
  font-family: "Noto Sans", "Noto Sans Symbols", "Segoe UI Symbol", "Apple Symbols",
    "DejaVu Sans", "Arial Unicode MS", sans-serif;
}

.brand-alpha-exit {
  border: none;
  background: transparent;
  color: #9aa4b7;
  font-size: 9px;
  letter-spacing: 0.22em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  text-transform: uppercase;
  cursor: var(--player-cursor), pointer;
  padding: 0;
}

.brand-alpha-exit:hover,
.brand-alpha-exit:focus-visible {
  color: #f7f7f7;
}

.brand-title::before,
.brand-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}

.brand-title.glitch {
  animation: logoTextGlitch var(--logo-glitch-duration, 0.75s) steps(2) 1;
  text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
    0.025em 0.04em 0 #fffc00;
}

.brand-title.glitch::before {
  opacity: 0.75;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-0.04em, -0.03em);
  animation: logoTextGlitchTop var(--logo-glitch-duration, 0.75s) steps(2) 1;
}

.brand-title.glitch::after {
  opacity: 0.75;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(0.04em, 0.03em);
  animation: logoTextGlitchBottom var(--logo-glitch-duration, 0.75s) steps(2) 1;
}

.subtitle {
  margin: 0;
  color: #9aa4b7;
  font-size: 11px;
  letter-spacing: 0.22em;
}

.status {
  position: relative;
  overflow: hidden;
  padding: 6px 12px;
  border-radius: 999px;
  background: radial-gradient(
    circle at center,
    rgba(60, 86, 140, 0.35) 0%,
    rgba(27, 31, 42, 0.95) 55%,
    rgba(16, 18, 24, 0.98) 100%
  );
  color: #9dd4ff;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  position: absolute;
  inset: -120%;
  background: radial-gradient(
    circle at center,
    rgba(157, 212, 255, 0.5) 0%,
    rgba(157, 212, 255, 0.18) 40%,
    rgba(157, 212, 255, 0) 70%
  );
  opacity: 0;
  transform: scale(0.85);
  animation: statusPulse 2.8s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

.connection-status {
  position: relative;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a8396;
}

.connection-status::before,
.connection-status::after {
  content: "";
  display: none;
}

.connection-status.online::before,
.connection-status.online::after {
  animation: none;
}

.connection-status.online::after {
  animation-delay: 0s;
}

.connection-status.offline::before,
.connection-status.offline::after {
  display: none;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.connection-status.online .connection-dot {
  box-shadow: 0 0 8px rgba(var(--accent-rgb, 122, 131, 150), 0.7);
}

.connection-status.offline .connection-dot {
  box-shadow: none;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 12px 24px;
  user-select: none;
  -webkit-user-select: none;
}

body[data-debug="1"] .stage {
  padding-left: 24px;
}


.stage-grid {
  position: relative;
  width: min(92vw, 1100px);
  height: min(74vh, 780px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  transition: opacity 0.25s ease;
}

.stage-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.stage-grid--single {
  width: min(96vw, 560px);
  height: min(72vh, 560px);
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

@media (min-width: 1600px) and (min-height: 900px) {
  .stage-grid {
    width: min(92vw, 1400px);
    height: min(80vh, 940px);
  }
}

body[data-debug="1"] .stage-grid {
  opacity: 0.75;
}

.stage-grid--hidden {
  opacity: 0;
  pointer-events: none;
}

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

body[data-super="1"] .cursor-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

.debug-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--debug-cols, 10), 1fr);
  grid-template-rows: repeat(var(--debug-rows, 10), 1fr);
  z-index: 5;
  pointer-events: none;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

.debug-grid__cell {
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2px;
  box-sizing: border-box;
}

.debug-grid__label {
  line-height: 1;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.debug-times {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  z-index: 5;
  pointer-events: none;
  font-family: "Menlo", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

.debug-time {
  padding: 6px 8px;
  align-self: flex-start;
  justify-self: flex-start;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  position: relative;
}

.debug-time__value {
  display: inline-block;
}

.debug-time__bonus {
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #5dff78;
  text-shadow: 0 0 8px rgba(93, 255, 120, 0.6);
  opacity: 0;
  animation: debugBonusFloat 2.6s ease-out forwards;
  pointer-events: none;
  white-space: nowrap;
}

.debug-time[data-col="1"] .debug-time__bonus {
  left: auto;
  right: 0;
  text-align: right;
}

.debug-time[data-row="0"][data-col="1"] {
  justify-self: flex-end;
  text-align: right;
}

.debug-time[data-row="1"][data-col="0"] {
  align-self: flex-end;
}

.debug-time[data-row="1"][data-col="1"] {
  align-self: flex-end;
  justify-self: flex-end;
  text-align: right;
}

.debug-time[data-color="yellow"] {
  color: #f5c542;
}

.debug-time[data-color="blue"] {
  color: #4b84ff;
}

.debug-time[data-color="red"] {
  color: #dc0303;
}

.debug-time[data-color="green"] {
  color: #29a11f;
}

@keyframes debugBonusFloat {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}

.remote-cursor {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
  color: inherit;
}

.remote-cursor[data-color="yellow"] {
  color: #f5c542;
}

.remote-cursor[data-color="blue"] {
  color: #4b84ff;
}

.remote-cursor[data-color="red"] {
  color: #dc0303;
}

.remote-cursor[data-color="green"] {
  color: #29a11f;
}

.remote-cursor svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

.cursor-debug {
  position: absolute;
  transform: translate(14px, 18px);
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Menlo", "Courier New", monospace;
  font-size: 10px;
  line-height: 1.2;
  color: var(--accent, rgba(255, 255, 255, 0.8));
  white-space: nowrap;
  pointer-events: none;
  z-index: 7;
}

.cursor-debug--self {
  font-weight: 600;
}

.stage-dividers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  --divider-gap: 66px;
}

.stage-divider {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform-origin: center;
}

.stage-divider.divider-vertical {
  width: 1px;
  left: 50%;
  transform: translateX(-0.5px);
}

body[data-super="1"] .stage-divider {
  opacity: 0;
  transform: scale(0.2);
}

.stage-divider.divider-horizontal {
  height: 1px;
  top: 50%;
  transform: translateY(-0.5px);
}


.stage-divider.divider-top {
  top: 0;
  height: calc(50% - var(--divider-gap));
}

.stage-divider.divider-bottom {
  bottom: 0;
  height: calc(50% - var(--divider-gap));
}

.stage-divider.divider-left {
  left: 0;
  width: calc(50% - var(--divider-gap));
}

.stage-divider.divider-right {
  right: 0;
  width: calc(50% - var(--divider-gap));
}

.success-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.success-indicator {
  position: absolute;
}

.success-indicator[data-color="yellow"] {
  top: 25%;
  left: 25%;
}

.success-indicator[data-color="blue"] {
  top: 25%;
  left: 75%;
}

.success-indicator[data-color="red"] {
  top: 75%;
  left: 25%;
}

.success-indicator[data-color="green"] {
  top: 75%;
  left: 75%;
}

.super-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  cursor: var(--player-cursor), auto;
}

.super-stage.active {
  opacity: 1;
  pointer-events: auto;
  animation: taskRevealGrid 0.45s steps(2) 1 var(--super-stage-delay, 0s);
  animation-fill-mode: both;
}

.super-stage.exit {
  animation: taskVanishGrid 0.45s steps(2) 1 forwards;
  pointer-events: none;
}

.super-title {
  position: absolute;
  top: calc(18px + var(--safe-area-top));
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 1100px);
  text-align: center;
  font-size: 30px;
  white-space: nowrap;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cdd5e5;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  line-height: 1.05;
  z-index: 2;
  pointer-events: none;
}

.super-title__short {
  display: none;
}

.super-field {
  position: absolute;
  inset: 0;
  cursor: var(--player-cursor), auto;
}

.super-timer-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}

.super-timer-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.super-timer-dots .dot.filled {
  background: #f7f7f7;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.super-circle {
  --super-circle-size: 56px;
  --super-hit-size: 74px;
  position: absolute;
  width: var(--super-hit-size);
  height: var(--super-hit-size);
  border: none;
  padding: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: var(--player-cursor), pointer;
  color: inherit;
  z-index: 1;
}

.super-circle.miss {
  animation: none;
}

.super-circle.miss .super-circle__stroke {
  stroke: #ff9940;
}

.super-circle.pending .super-circle__stroke {
  stroke: #9dd4ff;
  animation: superPendingPulse 0.95s ease-in-out infinite;
}

.super-circle.pending .super-circle__label {
  color: #dff1ff;
}

.super-circle.send-failed .super-circle__stroke {
  stroke: #ffb280;
  animation: superSendFailedPulse 0.5s steps(2) infinite;
}

.super-circle.send-failed .super-circle__label {
  color: #ffd8c4;
}

.super-circle__ring {
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  width: var(--super-circle-size);
  height: var(--super-circle-size);
  transform: translate(-50%, -50%) rotate(-90deg);
  pointer-events: none;
}

.super-circle__stroke {
  stroke-linecap: round;
}

.super-circle__label {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2ch;
  z-index: 1;
  color: #f7f7f7;
  font-size: 25px;
  font-family: "OmbudsmanStencil", "Menlo", "Courier New", monospace;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.super-circle.removing .super-circle__stroke {
  animation: superBorderErase 0.65s linear forwards;
}

.super-circle.removing .super-circle__label {
  animation: superCircleFade 0.15s linear forwards;
  animation-delay: 0.65s;
}

.quadrant {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  --task-label-clearance: clamp(56px, 8.5vmin, 92px);
  --task-footer-clearance: clamp(28px, 6vmin, 48px);
}

.quadrant.all-out-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 92, 92, 0.55),
    rgba(255, 92, 92, 0)
  );
  opacity: 0;
  transform: scale(0.92);
  animation: allOutFlash 0.32s ease-out;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}

.quadrant.offline::before {
  content: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(210, 106, 106, 0.2),
    rgba(210, 106, 106, 0) 72%
  );
  pointer-events: none;
  z-index: 2;
}

.quadrant-offline {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 4;
}

.quadrant-offline::before {
  content: none;
  position: absolute;
  width: min(92%, 420px);
  height: 86px;
  border-radius: 10px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(183, 81, 81, 0.28) 0%, rgba(39, 19, 19, 0.08) 62%, rgba(0, 0, 0, 0) 100%),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      rgba(255, 255, 255, 0) 1px,
      rgba(255, 255, 255, 0) 3px
    );
  box-shadow: 0 0 22px rgba(210, 88, 88, 0.24);
}

.quadrant-offline__label {
  position: relative;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(18px, 2.7vw, 30px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffd8d8;
  text-shadow:
    0 0 10px rgba(255, 106, 106, 0.35),
    0 0 28px rgba(255, 76, 76, 0.2);
}

.quadrant-offline__label::before,
.quadrant-offline__label::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.quadrant-offline__label::before {
  color: rgba(255, 188, 188, 0.62);
  transform: translate(-0.03em, -0.01em);
  animation: connectionLostGlitchTop 2.8s steps(2) infinite;
}

.quadrant-offline__label::after {
  color: rgba(255, 114, 114, 0.7);
  transform: translate(0.03em, 0.02em);
  animation: connectionLostGlitchBottom 2.8s steps(2) infinite;
}



.slot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

body[data-flex-gap="0"] .slot {
  gap: 0;
}

body[data-flex-gap="0"] .slot > * + * {
  margin-top: 12px;
}

.slot-sound-alert {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  max-width: min(240px, 86%);
  border-radius: 14px;
  border: 1px solid rgba(255, 86, 86, 0.95);
  background: linear-gradient(180deg, rgba(40, 0, 0, 0.92), rgba(20, 0, 0, 0.82));
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 0 18px rgba(255, 65, 65, 0.18);
  color: #ffe8e8;
  font-family: "Avenir Next", "Inter", "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-transform: none;
  pointer-events: none;
  animation: soundAlertSlide 0.42s ease-out;
}

/* Desktop should never show this helper; mobile query re-enables it. */
.stage-grid--self .slot .slot-sound-alert {
  display: none;
}

.slot-sound-alert__title {
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffb4b4;
}

.slot-sound-alert__body {
  font-size: 12px;
  color: #ffecec;
  text-align: center;
}

@keyframes soundAlertSlide {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.result-flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.7);
  --glitch-scale: 0.7;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at center, rgba(var(--flash-color), 0.55), rgba(var(--flash-color), 0));
  filter: blur(6px);
  mix-blend-mode: screen;
}

.success-indicator {
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  color: currentColor;
  opacity: 0;
  pointer-events: none;
  --arrow-offset-x: 0px;
  --arrow-offset-y: 0px;
  --arrow-rotate: 0deg;
}

.success-indicator .plus {
  width: 28px;
  height: 28px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.success-indicator .plus::before,
.success-indicator .plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 5px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  border-radius: 4px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}

.success-indicator .plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.success-indicator .arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translate(-50%, -50%) rotate(var(--arrow-rotate));
  opacity: 0;
}

.success-indicator.dir-right {
  --arrow-rotate: 0deg;
}

.success-indicator.dir-left {
  --arrow-rotate: 180deg;
}

.success-indicator.dir-up {
  --arrow-rotate: -90deg;
}

.success-indicator.dir-down {
  --arrow-rotate: 90deg;
}

.success-indicator.active {
  animation: indicatorPulse 2.5s ease-out;
}

.success-indicator.active .plus {
  animation: plusFade 2.5s ease-out;
}

.success-indicator.active .arrow {
  animation: arrowFly 2.5s ease-out;
}

.result-flash.success {
  --flash-color: 80, 255, 140;
  background: radial-gradient(
    circle at var(--flash-origin, 50% 50%),
    rgba(var(--flash-color), 0.45) 0%,
    rgba(var(--flash-color), 0.2) 35%,
    rgba(var(--flash-color), 0) 60%
  );
  animation: flashPulse 1.2s ease-out;
}

.result-flash.fail {
  --flash-color: 255, 92, 92;
  background: radial-gradient(
    circle at var(--flash-origin, 50% 50%),
    rgba(var(--flash-color), 0.45) 0%,
    rgba(var(--flash-color), 0.2) 35%,
    rgba(var(--flash-color), 0) 60%
  );
  animation: flashPulse 1.2s ease-out;
}

.slot .check {
  width: 72px;
  height: 56px;
  display: grid;
  place-items: center;
  color: currentColor;
  position: relative;
}

.slot .check svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}

.slot .check svg .check-stroke {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.slot .check svg .check-fill {
  opacity: 0;
}

.slot .check svg .check-reveal {
  transform: scaleX(0);
  transform-origin: left center;
  transform-box: fill-box;
}


.slot.filled .check {
  opacity: 1;
}

.slot.filled .check svg .check-stroke {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkDraw 0.7s ease-out forwards;
}

.slot.filled .check svg .check-fill {
  animation: checkFill 0.7s ease-out forwards;
}

.slot.filled .check svg .check-reveal {
  animation: checkReveal 0.7s ease-out forwards;
}

.slot.empty .check {
  opacity: 1;
}

.slot.empty .check svg {
  filter: none;
}

.slot.empty .check svg .check-stroke {
  fill: none;
  stroke: #919191;
  opacity: 0.65;
  stroke-width: 1.1;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  animation: none;
}

.slot.empty .check svg .check-fill {
  fill: none;
  opacity: 0;
  animation: none;
}

.slot.empty .check svg .check-reveal {
  transform: scaleX(0);
  animation: none;
}


body[data-phase="disconnected"] .stage-grid {
  opacity: 0;
  pointer-events: none;
}


.slot-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.slot-divider {
  width: 100%;
  max-width: 110px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.slot .label {
  font-size: 36px;
  color: #f7f7f7;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.slot .ip {
  font-size: 11px;
  color: #8d96a9;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.network-ping-bars {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 98, 98, 0.42);
  background: rgba(20, 7, 7, 0.56);
  box-shadow: 0 0 10px rgba(255, 66, 66, 0.2);
  pointer-events: none;
  z-index: 4;
}

.network-ping-bars__bar {
  width: 4px;
  border-radius: 2px 2px 0 0;
  background: rgba(255, 120, 120, 0.2);
}

.network-ping-bars__bar:nth-child(1) {
  height: 6px;
}

.network-ping-bars__bar:nth-child(2) {
  height: 10px;
}

.network-ping-bars__bar:nth-child(3) {
  height: 14px;
}

.network-ping-bars__bar--active {
  background: linear-gradient(180deg, #ff9f9f 0%, #ff3f3f 100%);
  box-shadow: 0 0 8px rgba(255, 70, 70, 0.65);
}

.premium-crown {
  display: none;
  width: 24px;
  height: 16px;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

body[data-phase="lobby"] .premium-crown,
body[data-phase="countdown"] .premium-crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.premium-crown--appear {
  animation: crownPop 0.55s ease-out both;
}

.premium-crown__icon {
  width: 100%;
  height: 100%;
}

.premium-crown__shine {
  opacity: 0;
  transform: translateX(-6px);
  transform-box: fill-box;
  transform-origin: center;
  animation: crownShimmer 6.5s ease-in-out infinite;
}

@keyframes crownShimmer {
  0%,
  62% {
    opacity: 0;
    transform: translateX(-6px);
  }
  70% {
    opacity: 0.8;
  }
  80% {
    opacity: 0;
    transform: translateX(6px);
  }
  100% {
    opacity: 0;
    transform: translateX(6px);
  }
}

@keyframes crownPop {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.4);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.12);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.center-hud {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
  z-index: 4;
  width: min(92vw, 1100px);
}

.center-readout {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 10px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  pointer-events: none;
  z-index: 4;
  text-align: center;
}

.team-code {
  color: #9aa4b7;
}

body[data-phase="lobby"] .team-code {
  cursor: pointer;
  pointer-events: auto;
}

.team-code__label {
  white-space: nowrap;
  position: relative;
  display: inline-block;
}

.team-code__label::before,
.team-code__label::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.team-code__label.glitch {
  animation: introGlitchOut 0.55s steps(2) 1;
  filter: blur(0.4px);
}

.team-code__label.glitch::before {
  opacity: 0.75;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-0.04em, -0.03em);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
  animation: introGlitchTop 0.55s steps(2) 1;
}

.team-code__label.glitch::after {
  opacity: 0.75;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(0.05em, 0.04em);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.7);
  animation: introGlitchBottom 0.55s steps(2) 1;
}

.team-code__value {
  font-size: 30px;
  letter-spacing: 0.12em;
  color: #f7f7f7;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

body[data-phase="round"] .team-code,
body[data-phase="countdown"] .team-code,
body[data-phase="results"] .team-code {
  opacity: 0;
}

.lobby-assist-modal {
  position: fixed;
  inset: 0;
  z-index: 21;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-area-top)) calc(24px + var(--safe-area-right))
    calc(24px + var(--safe-area-bottom)) calc(24px + var(--safe-area-left));
  background: rgba(6, 9, 14, 0.76);
  backdrop-filter: blur(6px);
}

.lobby-assist-modal__card {
  width: clamp(360px, 48vw, 760px);
  max-width: min(94vw, 760px);
  min-height: clamp(320px, 38vh, 470px);
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 22, 0.96);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
  padding: clamp(22px, 2.6vmin, 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.1vmin, 16px);
  text-align: center;
}

.lobby-assist-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 4px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(18px, 1.7vmin, 24px);
  line-height: 1;
  letter-spacing: 0.06em;
  cursor: var(--player-cursor), pointer;
  transition: opacity 0.15s ease;
}

.lobby-assist-modal__close:hover,
.lobby-assist-modal__close:focus-visible {
  opacity: 0.82;
}

.lobby-assist-modal__title {
  color: #f7f7f7;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(22px, 2.35vmin, 38px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.05;
}

.lobby-assist-modal__subtitle {
  color: #a9b4c8;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(11px, 1.1vmin, 16px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.25;
  max-width: 54ch;
}

.lobby-assist-modal__code-label {
  color: #8f9ab0;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(10px, 0.9vmin, 13px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.lobby-assist-modal__code {
  color: #f7f7f7;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(34px, 3.9vmin, 62px);
  letter-spacing: 0.14em;
  line-height: 0.95;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.lobby-assist-modal__status {
  color: #dfe6f7;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(12px, 1.15vmin, 17px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lobby-assist-modal__actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.2vmin, 16px);
  margin-top: clamp(8px, 1vmin, 14px);
}

.lobby-assist-modal__button {
  flex: 1 1 0;
  min-width: 0;
  min-height: clamp(48px, 5.4vmin, 66px);
  border-radius: 10px;
  border: 1px solid rgba(173, 184, 204, 0.44);
  background: rgba(10, 14, 22, 0.84);
  color: #dde6f8;
  padding: clamp(11px, 1.15vmin, 16px) clamp(14px, 1.4vmin, 22px);
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(12px, 1.2vmin, 18px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.05;
  cursor: var(--player-cursor), pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.lobby-assist-modal__button:hover,
.lobby-assist-modal__button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(219, 98, 83, 0.92);
  color: #f7f7f7;
  box-shadow:
    0 0 0 1px rgba(170, 40, 40, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.44);
  filter: brightness(1.02);
}

.lobby-assist-modal__button--share {
  border-color: rgba(53, 199, 120, 0.7);
  background: linear-gradient(180deg, rgba(24, 137, 77, 0.35), rgba(14, 80, 46, 0.42));
  color: #e7fff0;
}

.lobby-assist-modal__button--share:hover,
.lobby-assist-modal__button--share:focus-visible {
  border-color: rgba(53, 199, 120, 0.92);
  box-shadow:
    0 0 0 1px rgba(53, 199, 120, 0.32),
    0 12px 24px rgba(12, 72, 42, 0.44);
}

.lobby-assist-modal__button--bots {
  border-color: rgba(255, 92, 92, 0.65);
  background: linear-gradient(180deg, rgba(189, 25, 25, 0.24), rgba(89, 16, 16, 0.34));
  color: #ffe0e0;
}

.lobby-assist-modal__dismiss-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.lobby-assist-modal__dismiss {
  border: 0;
  background: transparent;
  color: rgba(187, 199, 223, 0.88);
  padding: 2px 4px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(11px, 1vmin, 14px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.1;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: var(--player-cursor), pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.lobby-assist-modal__dismiss:hover,
.lobby-assist-modal__dismiss:focus-visible {
  color: #f1f5ff;
}

.premium-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 10px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  pointer-events: auto;
}

.premium-cta__button {
  background: linear-gradient(135deg, rgba(246, 213, 107, 0.2), rgba(244, 182, 45, 0.6));
  border: 1px solid rgba(246, 213, 107, 0.6);
  color: #fff5cf;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.premium-cta__button:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 213, 107, 0.9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.premium-cta__button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(246, 213, 107, 0.9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.premium-cta__button:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.premium-cta__error {
  color: #f6b7b7;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.premium-cta--mobile {
  display: none;
  width: 100%;
  align-items: stretch;
}

.premium-modal {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-area-top)) calc(24px + var(--safe-area-right))
    calc(24px + var(--safe-area-bottom)) calc(24px + var(--safe-area-left));
  background: rgba(6, 9, 14, 0.82);
  backdrop-filter: blur(8px);
}

.premium-modal__card {
  width: min(92vw, 520px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 18, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.premium-modal__title {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 20px;
  font-weight: 600;
  color: #f7f7f7;
}

.premium-modal__text {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  color: #cdd5e5;
}

.premium-modal__price {
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 20px;
  letter-spacing: 0.18em;
  color: #f6d56b;
}

.premium-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}

.premium-modal__buy {
  border-radius: 8px;
  border: 1px solid rgba(245, 197, 66, 0.68);
  background: linear-gradient(180deg, #20252f 0%, #080b12 100%);
  color: #f8f9fd;
  padding: 12px 24px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: var(--player-cursor), pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.premium-modal__buy:hover,
.premium-modal__buy:focus-visible {
  border-color: rgba(245, 197, 66, 0.92);
  background: linear-gradient(180deg, #2a313d 0%, #0c1019 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.48);
}

.premium-modal__cancel {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #d5d9e6;
  padding: 12px 22px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: var(--player-cursor), pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    filter 0.15s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.premium-modal__cancel:hover,
.premium-modal__cancel:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(219, 98, 83, 0.86);
  background: rgba(255, 255, 255, 0.1);
  color: #f2f6ff;
  box-shadow:
    0 0 0 1px rgba(170, 40, 40, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.44);
  filter: brightness(1.02);
}

.premium-modal__buy:disabled,
.premium-modal__cancel:disabled {
  opacity: 0.55;
  cursor: progress;
}

.premium-modal__error {
  color: #f6b7b7;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .premium-cta--center {
    display: none;
  }
  .premium-cta--mobile {
    display: flex;
  }
  .premium-cta__button {
    width: 100%;
    font-size: 9px;
  }
  .premium-modal__actions {
    flex-direction: column;
  }
  .premium-modal__buy,
  .premium-modal__cancel {
    width: 100%;
  }
}

.center-hud .control-row {
  pointer-events: auto;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

button {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid #f6d04d;
  background: transparent;
  color: #f6d04d;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: var(--player-cursor), pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

button:disabled {
  opacity: 0.4;
  cursor: var(--player-cursor), not-allowed;
}

.super-circle.locked {
  opacity: 1;
}

.super-circle {
  touch-action: manipulation;
}

.mobile-hud {
  display: none;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.mobile-hud[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.mobile-hud__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.mobile-menu__button {
  border: 1px solid rgba(173, 184, 204, 0.48);
  background: rgba(10, 14, 22, 0.82);
  color: #d8e0ef;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: var(--player-cursor), pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.34);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    filter 0.15s ease;
}

.mobile-menu__button:hover,
.mobile-menu__button:focus-visible {
  border-color: rgba(219, 98, 83, 0.86);
  color: #f8fbff;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(170, 40, 40, 0.2),
    0 10px 20px rgba(0, 0, 0, 0.42);
  filter: brightness(1.02);
}

.mobile-team-code {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 9px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  color: #9aa4b7;
  cursor: default;
}

.mobile-team-code__value {
  font-size: 18px;
  letter-spacing: 0.12em;
  color: #f7f7f7;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.mobile-team-code__hint {
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: #cfd8ea;
  background: linear-gradient(120deg, rgba(167, 178, 196, 0.55), #f7f7f7, rgba(167, 178, 196, 0.55));
  background-size: 240% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: teamHintShimmer 1.8s ease-in-out 3;
}

.mobile-timer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.mobile-timer__label {
  font-size: 9px;
  color: #9aa4b7;
}

.mobile-timer__value {
  font-size: 26px;
  color: #f7f7f7;
}

.selection-count {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #9aa4b7;
  text-transform: uppercase;
}

.result {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9dd4ff;
  min-height: 16px;
}

.connection-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 26px;
  min-width: min(92vw, 540px);
  border: none;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  pointer-events: auto;
  overflow: hidden;
  animation: connectionBannerIn 320ms steps(2) 1;
}

.connection-banner::before {
  content: none;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      rgba(255, 255, 255, 0) 1px,
      rgba(255, 255, 255, 0) 3px
    );
  opacity: 0.3;
  pointer-events: none;
}

.connection-banner__label {
  position: relative;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: 0.22em;
  color: #f7f7f7;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.28),
    0 0 34px rgba(152, 176, 220, 0.14);
}

.connection-banner__label::before,
.connection-banner__label::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.connection-banner__label::before {
  color: rgba(176, 219, 255, 0.75);
  transform: translate(-0.03em, -0.01em);
  animation: connectionLostGlitchTop 2.8s steps(2) infinite;
}

.connection-banner__label::after {
  color: rgba(255, 156, 156, 0.72);
  transform: translate(0.03em, 0.02em);
  animation: connectionLostGlitchBottom 2.8s steps(2) infinite;
}

.connection-banner__meta {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: #b6c1d6;
}

.connection-banner__reconnect {
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #cf5b4a;
  background: linear-gradient(180deg, #c74a3a 0%, #8f1d14 100%);
  color: #f7f7f7;
  padding: 10px 26px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: var(--player-cursor), pointer;
  pointer-events: auto;
}

.connection-banner__reconnect:focus-visible {
  outline: 2px solid #f7f7f7;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .connection-banner {
    min-width: min(92vw, 420px);
    padding: 18px 18px;
  }

  .connection-banner__meta {
    font-size: 11px;
    letter-spacing: 0.2em;
  }
}

@keyframes connectionBannerIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes connectionLostGlitchTop {
  0%,
  88%,
  100% {
    opacity: 0;
  }
  89%,
  93% {
    opacity: 0.68;
  }
}

@keyframes connectionLostGlitchBottom {
  0%,
  88%,
  100% {
    opacity: 0;
  }
  90%,
  94% {
    opacity: 0.58;
  }
}

.results-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  background: rgba(5, 6, 10, 0.92);
  --results-delay: var(--results-panel-delay, 0.6s);
  --results-scale: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0;
}

.results-panel.active {
  pointer-events: auto;
  opacity: 1;
  animation: taskRevealGrid 0.45s steps(2) 1 var(--results-delay, 0.6s) both;
}

.results-panel.active .results-card > * {
  opacity: 0;
  animation: resultsGlitchIn 0.6s steps(2) forwards;
  animation-delay: calc(var(--results-delay, 0.6s) + 0.1s);
}

.results-panel.active .results-card > *:nth-child(2) {
  animation-delay: calc(var(--results-delay, 0.6s) + 0.25s);
}

.results-panel.active .results-card > *:nth-child(3) {
  animation-delay: calc(var(--results-delay, 0.6s) + 0.4s);
}

.results-panel.active .results-card > *:nth-child(4) {
  animation-delay: calc(var(--results-delay, 0.6s) + 0.55s);
}

body[data-safari="1"] .super-stage.active {
  animation: superStageFadeIn 0.25s ease-out var(--super-stage-delay, 0s) both;
}

body[data-safari="1"] .super-stage.exit {
  animation: superStageFadeOut 0.2s ease-in forwards;
}

body[data-safari="1"] .results-panel.active {
  animation: resultsPanelFadeIn 0.25s ease-out var(--results-delay, 0.6s) both;
}

body[data-safari="1"] .results-panel.active .results-card > * {
  animation: resultsItemFadeIn 0.25s ease-out forwards;
  animation-delay: calc(var(--results-delay, 0.6s) + 0.1s);
  filter: none;
  transform: none;
}

body[data-safari="1"] .results-panel.active .results-card > *:nth-child(2) {
  animation-delay: calc(var(--results-delay, 0.6s) + 0.25s);
}

body[data-safari="1"] .results-panel.active .results-card > *:nth-child(3) {
  animation-delay: calc(var(--results-delay, 0.6s) + 0.4s);
}

body[data-safari="1"] .results-panel.active .results-card > *:nth-child(4) {
  animation-delay: calc(var(--results-delay, 0.6s) + 0.55s);
}

body[data-safari="1"] .slot .check svg {
  filter: none;
}

.results-card {
  width: min(94vw, calc(1200px * var(--results-scale)));
  display: flex;
  flex-direction: column;
  gap: calc(28px * var(--results-scale));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f7f7f7;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  max-width: 100%;
  overflow: visible;
  padding: 0 10px 16px;
}

.results-panel--duel {
  background: rgba(5, 6, 10, 0.88);
}

.results-card--duel {
  width: min(98vw, 1480px);
  gap: 24px;
}

.results-title--duel {
  font-size: clamp(40px, 4.8vw, 74px);
  letter-spacing: 0.13em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.duel-results-summary {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 32px;
  color: #cfd6e4;
  letter-spacing: 0.14em;
}

.duel-results-summary__item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.duel-results-summary__label {
  font-size: clamp(20px, 2.4vw, 32px);
  color: #9aa4b7;
  letter-spacing: 0.08em;
}

.duel-results-summary__value {
  font-size: clamp(28px, 3.2vw, 44px);
  color: #f7f7f7;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.duel-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.duel-results-card {
  position: relative;
  padding: 14px 26px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.duel-results-card + .duel-results-card {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.duel-results-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: rgba(var(--accent-rgb, 245, 197, 66), 0.9);
  box-shadow: 0 0 12px rgba(var(--accent-rgb, 245, 197, 66), 0.3);
}

.duel-results-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.duel-results-card__name {
  font-size: clamp(24px, 2.8vw, 40px);
  color: #f7f7f7;
  letter-spacing: 0.08em;
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.duel-results-card__outcome {
  font-size: clamp(18px, 2.2vw, 30px);
  letter-spacing: 0.12em;
  color: #9aa4b7;
}

.duel-results-card[data-outcome="win"] .duel-results-card__outcome {
  color: #57db76;
}

.duel-results-card[data-outcome="lose"] .duel-results-card__outcome {
  color: #ff6e6e;
}

.duel-results-card__time {
  font-size: clamp(24px, 3.2vw, 38px);
  letter-spacing: 0.12em;
  color: #f7f7f7;
  line-height: 1;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.duel-results-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: clamp(17px, 1.8vw, 25px);
  letter-spacing: 0.06em;
  color: #8f99ad;
}

.duel-results-card__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.duel-results-card__category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: 0.08em;
  color: #aeb6c7;
  white-space: nowrap;
}

.duel-results-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.duel-results-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.duel-results-metric__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.duel-results-metric__label {
  font-size: clamp(24px, 2.7vw, 34px);
  letter-spacing: 0.06em;
  color: #8f99ad;
}

.duel-results-metric__value {
  font-size: clamp(30px, 3.2vw, 42px);
  letter-spacing: 0.12em;
  color: #f7f7f7;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.duel-results-metric__bar {
  position: relative;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.duel-results-metric__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(
    90deg,
    var(--accent-light, #ff8484) 0%,
    var(--accent, #ff4b4b) 100%
  );
  transition: width 1.4s ease;
}

.duel-results-metric__marker {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.65);
  transform: translateX(-1px);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.duel-results-card__hint {
  font-size: clamp(16px, 1.8vw, 24px);
  letter-spacing: 0.08em;
  color: #6f7a8f;
}

.results-card--squad-duel {
  width: min(94vw, 1080px);
  gap: 18px;
}

.results-title--squad-duel {
  font-size: clamp(30px, 3.8vw, 54px);
  letter-spacing: 0.14em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.squad-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.squad-results-team {
  position: relative;
  padding: 10px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.squad-results-team[data-team-side="left"] {
  --accent: #e38b2c;
  --accent-rgb: 227, 139, 44;
  --accent-light: #f6bb73;
}

.squad-results-team[data-team-side="right"] {
  --accent: #2bb9a9;
  --accent-rgb: 43, 185, 169;
  --accent-light: #78d8cc;
}

.squad-results-team + .squad-results-team {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.squad-results-team::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: rgba(var(--accent-rgb, 245, 197, 66), 0.9);
  box-shadow: 0 0 12px rgba(var(--accent-rgb, 245, 197, 66), 0.3);
}

.squad-results-team__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.squad-results-team__name {
  font-size: clamp(20px, 2.1vw, 30px);
  letter-spacing: 0.09em;
  color: #f7f7f7;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.squad-results-team__outcome {
  font-size: clamp(16px, 1.6vw, 22px);
  letter-spacing: 0.12em;
  color: #9aa4b7;
}

.squad-results-team[data-outcome="win"] .squad-results-team__outcome {
  color: #57db76;
}

.squad-results-team[data-outcome="lose"] .squad-results-team__outcome {
  color: #ff6e6e;
}

.squad-results-team__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: clamp(14px, 1.3vw, 19px);
  letter-spacing: 0.06em;
  color: #8f99ad;
}

.squad-results-team__metrics {
  margin-bottom: 2px;
}

.results-card--squad-duel .duel-results-metrics {
  gap: 8px;
}

.results-card--squad-duel .duel-results-metric__label {
  font-size: clamp(16px, 1.55vw, 22px);
}

.results-card--squad-duel .duel-results-metric__value {
  font-size: clamp(20px, 2vw, 28px);
}

.results-card--squad-duel .duel-results-metric__bar {
  height: 12px;
}

.squad-results-roster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.squad-results-player {
  position: relative;
  padding: 8px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.squad-results-player + .squad-results-player {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 8px;
}

.squad-results-player.self::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(var(--accent-rgb, 245, 197, 66), 0.78);
  box-shadow: 0 0 8px rgba(var(--accent-rgb, 245, 197, 66), 0.24);
}

.squad-results-player__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.squad-results-player__name {
  font-size: clamp(18px, 1.7vw, 25px);
  color: #e6ebf5;
  letter-spacing: 0.07em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.squad-results-player__time {
  font-size: clamp(20px, 2vw, 28px);
  color: #f7f7f7;
  letter-spacing: 0.12em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.results-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  letter-spacing: 0.32em;
  margin-bottom: 8px;
  overflow: visible;
  padding-top: 2px;
  padding-bottom: 2px;
}

.results-brand .brand-icon {
  width: 34px;
  height: 34px;
}

.results-brand .brand-title {
  font-size: 34px;
  letter-spacing: 0.32em;
}

.results-title {
  font-size: calc(96px * var(--results-scale));
  letter-spacing: 0.12em;
  text-align: center;
  max-width: 100%;
  word-break: break-word;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.results-subtitle {
  font-size: calc(28px * var(--results-scale));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9aa4b7;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.5;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  text-align: center;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: calc(48px * var(--results-scale));
  align-items: start;
}

.results-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.results-label {
  font-size: clamp(15px, calc(18px * var(--results-scale)), 24px);
  letter-spacing: 0.08em;
  color: #9aa4b7;
}

.results-time {
  font-size: clamp(24px, calc(32px * var(--results-scale)), 44px);
  letter-spacing: 0.14em;
  position: relative;
  padding-bottom: 10px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}


.results-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  --avg-line: 0.5;
  --track-width: calc(160px * var(--results-scale));
  --track-height: calc(275px * var(--results-scale));
}

.results-progress__dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.results-progress__dots .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}


.results-progress__track {
  width: var(--track-width);
  height: var(--track-height);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: flex-end;
  position: relative;
}

.results-progress__track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--avg-line) * 100%);
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.results-progress__fill {
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, #4bff7a, #1ea44b);
  transition: height 1.4s ease;
  position: relative;
  overflow: hidden;
}

.results-panel[data-time-result="below"] .results-progress__fill,
.results-progress__fill[data-time-result="below"] {
  background: linear-gradient(180deg, #ff6b6b 0%, #b31212 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.18) 0px,
      rgba(255, 255, 255, 0.18) 1px,
      rgba(255, 255, 255, 0) 2px,
      rgba(255, 255, 255, 0) 4px
    );
  box-shadow: 0 0 12px rgba(255, 88, 88, 0.6), 0 0 24px rgba(255, 88, 88, 0.25);
}

.results-panel[data-time-result="below"] .results-progress__fill::after,
.results-progress__fill[data-time-result="below"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 35%, rgba(0, 0, 0, 0.2));
  opacity: 0.6;
  mix-blend-mode: screen;
}

.results-progress__avg {
  font-size: clamp(16px, calc(24px * var(--results-scale)), 30px);
  color: #9aa4b7;
  letter-spacing: 0.06em;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.results-progress__marker {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--track-height);
  position: relative;
  top: calc((0.5 - var(--avg-line)) * var(--track-height));
}

.results-ability {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.results-ability-title {
  font-size: clamp(32px, calc(60px * var(--results-scale)), 72px);
  letter-spacing: 0.18em;
  position: relative;
  padding-bottom: 10px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.results-ability-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 220px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%);
}

.results-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.results-metric__label {
  font-size: clamp(20px, calc(39px * var(--results-scale)), 48px);
  color: #cdd5e5;
  letter-spacing: 0.06em;
}

.results-metric__bar {
  position: relative;
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.results-metric__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #ff4b4b, #c30d0d);
  transition: width 1.4s ease;
}

.results-metric__avg {
  position: absolute;
  top: -7px;
  width: 0;
  height: 24px;
  border-left: 2px solid rgba(255, 255, 255, 0.55);
  left: 50%;
}

.results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 16px;
}

.results-panel[data-viewer="true"] .results-footer {
  flex-direction: column;
  align-items: stretch;
}

.results-play {
  border: 1px solid #b21515;
  background: linear-gradient(180deg, #ff4d4d 0%, #b20f0f 100%);
  color: #fef6f6;
  padding: 12px 26px;
  font-size: clamp(14px, calc(16px * var(--results-scale)), 20px);
  letter-spacing: 0.2em;
  border-radius: 6px;
  text-transform: uppercase;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  cursor: var(--player-cursor), pointer;
}

.results-copy {
  border: 1px solid #6a707c;
  background: linear-gradient(180deg, #4a4f59 0%, #2a2f37 100%);
  color: #f7f7f7;
  padding: 12px 26px;
  font-size: clamp(14px, calc(16px * var(--results-scale)), 20px);
  letter-spacing: 0.2em;
  border-radius: 6px;
  text-transform: uppercase;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  cursor: var(--player-cursor), pointer;
}

.results-actions {
  display: flex;
  gap: 12px;
}

.results-actions button {
  border: 1px solid #6a707c;
  background: linear-gradient(180deg, #4a4f59 0%, #2a2f37 100%);
  color: #f7f7f7;
  padding: 12px 26px;
  font-size: clamp(14px, calc(16px * var(--results-scale)), 20px);
  letter-spacing: 0.2em;
  border-radius: 6px;
  text-transform: uppercase;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    filter 0.15s ease;
}

.results-actions button:hover,
.results-actions button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(219, 98, 83, 0.86);
  box-shadow:
    0 0 0 1px rgba(170, 40, 40, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.44);
  filter: brightness(1.02);
}

@media (min-width: 2560px) {
  .results-panel {
    --results-scale: 1.35;
  }
}

@media (min-width: 3840px) {
  .results-panel {
    --results-scale: 1.6;
  }
}

@media (min-width: 901px) and (max-height: 980px) {
  .results-panel {
    --results-scale: 0.9;
  }
}

@media (min-width: 901px) and (max-height: 880px) {
  .results-panel {
    --results-scale: 0.82;
  }
}

@media (min-width: 901px) and (max-height: 780px) {
  .results-panel {
    --results-scale: 0.74;
  }
}

.sound-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.sound-toggle__item,
.sound,
.simulation,
.fullscreen {
  padding: 10px 24px;
  font-size: 18px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8d96a9;
  cursor: var(--player-cursor), pointer;
  position: relative;
  z-index: 7;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sound-toggle__menu-link {
  text-decoration: none;
}

.sound.off,
.simulation.off,
.fullscreen.off {
  color: #556074;
}

[data-color="yellow"] {
  --accent: #f5c542;
  --accent-rgb: 245, 197, 66;
  --accent-light: #ffe38a;
  --accent-dark: #f2b51f;
  color: #f5c542;
  --flash-origin: 100% 100%;
}

[data-color="blue"] {
  --accent: #4b84ff;
  --accent-rgb: 75, 132, 255;
  --accent-light: #8bb7ff;
  --accent-dark: #2f64ff;
  color: #4b84ff;
  --flash-origin: 0% 100%;
}

[data-color="red"] {
  --accent: #dc0303;
  --accent-rgb: 220, 3, 3;
  --accent-light: #ff5a5a;
  --accent-dark: #dc0303;
  color: #dc0303;
  --flash-origin: 100% 0%;
}

[data-color="green"] {
  --accent: #29a11f;
  --accent-rgb: 41, 161, 31;
  --accent-light: #6adf60;
  --accent-dark: #29a11f;
  color: #29a11f;
  --flash-origin: 0% 0%;
}

@media (max-width: 900px) {
  .lobby-assist-modal {
    padding: calc(10px + var(--safe-area-top)) calc(14px + var(--safe-area-right))
      calc(14px + var(--safe-area-bottom)) calc(14px + var(--safe-area-left));
  }

  .lobby-assist-modal__card {
    width: min(96vw, 560px);
    min-height: min(72dvh, 640px);
    max-height: calc(100dvh - (24px + var(--safe-area-top) + var(--safe-area-bottom)));
    overflow-y: auto;
    padding: 24px 18px 20px;
    gap: 14px;
  }

  .lobby-assist-modal__close {
    top: 8px;
    right: 10px;
    font-size: clamp(20px, 5.4vw, 26px);
  }

  .lobby-assist-modal__title {
    font-size: clamp(28px, 7.2vw, 40px);
    letter-spacing: 0.16em;
  }

  .lobby-assist-modal__subtitle {
    font-size: clamp(14px, 3.9vw, 18px);
    line-height: 1.26;
  }

  .lobby-assist-modal__code-label {
    font-size: clamp(11px, 2.8vw, 14px);
  }

  .lobby-assist-modal__code {
    font-size: clamp(46px, 13.2vw, 76px);
  }

  .lobby-assist-modal__status {
    font-size: clamp(14px, 3.7vw, 20px);
  }

  .lobby-assist-modal__actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 2px;
  }

  .lobby-assist-modal__button {
    width: 100%;
    min-height: 62px;
    padding: 16px 18px;
    font-size: clamp(17px, 4.8vw, 22px);
    letter-spacing: 0.16em;
  }

  .lobby-assist-modal__dismiss {
    font-size: clamp(12px, 3.4vw, 16px);
    letter-spacing: 0.13em;
  }

  .sound-toggle {
    gap: 2px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .sound-toggle__item {
    white-space: nowrap;
    font-size: 11px;
    padding: 8px 6px;
    letter-spacing: 0.12em;
    line-height: 1;
    flex: 1 1 0;
    text-align: center;
  }

  .sound.sound-toggle__item {
    min-width: 0;
  }

  .simulation.sound-toggle__item {
    min-width: 0;
  }

  .fullscreen.sound-toggle__item {
    min-width: 0;
  }

  body[data-pseudo-fullscreen="1"],
  body[data-pseudo-fullscreen="1"] #root {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
  }

  body[data-pseudo-fullscreen="1"] .stage {
    padding: 4px max(8px, var(--safe-area-left), var(--safe-area-right)) 8px;
  }

  body[data-pseudo-fullscreen="1"] .stage-grid {
    width: 100vw;
    height: 100dvh;
  }
  body,
  #root {
    height: 100dvh;
    overflow: hidden;
  }

  .intro-modal {
    padding: calc(18px + var(--safe-area-top)) calc(18px + var(--safe-area-right))
      calc(18px + var(--safe-area-bottom)) calc(18px + var(--safe-area-left));
  }

  .intro-modal__card {
    width: min(94vw, 520px);
    padding: 22px 18px;
    gap: 12px;
  }

  .intro-modal__title {
    font-size: 17px;
    letter-spacing: 0.12em;
  }

  .intro-modal__text {
    font-size: 15px;
  }

  .intro-modal__button {
    font-size: 16px;
    padding: 10px 26px;
  }

  .stage-grid {
    width: min(96vw, 540px);
    height: min(70vh, 540px);
    height: min(70dvh, 540px);
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .stage {
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: center;
  }

  .center-hud {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
  }

  .stage-grid {
    grid-row: 1;
  }

  .center-hud {
    width: min(92vw, 540px);
  }

  body[data-phase="disconnected"] .center-hud {
    inset: 0;
    width: 100%;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app-header {
    padding: calc(12px + var(--safe-area-top)) calc(14px + var(--safe-area-right)) 12px
      calc(14px + var(--safe-area-left));
    gap: 12px;
  }

  .header-channel {
    display: none;
  }

  .brand {
    display: none;
  }

  .mobile-hud {
    display: flex;
    flex: 1;
    justify-content: space-between;
  }

  .mobile-hud__right {
    margin-right: 40px;
  }

  .mobile-timer__label {
    font-size: 12px;
  }

  .mobile-timer__value {
    font-size: 32px;
  }

  .mobile-team-code {
    font-size: 11px;
  }

  .mobile-team-code__value {
    font-size: 24px;
  }

  .sound-toggle {
    padding-bottom: calc(10px + var(--safe-area-bottom));
  }

  body[data-countdown="final"] .sound-toggle {
    display: none;
  }

  body[data-phase="round"] .sound-toggle {
    display: none;
  }

  body[data-phase="lobby"] .center-hud .team-code {
    display: none;
  }

  body[data-phase="lobby"] .stage-grid--self .slot,
  body[data-phase="countdown"] .stage-grid--self .slot,
  body[data-phase="round"] .stage-grid--self .slot {
    justify-content: center;
    gap: 0;
    padding-top: 0;
  }

  body[data-phase="lobby"] .stage-grid--self .slot .check,
  body[data-phase="countdown"] .stage-grid--self .slot .check,
  body[data-phase="round"] .stage-grid--self .slot .check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  body[data-phase="lobby"] .stage-grid--self .slot-info,
  body[data-phase="countdown"] .stage-grid--self .slot-info,
  body[data-phase="round"] .stage-grid--self .slot-info {
    position: absolute;
    top: calc(50% + 34px);
    left: 50%;
    transform: translateX(-50%);
  }

  body[data-phase="lobby"] .stage-grid--self .slot .check,
  body[data-phase="countdown"] .stage-grid--self .slot .check {
    width: 58px;
    height: 46px;
    flex: 0 0 auto;
  }

  body[data-phase="lobby"] .stage-grid--self .slot-info,
  body[data-phase="countdown"] .stage-grid--self .slot-info {
    gap: 4px;
  }

  body[data-phase="countdown"] .stage-grid--self .slot .slot-sound-alert {
    display: flex;
    position: absolute;
    left: 50%;
    top: calc(50% - 34px);
    transform: translate(-50%, -100%);
    z-index: 4;
    width: min(300px, calc(100% - 14px));
    max-width: none;
    margin: 0;
  }

  body[data-phase="lobby"] .stage-grid--self .slot .label {
    font-size: 30px;
    line-height: 1;
  }

  .super-circle {
    --super-circle-size: clamp(32px, 9vw, 42px);
    --super-hit-size: clamp(52px, 12vw, 62px);
  }

  .super-circle__stroke {
    stroke-width: 5px;
  }

  .super-circle__label {
    font-size: clamp(17px, 4.2vw, 18px);
  }

  .super-circle.locked {
    opacity: 1;
  }

  .super-title {
    font-size: 14px;
    max-width: 92vw;
    white-space: nowrap;
    line-height: 1.1;
    letter-spacing: 0.08em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .super-title__full {
    display: none;
  }

  .super-title__short {
    display: block;
  }

  .super-stage.active {
    animation: superRevealMobile 0.3s ease 1 both;
  }

  .super-stage.exit {
    animation: superVanishMobile 0.25s ease 1 forwards;
  }

  body[data-super="1"] .super-timer-dots {
    display: flex;
    left: 50%;
    right: auto;
    bottom: calc(6px + var(--safe-area-bottom));
    transform: translateX(-50%);
  }

  body[data-super="1"] .super-timer-dots .dot.filled {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.65),
      0 0 16px rgba(255, 255, 255, 0.35);
  }

  body[data-super="1"] .super-field {
    inset: 12% 6% 14% 6%;
  }

  .super-round-time {
    position: fixed;
    right: 16px;
    bottom: calc(10px + var(--safe-area-bottom));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
    pointer-events: none;
    z-index: 7;
  }

  .super-round-time__label {
    font-size: 9px;
    color: #9aa4b7;
  }

  .super-round-time__value {
    font-size: 20px;
    color: #f7f7f7;
  }

  .super-timer-dots {
    bottom: 14px;
    gap: 5px;
  }

  @keyframes superRevealMobile {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @keyframes superVanishMobile {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  .stage {
    padding: 8px max(12px, var(--safe-area-left), var(--safe-area-right)) 18px;
  }

  .stage-dividers {
    display: none;
  }

  .stage-grid--self .quadrant:not([data-self="true"]) {
    display: none;
  }

  .stage-grid--self .quadrant[data-self="true"] {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    padding: 14px;
  }

  .stage-grid--self .success-indicator:not([data-self="true"]) {
    display: none;
  }

  .stage-grid--self .success-indicator[data-self="true"] {
    top: 50% !important;
    left: 50% !important;
  }

  .total-time {
    display: none;
  }

  .results-panel {
    align-items: flex-start;
    padding: 20px 0 calc(20px + var(--safe-area-bottom));
  }

  body[data-results="1"] .results-panel.active {
    animation: resultsPanelRevealMobile 0.45s steps(2) 1 var(--results-delay, 0.6s) both;
  }

  body[data-results="1"] .results-panel.active .results-card > * {
    animation: resultsGlitchInMobile 0.6s steps(2) forwards;
    filter: none;
  }

  .results-card {
    gap: 18px;
    padding: 0 10px calc(16px + var(--safe-area-bottom));
  }

  .results-card--duel {
    width: min(98vw, 980px);
    gap: 16px;
  }

  .results-card--squad-duel {
    width: min(96vw, 900px);
  }

  .duel-results-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .squad-results-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .squad-results-team {
    padding: 14px 8px 8px;
    gap: 12px;
  }

  .squad-results-team + .squad-results-team {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 8px;
    padding-top: 14px;
  }

  .squad-results-team::before {
    left: 6px;
    right: 6px;
  }

  .squad-results-player {
    padding: 12px 0 8px;
  }

  .squad-results-player__name {
    font-size: clamp(18px, 5.2vw, 26px);
  }

  .squad-results-player__time {
    font-size: clamp(20px, 5.6vw, 30px);
  }

  .duel-results-card {
    padding: 14px 8px 8px;
    gap: 12px;
  }

  .duel-results-card + .duel-results-card {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 8px;
    padding-top: 14px;
  }

  .duel-results-card::before {
    left: 6px;
    right: 6px;
  }

  .duel-results-card__time {
    font-size: clamp(28px, 8vw, 40px);
  }

  .duel-results-metric__label {
    font-size: clamp(16px, 4.6vw, 24px);
  }

  .duel-results-metric__value {
    font-size: clamp(20px, 5.4vw, 30px);
  }

  .results-title--duel {
    font-size: clamp(28px, 8vw, 44px);
  }

  .results-title--squad-duel {
    font-size: clamp(26px, 7.4vw, 40px);
  }

  .duel-results-summary {
    gap: 10px 18px;
  }

  .duel-results-summary__label {
    font-size: clamp(14px, 4.2vw, 20px);
  }

  .duel-results-summary__value {
    font-size: clamp(18px, 5vw, 28px);
  }

  .duel-results-card__name {
    font-size: clamp(18px, 5.2vw, 28px);
  }

  .duel-results-card__outcome {
    font-size: clamp(14px, 4vw, 20px);
  }

  .duel-results-card__meta,
  .squad-results-team__meta {
    font-size: clamp(13px, 3.8vw, 20px);
  }

  .duel-results-card__category {
    font-size: clamp(10px, 3vw, 12px);
    padding: 2px 6px;
  }

  .squad-results-team__name {
    font-size: clamp(18px, 5.2vw, 28px);
  }

  .squad-results-team__outcome {
    font-size: clamp(14px, 4vw, 20px);
  }

  .duel-results-card__hint {
    font-size: clamp(12px, 3.4vw, 16px);
  }

  .results-title {
    font-size: 44px;
  }

  .results-brand {
    margin-top: 4px;
    margin-bottom: 8px;
  }

  .results-brand .brand-title {
    font-size: 34px;
    letter-spacing: 0.32em;
  }

  .results-subtitle {
    font-size: 16px;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .results-progress {
    --track-width: 120px;
    --track-height: 180px;
  }

  .results-ability-title {
    font-size: 34px;
  }

  .results-metric__label {
    font-size: 22px;
  }

  .results-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .results-actions {
    flex-direction: column;
  }
}

@keyframes flashPulse {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  35% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

@keyframes allOutFlash {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  35% {
    opacity: 0.75;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes statusPulse {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  35% {
    opacity: 0.8;
    transform: scale(1);
  }
  70% {
    opacity: 0.25;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

@keyframes introGlitchOut {
  0% {
    opacity: 1;
    transform: translate(0, 0);
    filter: blur(0);
  }
  35% {
    opacity: 1;
    transform: translate(-1px, 0);
    filter: blur(0.6px);
  }
  70% {
    opacity: 0.7;
    transform: translate(1px, -2px);
    filter: blur(1.6px);
  }
  100% {
    opacity: 0;
    transform: translate(0, 4px);
    filter: blur(3.5px);
  }
}

@keyframes introGlitchTop {
  0% {
    opacity: 0.5;
    transform: translate(-0.04em, -0.02em);
  }
  50% {
    opacity: 0.8;
    transform: translate(-0.1em, -0.04em);
  }
  100% {
    opacity: 0;
    transform: translate(-0.02em, 0.02em);
  }
}

@keyframes introGlitchBottom {
  0% {
    opacity: 0.5;
    transform: translate(0.04em, 0.04em);
  }
  50% {
    opacity: 0.8;
    transform: translate(0.1em, 0.06em);
  }
  100% {
    opacity: 0;
    transform: translate(0.02em, 0.08em);
  }
}

@keyframes checkDraw {
  0% {
    stroke-dashoffset: 100;
    opacity: 0.2;
  }
  60% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes checkFill {
  0% {
    opacity: 0;
  }
  45% {
    opacity: 0.9;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

@keyframes checkReveal {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes indicatorPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  85% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes arrowFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--arrow-rotate)) scale(0.75);
  }
  15% {
    opacity: 1;
  }
  60% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--arrow-offset-x)),
        calc(-50% + var(--arrow-offset-y))
      )
      rotate(var(--arrow-rotate))
      scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--arrow-offset-x)),
        calc(-50% + var(--arrow-offset-y))
      )
      rotate(var(--arrow-rotate))
      scale(1);
  }
}

@keyframes connectionRipple {
  0% {
    opacity: 0.65;
    transform: scale(0.4);
  }
  70% {
    opacity: 0.1;
    transform: scale(2.4);
  }
  100% {
    opacity: 0;
    transform: scale(2.8);
  }
}


@keyframes logoTextGlitch {
  0%,
  15% {
    text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
      0.025em 0.04em 0 #fffc00;
    transform: translate(0, 0);
    filter: none;
  }
  16%,
  49% {
    text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
      -0.05em -0.05em 0 #fffc00;
    transform: translate(-1px, -1px);
    filter: contrast(1.2);
  }
  50%,
  99% {
    text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
      0 -0.04em 0 #fffc00;
    transform: translate(1px, 1px);
    filter: brightness(1.1);
  }
  100% {
    text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff,
      -0.04em -0.025em 0 #fffc00;
    transform: translate(-1px, 0);
    filter: none;
  }
}

@keyframes logoTextGlitchTop {
  0% {
    transform: translate(-0.04em, -0.03em);
  }
  50% {
    transform: translate(-0.02em, 0.02em);
  }
  100% {
    transform: translate(-0.03em, -0.01em);
  }
}

@keyframes logoTextGlitchBottom {
  0% {
    transform: translate(0.04em, 0.03em);
  }
  50% {
    transform: translate(0.02em, -0.02em);
  }
  100% {
    transform: translate(0.03em, 0.02em);
  }
}

@keyframes plusFade {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  60% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
  }
}

@keyframes slotGlitchOut {
  0% {
    opacity: 1;
    transform: translateY(0);
    filter: none;
  }
  20% {
    opacity: 0.4;
    transform: translate(2px, -1px);
  }
  40% {
    opacity: 0.9;
    transform: translate(-2px, 1px);
  }
  60% {
    opacity: 0.2;
    transform: translate(3px, 0);
  }
  80% {
    opacity: 0.6;
    transform: translate(-1px, -2px);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px);
    filter: blur(2px);
  }
}

@keyframes teamHintShimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes slotFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes dotsGlitchIn {
  0% {
    opacity: 0;
    transform: translate(0, 4px);
    filter: blur(2px);
  }
  25% {
    opacity: 0.4;
    transform: translate(-1px, 0);
  }
  55% {
    opacity: 0.8;
    transform: translate(1px, -1px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
    filter: none;
  }
}

@keyframes superBorderErase {
  0% {
    stroke-dasharray: var(--circumference) var(--circumference);
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dasharray: 0 var(--circumference);
    stroke-dashoffset: var(--circumference);
    opacity: 0;
  }
}

@keyframes superCircleFade {
  to {
    opacity: 0;
  }
}

@keyframes superPendingPulse {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes superSendFailedPulse {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.45);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes resultsGlitchIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(2px) brightness(1.2);
  }
  40% {
    opacity: 0.6;
    transform: translate(-2px, 2px);
    filter: blur(1px) brightness(1.4);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
    filter: none;
  }
}

@keyframes taskRevealGridNoBlur {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  25% {
    opacity: 0.5;
    transform: translate(-1px, 1px);
  }
  55% {
    opacity: 0.85;
    transform: translate(1px, -1px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes superStageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes superStageFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes resultsPanelFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes resultsItemFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes resultsPanelRevealMobile {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  25% {
    opacity: 0.5;
    transform: translate(-1px, 1px);
  }
  55% {
    opacity: 0.85;
    transform: translate(1px, -1px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes resultsGlitchInMobile {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  40% {
    opacity: 0.6;
    transform: translate(-2px, 2px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.total-time {
  color: #f7f7f7;
  opacity: 0;
  pointer-events: none;
  gap: 0;
  min-height: 30px;
  height: 30px;
  justify-content: center;
}

.total-time.countdown-active {
  pointer-events: none;
}

.total-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
}

.total-time .total-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  font-size: 30px;
  letter-spacing: 0.12em;
  color: #f7f7f7;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
}

.total-time--single {
  top: clamp(84px, 18vh, 170px);
  transform: translateX(-50%);
  z-index: 8;
}

.total-time.visible {
  opacity: 1;
}

.countdown-skip {
  border: none;
  background: transparent;
  color: #9aa4b7;
  text-decoration: none;
  letter-spacing: 0.22em;
  font-size: 11px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  cursor: var(--player-cursor), pointer;
  padding: 0;
}

.countdown-skip--hitbox {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.countdown-skip--hitbox.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.countdown-skip:hover,
.countdown-skip:focus-visible {
  color: #f7f7f7;
}

.countdown-skip--mobile {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-align: right;
}

.debug-task-rail {
  position: fixed;
  left: 16px;
  top: 84px;
  bottom: 24px;
  width: 260px;
  z-index: 16;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 6, 10, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  pointer-events: auto;
}

.debug-task-rail__title {
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #cdd5e5;
}

.debug-task-rail__subtitle {
  font-family: "Menlo", "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(143, 255, 178, 0.8);
  text-transform: uppercase;
}

.debug-task-rail__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.debug-task-rail__list::-webkit-scrollbar {
  width: 6px;
}

.debug-task-rail__list::-webkit-scrollbar-track {
  background: transparent;
}

.debug-task-rail__list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.debug-task-rail__item {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 18, 28, 0.85);
  color: rgba(221, 231, 248, 0.82);
  font-family: "Menlo", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.35;
  padding: 8px 10px;
  cursor: var(--player-cursor), pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.debug-task-crown {
  color: #f5c542;
  font-size: 10px;
  filter: drop-shadow(0 0 4px rgba(245, 197, 66, 0.45));
}

.debug-task-rail__item:hover,
.debug-task-rail__item:focus-visible {
  border-color: rgba(125, 227, 144, 0.72);
  color: #f2fff5;
}

.debug-task-rail__item[data-active="true"] {
  background: linear-gradient(180deg, rgba(36, 117, 58, 0.98) 0%, rgba(26, 82, 42, 0.98) 100%);
  border-color: rgba(125, 227, 144, 0.9);
  color: #ffffff;
}

.debug-log-panel {
  position: fixed;
  left: 16px;
  top: 84px;
  bottom: 24px;
  width: var(--debug-panel-width);
  max-width: var(--debug-panel-width);
  z-index: 20;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 6, 10, 0.88);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.debug-log-panel--right {
  left: auto;
  right: 16px;
}

.debug-log__title {
  padding: 10px 12px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cdd5e5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-log__dock {
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 14, 22, 0.9);
  color: rgba(255, 255, 255, 0.8);
  font-size: 8px;
  letter-spacing: 0.2em;
  padding: 3px 8px;
  cursor: var(--player-cursor), pointer;
  text-transform: uppercase;
}

.debug-bots {
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.debug-bots__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-bots__title {
  flex: 1;
}

.debug-bots__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.debug-bots__label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.debug-bots__input {
  width: 52px;
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f7f7f7;
  font-size: 10px;
  font-family: "Menlo", "Courier New", monospace;
  padding: 4px 6px;
}

.debug-bots__toggle,
.debug-bots__apply {
  border-radius: 999px;
  border: 1px solid rgba(245, 208, 77, 0.6);
  background: transparent;
  color: #f5d04d;
  font-size: 8px;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  cursor: var(--player-cursor), pointer;
}

.debug-bots__toggle[data-active="true"] {
  color: #1dfb6b;
  border-color: rgba(29, 251, 107, 0.6);
}

.debug-round {
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.debug-round__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-round__title {
  flex: 1;
}

.debug-round__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.debug-round__label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.debug-round__hint {
  font-family: "Menlo", "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(173, 182, 196, 0.8);
}

.debug-round__select {
  width: 180px;
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f7f7f7;
  font-size: 10px;
  font-family: "Menlo", "Courier New", monospace;
  padding: 4px 6px;
}

.debug-round__apply,
.debug-round__super {
  border-radius: 999px;
  border: 1px solid rgba(120, 176, 255, 0.6);
  background: transparent;
  color: #78b0ff;
  font-size: 8px;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  cursor: var(--player-cursor), pointer;
}

.debug-round__apply:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.debug-round__super {
  border-color: rgba(255, 106, 106, 0.6);
  color: #ff6a6a;
}

.debug-filters {
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "OmbudsmanStencil", "Inter", "Segoe UI", sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.debug-filters__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-filters__title {
  flex: 1;
}

.debug-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.debug-filters__toggle,
.debug-filters__apply {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  letter-spacing: 0.18em;
  padding: 3px 8px;
  cursor: var(--player-cursor), pointer;
}

.debug-filters__toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.debug-filters__toggle[data-active="true"] {
  color: var(--log-color, #cdd5e5);
  border-color: var(--log-color, #cdd5e5);
}

.debug-filters__apply {
  border-color: rgba(120, 176, 255, 0.6);
  color: #78b0ff;
}

.debug-log__list {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  flex: 1;
  font-family: "Menlo", "Courier New", monospace;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.debug-log__footer {
  padding: 6px 10px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: "Menlo", "Courier New", monospace;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.55);
}

.debug-log__build {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.debug-log__build-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
}

.debug-log__build-value {
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

.debug-log__list::-webkit-scrollbar {
  width: 6px;
}

.debug-log__list::-webkit-scrollbar-track {
  background: transparent;
}

.debug-log__list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.debug-log__row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  word-break: break-word;
  border-left: 2px solid var(--log-color, rgba(255, 255, 255, 0.2));
  padding-left: 6px;
}

.debug-log__time {
  color: rgba(255, 255, 255, 0.45);
}

.debug-log__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.debug-log__tag {
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--log-color, #cdd5e5);
  white-space: nowrap;
}

.debug-log__direction {
  color: rgba(255, 255, 255, 0.45);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.debug-log__payload {
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.75);
}

.debug-log__row[data-category="cursor"],
.debug-filters__toggle[data-category="cursor"] {
  --log-color: #9dd4ff;
}

.debug-log__row[data-category="drag"],
.debug-filters__toggle[data-category="drag"] {
  --log-color: #f6d04d;
}

.debug-log__row[data-category="task"],
.debug-filters__toggle[data-category="task"] {
  --log-color: #7de390;
}

.debug-log__row[data-category="time"],
.debug-filters__toggle[data-category="time"] {
  --log-color: #ffb36b;
}

.debug-log__row[data-category="round"],
.debug-filters__toggle[data-category="round"] {
  --log-color: #ff6a6a;
}

.debug-log__row[data-category="super"],
.debug-filters__toggle[data-category="super"] {
  --log-color: #6ee7ff;
}

.debug-log__row[data-category="lobby"],
.debug-filters__toggle[data-category="lobby"] {
  --log-color: #8bb7ff;
}

.debug-log__row[data-category="match"],
.debug-filters__toggle[data-category="match"] {
  --log-color: #cdd5e5;
}

.debug-log__row[data-category="debug"],
.debug-filters__toggle[data-category="debug"] {
  --log-color: #ffb454;
}

.debug-log__row[data-category="system"],
.debug-filters__toggle[data-category="system"] {
  --log-color: #9aa4b7;
}

.debug-log__row[data-category="other"],
.debug-filters__toggle[data-category="other"] {
  --log-color: #c7cfdf;
}

.debug-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.super-field .debug-grid-overlay {
  z-index: 0;
}

@media (max-width: 900px) {
  .debug-task-rail {
    display: none;
  }

  .debug-log-panel {
    left: 12px;
    right: 12px;
    width: auto;
    top: auto;
    bottom: 12px;
    max-height: 40vh;
  }

  body[data-debug="1"] .stage {
    padding-left: 12px;
    padding-right: 12px;
  }

  body[data-debug="1"] .stage-grid {
    width: min(92vw, 1100px);
  }
}
