/* =========================================================================
   Морской бой — турниры
   Один CSS-файл без внешних зависимостей и шрифтов.
   ========================================================================= */

:root {
  --bg: #06121f;
  --bg-deep: #040d17;
  --bg-2: #081b2c;
  --panel: rgba(11, 32, 49, 0.78);
  --panel-solid: #0b2033;
  --panel-2: #0e2a42;
  --line: rgba(125, 180, 215, 0.16);
  --line-strong: rgba(125, 180, 215, 0.32);
  --text: #eaf4fb;
  --muted: #93aec2;
  --dim: #607e93;
  --teal: #2dd4bf;
  --cyan: #38bdf8;
  --blue: #3b82f6;
  --sand: #f2c879;
  --coral: #fb7185;
  --lime: #a3e635;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 28px 70px -30px rgba(0, 0, 0, 0.75);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(1100px 720px at 72% -12%, rgba(45, 212, 191, 0.13), transparent 62%),
    radial-gradient(900px 700px at -8% 28%, rgba(56, 189, 248, 0.1), transparent 60%),
    linear-gradient(180deg, #06121f 0%, #04101c 100%);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(125, 180, 215, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 180, 215, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 78%);
  opacity: 0.85;
}

body.has-modal {
  overflow: hidden;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgba(45, 212, 191, 0.28);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(4, 13, 23, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(125, 180, 215, 0.24);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 180, 215, 0.4);
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover {
  color: #7dd3fc;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
img,
svg {
  display: block;
  max-width: 100%;
}
ul,
ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 26px;
}

.muted {
  color: var(--muted);
}
.dim {
  color: var(--dim);
}
.text-gradient {
  background: linear-gradient(110deg, #f2c879 0%, #2dd4bf 45%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.icon {
  flex: 0 0 auto;
}
[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 13, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  flex: 0 0 auto;
}
.brand:hover {
  color: var(--text);
}
.brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #04121c;
  background: linear-gradient(145deg, #5eead4, #38bdf8);
  box-shadow: 0 10px 26px -10px rgba(45, 212, 191, 0.7);
}
.brand__mark--small {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__text strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand__text span {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}
.nav-link {
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s, background 0.18s;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(125, 180, 215, 0.08);
}
.nav-link.is-active {
  color: var(--text);
  background: rgba(45, 212, 191, 0.1);
}
.header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header__login {
  display: inline-flex;
}
.mobile-toggle {
  display: none;
  margin-left: auto;
}
.mobile-menu {
  display: none;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--text);
  background: var(--btn-bg);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease,
    border-color 0.16s ease, opacity 0.16s;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn--primary {
  color: #04121c;
  background: linear-gradient(135deg, #5eead4 0%, #38bdf8 100%);
  box-shadow: 0 14px 32px -16px rgba(45, 212, 191, 0.8);
}
.btn--primary:hover {
  color: #04121c;
  background: linear-gradient(135deg, #7ff0df 0%, #7dd3fc 100%);
  box-shadow: 0 18px 38px -16px rgba(45, 212, 191, 0.95);
}
.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(8, 27, 44, 0.4);
  color: var(--text);
}
.btn--ghost:hover {
  color: var(--text);
  border-color: rgba(125, 180, 215, 0.55);
  background: rgba(14, 42, 66, 0.65);
}
.btn--danger {
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: #1a050a;
}
.btn--danger:hover {
  color: #1a050a;
  background: linear-gradient(135deg, #fda4af, #fb7185);
}
.btn--danger-text {
  color: var(--coral);
}
.btn--danger-text:hover {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.08);
}
.btn--sm {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
}
.btn--lg {
  height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 15px;
}
.btn--block {
  width: 100%;
}
.btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.icon-btn:hover {
  color: var(--text);
  background: rgba(125, 180, 215, 0.1);
}
.icon-btn--danger:hover {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.1);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
}
.text-link:hover {
  color: #7dd3fc;
}
.text-link--danger {
  color: var(--coral);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.back-link:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ avatar */

.avatar {
  --avatar-hue: 190;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 25%,
    hsl(var(--avatar-hue) 70% 62% / 0.95),
    hsl(calc(var(--avatar-hue) + 35) 55% 34% / 0.95)
  );
  color: #04121c;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}
.avatar--md {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.avatar--sm {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.avatar--xs {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

/* --------------------------------------------------------------- user menu */

.user-menu {
  position: relative;
}
.user-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 27, 44, 0.45);
  color: var(--text);
  transition: border-color 0.18s, background 0.18s;
}
.user-toggle:hover {
  border-color: var(--line-strong);
  background: rgba(14, 42, 66, 0.7);
}
.user-toggle__nick {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.user-toggle__chev {
  color: var(--muted);
  transition: transform 0.18s;
}
.user-menu.is-open .user-toggle__chev {
  transform: rotate(180deg);
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 276px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #0a1e30;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
  z-index: 70;
}
.user-menu.is-open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.user-dropdown__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 12px;
}
.user-dropdown__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-dropdown__who strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-dropdown__who span {
  font-size: 11px;
  text-transform: lowercase;
}
.user-dropdown__sep {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}
.user-dropdown__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}
.user-dropdown__item span:first-child {
  color: var(--muted);
}
.user-dropdown__item:hover {
  background: rgba(125, 180, 215, 0.1);
  color: var(--text);
}
.user-dropdown__item--danger {
  color: var(--coral);
}
.user-dropdown__item--danger span:first-child {
  color: var(--coral);
}
.user-dropdown__item--danger:hover {
  background: rgba(251, 113, 133, 0.1);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 30px 0;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer__brand .brand__mark {
  color: #04121c;
}
.site-footer__dot {
  color: var(--dim);
}
.site-footer__links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}
.site-footer__links a {
  color: var(--muted);
}
.site-footer__links a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ layout */

.site-main {
  flex: 1 0 auto;
  padding: 34px 0 60px;
}
.section {
  margin-top: 64px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-head__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section-title {
  font-size: 28px;
  letter-spacing: -0.025em;
}
.section-subtitle {
  color: var(--muted);
  font-size: 14px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.page-head__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-title {
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: -0.035em;
}
.page-subtitle {
  color: var(--muted);
  font-size: 15px;
  max-width: 680px;
}
.page-head__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow__line {
  width: 22px;
  height: 1px;
  background: var(--teal);
  opacity: 0.7;
}
.card {
  position: relative;
  background: linear-gradient(155deg, rgba(14, 42, 66, 0.82), rgba(7, 24, 39, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.cards-grid {
  display: grid;
  gap: 16px;
}
.cards-grid--tournaments {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 27, 44, 0.5);
}
.stat-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
}
.stat-card--blue .stat-card__icon {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
}
.stat-card--sand .stat-card__icon {
  color: var(--sand);
  background: rgba(242, 200, 121, 0.1);
}
.stat-card--coral .stat-card__icon {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.1);
}
.stat-card__body {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.stat-card__body strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}
.stat-card__body span {
  color: var(--muted);
  font-size: 12px;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.meta-item__icon {
  color: var(--dim);
}
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 44px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(8, 27, 44, 0.35);
}
.empty-state-card__icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  margin-bottom: 4px;
}
.empty-state-card h3 {
  font-size: 19px;
}
.empty-state-card p {
  color: var(--muted);
  font-size: 14px;
  max-width: 430px;
}
.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 45vh;
  color: var(--muted);
  font-size: 14px;
}
.spinner {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid rgba(125, 180, 215, 0.25);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner--lg {
  width: 30px;
  height: 30px;
  border-width: 3px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.page-loading {
  min-height: 48vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}

/* ---------------------------------------------------------------- statuses */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge--open {
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  border-color: rgba(45, 212, 191, 0.22);
}
.status-badge--live {
  color: var(--sand);
  background: rgba(242, 200, 121, 0.08);
  border-color: rgba(242, 200, 121, 0.22);
}
.status-badge--done {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.22);
}
.status-badge--archived {
  color: var(--muted);
  background: rgba(125, 180, 215, 0.07);
  border-color: var(--line);
}
.match-status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  background: rgba(125, 180, 215, 0.08);
}
.match-status--playing {
  color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
}
.match-status--finished {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
}
.match-status--forfeit {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.1);
}
.match-status--ready,
.match-status--placing {
  color: var(--sand);
  background: rgba(242, 200, 121, 0.1);
}
.match-status--cancelled {
  color: var(--muted);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5);
  animation: pulse 2s infinite;
}
.pulse-dot--large {
  width: 9px;
  height: 9px;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.45);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(45, 212, 191, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  flex: 0 0 auto;
}
.online-dot.is-online {
  background: var(--teal);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.7);
}
.tiny-badge {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.code-inline {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sand);
}

/* ------------------------------------------------------------------ forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.field__hint {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.45;
}
.field__hint--bracket {
  color: var(--teal);
  margin-top: 2px;
}
.input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(4, 13, 23, 0.55);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  color-scheme: dark;
}
.input::placeholder {
  color: var(--dim);
}
.input:hover {
  border-color: rgba(125, 180, 215, 0.48);
}
.input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
  background: rgba(4, 13, 23, 0.8);
}
.input--select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.input--compact {
  height: 38px;
  width: auto;
  min-width: 170px;
}
.input--number {
  max-width: 150px;
}
.input--search {
  padding-left: 34px;
  height: 40px;
}
.input--readonly {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--sand);
}
.input--code {
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.input-wrap {
  position: relative;
  display: block;
}
.input-wrap .input {
  padding-right: 46px;
}
.input-reveal {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.input-reveal:hover {
  color: var(--text);
  background: rgba(125, 180, 215, 0.1);
}
.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(251, 113, 133, 0.34);
  border-radius: 9px;
  background: rgba(251, 113, 133, 0.09);
  color: #fecdd3;
  font-size: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  color: var(--text);
  cursor: pointer;
}
.check-field input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}
.check-field > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}
.check-field .muted {
  font-size: 10px;
  line-height: 1.4;
}

/* Телефон: страна + номер без внешних библиотек. */
.phone-field {
  position: relative;
}
.phone-field__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.phone-field__input {
  flex: 1 1 auto;
  min-width: 0;
}
.phone-country__button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  max-width: 190px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(4, 13, 23, 0.55);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.phone-country__button:hover,
.phone-country__button[aria-expanded="true"] {
  border-color: var(--teal);
}
.phone-country__flag {
  width: 20px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.phone-country__label {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.phone-country__code {
  color: var(--sand);
  font-family: var(--mono);
  font-size: 11px;
}
.phone-country__name {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-country__chev {
  display: inline-flex;
  color: var(--dim);
}
.phone-country__popover {
  position: absolute;
  z-index: 80;
  top: calc(100% - 18px);
  left: 0;
  width: min(340px, calc(100vw - 48px));
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.65);
}
.phone-country__search {
  height: 36px;
  font-size: 12px;
}
.phone-country__list {
  max-height: 250px;
  margin-top: 6px;
  overflow: auto;
}
.phone-country__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.phone-country__option:hover,
.phone-country__option.is-active {
  background: rgba(45, 212, 191, 0.1);
}
.phone-country__option-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-country__option-code {
  color: var(--sand);
  font-family: var(--mono);
  font-size: 10px;
}
.phone-country__empty {
  display: block;
  padding: 12px 8px;
  color: var(--dim);
  font-size: 12px;
}
html[data-theme="light"] .auth-quote p {
  color: var(--text);
}
html[data-theme="light"] .phone-country__button {
  background: #ffffff;
  border-color: var(--line-strong);
}
html[data-theme="light"] .phone-country__popover {
  background: #ffffff;
}
html[data-platform="mobile"] .phone-country__button {
  max-width: 150px;
}
html[data-platform="mobile"] .phone-country__popover {
  position: fixed;
  top: auto;
  right: 12px;
  bottom: 12px;
  left: 12px;
  width: auto;
  max-height: 70vh;
}
html[data-platform="mobile"] .phone-country__list {
  max-height: 46vh;
}
.form-inline-hint {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.14);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.input-with-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.chip {
  min-width: 38px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(8, 27, 44, 0.35);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.chip:hover,
.chip.is-active {
  color: var(--text);
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
}
.chip.is-active {
  color: var(--teal);
}

/* ----------------------------------------------------------------- landing */

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 50px;
  padding-top: 48px;
  padding-bottom: 38px;
  min-height: 620px;
}
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.hero__title {
  font-size: clamp(46px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.hero__lead {
  max-width: 590px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.68;
}
.hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.hero__stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 520px;
}
.hero__stats span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--muted);
  font-size: 11px;
}
.hero__stats strong {
  color: var(--text);
  font-size: 20px;
  letter-spacing: -0.03em;
}
.join-code-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.join-code {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(8, 27, 44, 0.55);
  transition: border-color 0.16s;
}
.join-code:focus-within {
  border-color: var(--teal);
}
.join-code__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  flex: 0 0 auto;
}
.join-code__input {
  border: 0;
  background: transparent;
  height: 38px;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  min-width: 0;
}
.join-code__input:focus {
  box-shadow: none;
  background: transparent;
}
.join-code__error {
  min-height: 16px;
  color: var(--coral);
  font-size: 11px;
}
.join-code__hint {
  font-size: 11px;
}
.hero-visual {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
}
.radar {
  position: relative;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(45, 212, 191, 0.16),
    rgba(6, 18, 31, 0.3) 58%,
    transparent 72%
  );
  border: 1px solid rgba(45, 212, 191, 0.28);
  box-shadow: inset 0 0 90px rgba(45, 212, 191, 0.09), 0 0 140px -40px rgba(45, 212, 191, 0.45);
}
.radar--large {
  width: 430px;
  height: 430px;
}
.radar--hero {
  animation: radar-in 1.1s ease both;
}
.radar__ring {
  position: absolute;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 50%;
}
.radar__ring--1 {
  inset: 18%;
}
.radar__ring--2 {
  inset: 36%;
}
.radar__ring--3 {
  inset: 54%;
}
.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 300deg, rgba(45, 212, 191, 0.2) 360deg);
  animation: sweep 5.5s linear infinite;
  mask-image: radial-gradient(circle, #000 0%, #000 70%, transparent 72%);
}
.radar__cross {
  position: absolute;
  background: rgba(45, 212, 191, 0.16);
}
.radar__cross--x {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}
.radar__cross--y {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}
.radar__blip {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.9);
  animation: blip 3.2s ease-in-out infinite;
}
.radar__blip--1 {
  top: 28%;
  left: 62%;
}
.radar__blip--2 {
  top: 64%;
  left: 32%;
  animation-delay: 0.8s;
  background: var(--sand);
  box-shadow: 0 0 12px rgba(242, 200, 121, 0.9);
}
.radar__blip--3 {
  top: 46%;
  left: 74%;
  animation-delay: 1.6s;
}
.radar__center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: rgba(4, 13, 23, 0.85);
  border: 1px solid rgba(45, 212, 191, 0.25);
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.18);
}
.float-card {
  position: absolute;
  padding: 15px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(9, 28, 45, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px -30px #000;
  animation: float 6s ease-in-out infinite;
}
.float-card--match {
  top: 7%;
  right: -4%;
  width: 250px;
}
.float-card--fleet {
  left: -5%;
  bottom: 10%;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation-delay: 1.2s;
}
.float-card__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.float-card__icon {
  color: var(--teal);
}
.float-card__players {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.float-card__vs {
  color: var(--dim);
  font-size: 10px;
}
.float-card__text {
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.float-card__bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(125, 180, 215, 0.12);
  overflow: hidden;
}
.float-card__bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
}
.float-card--fleet strong {
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.float-card--fleet .muted {
  font-size: 11px;
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}
@keyframes blip {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
@keyframes radar-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
}
.feature-strip__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  background: rgba(7, 24, 39, 0.96);
}
.feature-strip__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  flex: 0 0 auto;
}
.feature-strip__item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feature-strip__item strong {
  font-size: 13px;
}
.feature-strip__item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.step {
  position: relative;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 27, 44, 0.4);
}
.step__num {
  display: block;
  font-family: var(--mono);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 26px;
}
.step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: var(--radius-xl);
  background: radial-gradient(800px 300px at 20% 0%, rgba(45, 212, 191, 0.13), transparent 60%),
    linear-gradient(140deg, rgba(14, 42, 66, 0.9), rgba(7, 24, 39, 0.95));
}
.cta-panel__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cta-panel h2 {
  font-size: 32px;
}
.cta-panel__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------- t-cards */

.t-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(14, 42, 66, 0.62), rgba(7, 24, 39, 0.82));
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  min-height: 190px;
}
.t-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: 0 26px 50px -28px rgba(0, 0, 0, 0.9);
  color: var(--text);
}
.t-card.is-archived {
  opacity: 0.82;
}
.t-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.t-card__role {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.t-card__code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dim);
}
.t-card__name {
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.t-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.t-card__meta .meta-item {
  font-size: 11px;
}
.t-card__progress {
  height: 3px;
  border-radius: 3px;
  background: rgba(125, 180, 215, 0.12);
  overflow: hidden;
}
.t-card__progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  border-radius: 3px;
}
.t-card__my-match {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(242, 200, 121, 0.07);
  border: 1px solid rgba(242, 200, 121, 0.16);
  font-size: 11px;
  color: var(--sand);
}
.t-card__my-match .pulse-dot {
  background: var(--sand);
}
.t-card__my-opponent {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-card__winner {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sand);
}
.t-card__footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.t-card__arrow {
  color: var(--dim);
  transition: transform 0.18s, color 0.18s;
}
.t-card:hover .t-card__arrow {
  transform: translateX(3px);
  color: var(--teal);
}

/* -------------------------------------------------------------- dashboard */

.dashboard {
  padding-top: 8px;
}
.dashboard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 24px;
}
.dashboard__hello {
  display: flex;
  align-items: center;
  gap: 18px;
}
.dashboard__hello .page-title {
  font-size: clamp(30px, 4vw, 42px);
  margin-top: 2px;
}
.dashboard__hello .page-subtitle {
  margin-top: 5px;
}
.dashboard__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dashboard__join {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dashboard__join .input {
  width: 150px;
  height: 42px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.live-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 200, 121, 0.26);
  background: radial-gradient(600px 200px at 10% 0%, rgba(242, 200, 121, 0.12), transparent 70%),
    rgba(20, 33, 37, 0.72);
  color: var(--text);
  margin-bottom: 22px;
  transition: border-color 0.18s, transform 0.18s;
}
.live-banner:hover {
  color: var(--text);
  border-color: rgba(242, 200, 121, 0.45);
  transform: translateY(-2px);
}
.live-banner__mark {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 20px;
  border-right: 1px solid var(--line);
  flex: 0 0 auto;
}
.live-banner__label {
  color: var(--sand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.live-banner__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.live-banner__body strong {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-banner__body .muted {
  font-size: 12px;
}
.live-banner__cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.live-banner__cta .muted {
  font-size: 11px;
}
.live-banner--inside {
  margin-top: 16px;
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ auth */

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 54px;
  align-items: center;
  min-height: 640px;
  padding-top: 26px;
}
.auth-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  width: 100%;
  justify-self: end;
}
.auth-card {
  padding: 32px;
}
.auth-card__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.auth-title {
  font-size: 34px;
  letter-spacing: -0.04em;
}
.auth-subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.auth-form .btn {
  margin-top: 4px;
}
.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  font-size: 13px;
}
.auth-switch a {
  font-weight: 600;
}
.auth-next-note {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.14);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.auth-side-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0 6px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
}
.auth-side-note span:first-child {
  color: var(--teal);
  margin-top: 1px;
}
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  min-height: 580px;
  justify-content: center;
}
.auth-quote {
  position: relative;
  max-width: 360px;
  padding-left: 26px;
}
.auth-quote__mark {
  position: absolute;
  left: -12px;
  top: -22px;
  font-family: Georgia, serif;
  font-size: 74px;
  line-height: 1;
  color: rgba(45, 212, 191, 0.32);
}
.auth-quote p {
  font-size: 18px;
  line-height: 1.55;
  color: #cfdfeb;
}
.auth-quote__author {
  display: block;
  margin-top: 12px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------- create */

.create-page {
  padding-top: 8px;
}
.create-page__head {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 26px;
}
.create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.create-form {
  padding: 10px 28px 24px;
}
.form-section {
  display: flex;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.form-section:last-of-type {
  border-bottom: 0;
}
.form-section__num {
  width: 30px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  padding-top: 3px;
  flex: 0 0 auto;
}
.form-section__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.form-section__title {
  font-size: 20px;
}
.form-section__hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin-top: -6px;
}
.form-warning {
  color: var(--coral);
  font-size: 12px;
  line-height: 1.55;
  margin: 10px 0 2px;
}
.schedule-preview__head {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}
.schedule-preview {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.schedule-preview__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(4, 13, 23, 0.35);
  font-size: 12px;
}
.schedule-preview__row:nth-child(odd) {
  background: rgba(8, 27, 44, 0.45);
}
.schedule-preview__level {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  line-height: 1.35;
}
.schedule-preview__level > span:last-child {
  min-width: 0;
}
.schedule-preview__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}
.schedule-preview__date {
  flex-shrink: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.create-form__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
}
.create-form__footer .btn {
  width: auto;
  min-width: 220px;
}
.create-form__note {
  font-size: 11px;
  line-height: 1.4;
}
.create-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 18px);
}
.side-card {
  padding: 19px;
}
.side-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}
.side-card__title span {
  color: var(--teal);
}
.side-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  counter-reset: side;
}
.side-steps li {
  position: relative;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  counter-increment: side;
}
.side-steps li::before {
  content: counter(side);
  position: absolute;
  left: 0;
  top: 1px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.1);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 8px;
}
.side-steps strong {
  font-size: 12px;
}
.side-steps span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.side-note {
  display: flex;
  gap: 9px;
  padding: 13px;
  border-radius: 11px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: rgba(56, 189, 248, 0.05);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.side-note span:first-child {
  color: var(--cyan);
}
.create-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.create-summary__item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.create-summary__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.create-summary__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
}
.create-summary__item strong {
  font-size: 14px;
}
.create-summary__item .muted {
  font-size: 10px;
}

/* -------------------------------------------------------------- tournament */

.tournament-page {
  padding-top: 8px;
}
.t-hero {
  padding: 22px 24px 20px;
  overflow: hidden;
}
.t-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.09), transparent 65%);
  pointer-events: none;
}
.t-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.t-hero__crumbs {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  min-height: 30px;
}
.code-chip {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(4, 13, 23, 0.45);
  color: var(--sand);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.code-chip:hover {
  border-color: rgba(242, 200, 121, 0.4);
}
.t-hero__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.t-hero__share {
  display: flex;
  align-items: center;
  gap: 4px;
}
.t-hero__title {
  margin-top: 18px;
  font-size: clamp(30px, 4.5vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 900px;
}
.t-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 12px;
}
.t-hero__meta .meta-item {
  font-size: 12px;
}
.t-hero__progress {
  height: 3px;
  margin-top: 18px;
  background: rgba(125, 180, 215, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.t-hero__progress span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transition: width 0.4s ease;
}
.membership-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  background: rgba(45, 212, 191, 0.08);
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
}
.t-hero__blocked {
  color: var(--coral);
  font-size: 11px;
}
.archive-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  margin-top: 16px;
  border: 1px solid rgba(251, 113, 133, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(251, 113, 133, 0.06), rgba(8, 27, 44, 0.5));
}
.archive-banner__icon {
  color: var(--coral);
  flex: 0 0 auto;
  margin-top: 2px;
}
.archive-banner strong {
  font-size: 14px;
}
.archive-banner p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.archive-banner .muted {
  font-size: 11px;
}
.result-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(8, 27, 44, 0.45);
}
.result-banner__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: 0 0 auto;
}
.result-banner--win {
  border-color: rgba(242, 200, 121, 0.3);
  background: rgba(242, 200, 121, 0.06);
}
.result-banner--win .result-banner__icon {
  color: var(--sand);
  background: rgba(242, 200, 121, 0.1);
}
.result-banner--out {
  border-color: rgba(251, 113, 133, 0.18);
  background: rgba(251, 113, 133, 0.04);
}
.result-banner--out .result-banner__icon {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.08);
}
.result-banner strong {
  display: block;
  font-size: 14px;
}
.result-banner .muted {
  font-size: 11px;
}

.lobby-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.lobby-card {
  padding: 22px;
}
.lobby-card__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.lobby-card__head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lobby-card__head .muted {
  font-size: 12px;
}
.lobby-card__search {
  position: relative;
  width: 220px;
}
.lobby-card__search > span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  z-index: 1;
}
.capacity-bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(125, 180, 215, 0.1);
  overflow: hidden;
  margin-bottom: 18px;
}
.capacity-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  border-radius: 4px;
}
.participant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 570px;
  overflow-y: auto;
  padding-right: 4px;
}
.participant {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 13, 23, 0.3);
}
.participant.is-me {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(45, 212, 191, 0.05);
}
.participant.is-creator {
  border-color: rgba(242, 200, 121, 0.22);
}
.participant__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.participant__name {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.participant__role {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dim);
}
.participant.is-creator .participant__role {
  color: var(--sand);
}
.participant__kick {
  margin-left: auto;
  width: 26px;
  height: 26px;
  opacity: 0;
}
.participant:hover .participant__kick {
  opacity: 1;
}
.participant-grid__empty {
  grid-column: 1 / -1;
  padding: 22px;
  text-align: center;
  font-size: 12px;
}
.lobby-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lobby-start {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-color: rgba(45, 212, 191, 0.24);
  background: radial-gradient(400px 200px at 50% 0%, rgba(45, 212, 191, 0.1), transparent 70%),
    linear-gradient(155deg, rgba(14, 42, 66, 0.82), rgba(7, 24, 39, 0.94));
}
.lobby-start__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
}
.lobby-start h3 {
  font-size: 20px;
}
.lobby-start p {
  font-size: 12px;
}
.lobby-start .btn {
  margin-top: 3px;
}
.lobby-start__blocked {
  color: var(--coral);
  font-size: 11px;
  text-align: center;
}
.lobby-start--waiting {
  border-color: rgba(56, 189, 248, 0.2);
  background: rgba(8, 27, 44, 0.45);
}
.lobby-start--waiting .lobby-start__icon {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
}
.schedule-list {
  display: flex;
  flex-direction: column;
}
.schedule-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(125, 180, 215, 0.08);
}
.schedule-row:last-of-type {
  border-bottom: 0;
}
.schedule-row__dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--teal);
  flex: 0 0 auto;
  font-size: 9px;
}
.schedule-row--done .schedule-row__dot {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.35);
}
.schedule-row--current .schedule-row__dot {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}
.schedule-row--overdue .schedule-row__dot {
  border-color: rgba(251, 113, 133, 0.5);
}
.schedule-row__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.schedule-row__label {
  font-size: 11px;
  font-weight: 600;
}
.schedule-row__date {
  color: var(--muted);
  font-size: 10px;
}
.schedule-row__badge {
  margin-left: auto;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  border-radius: 4px;
  padding: 2px 5px;
  white-space: nowrap;
}
.schedule-row__badge--overdue {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.08);
}
.schedule-row--current .schedule-row__label {
  color: var(--teal);
}
.schedule-note {
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.5;
}
.schedule-extend {
  margin-top: 11px;
  font-size: 11px;
}
.share-card p {
  font-size: 12px;
  margin-bottom: 11px;
}
.share-card__url {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(4, 13, 23, 0.4);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--sand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-card__actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.t-section {
  margin-top: 18px;
}
.bracket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}
.bracket-card {
  padding: 20px;
}
.bracket--tree .bracket__hint {
  margin: -2px 0 12px;
  font-size: 10px;
}
.bracket-tree-scroll {
  overflow: auto;
  max-height: min(70vh, 760px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(rgba(45, 212, 191, 0.025), rgba(45, 212, 191, 0.01)),
    rgba(4, 13, 23, 0.35);
  overscroll-behavior: contain;
}
.bracket-tree {
  position: relative;
  min-width: 100%;
}
.bracket-tree__links {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.bracket-tree__links path {
  fill: none;
  stroke: rgba(125, 180, 215, 0.38);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tree-round-title {
  position: absolute;
  top: 13px;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 7px;
  height: 20px;
  pointer-events: none;
}
.tree-round-title__label {
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.tree-round-title__meta {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
}
.tree-round-title.is-current .tree-round-title__label {
  color: var(--teal);
}
.tree-match {
  position: absolute;
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.tree-match::before {
  content: '';
  position: absolute;
  inset: -6px;
  z-index: -1;
  border: 1px solid rgba(125, 180, 215, 0.24);
  border-radius: 10px;
  background: rgba(4, 13, 23, 0.2);
  pointer-events: none;
  transition: border-color 0.12s, background 0.12s;
}
.tree-match.is-clickable {
  cursor: pointer;
}
.tree-match.is-current::before {
  border-color: rgba(45, 212, 191, 0.34);
}
.tree-match.is-mine::before {
  border-color: rgba(45, 212, 191, 0.42);
}
.tree-match--playing::before {
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(8, 33, 44, 0.28);
}
.tree-match--ready::before {
  border-color: rgba(56, 189, 248, 0.3);
}
.tree-match--forfeit::before,
.tree-match--cancelled::before {
  border-color: rgba(251, 113, 133, 0.36);
}
.tree-match--void::before {
  border-style: dashed;
}
.tree-match.is-clickable:hover::before,
.tree-match.is-clickable:focus-visible::before {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(11, 42, 58, 0.3);
}
.tree-match__players {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tree-player-box {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(125, 180, 215, 0.24);
  border-radius: 6px;
  background: rgba(7, 26, 43, 0.94);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.tree-match.is-clickable:hover .tree-player-box,
.tree-match.is-clickable:focus-visible .tree-player-box {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(11, 42, 58, 0.98);
}
.tree-match.is-clickable:focus-visible {
  outline: none;
}
.tree-match.is-mine .tree-player-box {
  border-color: rgba(45, 212, 191, 0.38);
}
.tree-match.is-current .tree-player-box {
  border-color: rgba(45, 212, 191, 0.3);
}
.tree-match--playing .tree-player-box {
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.06);
}
.tree-match--ready .tree-player-box {
  border-color: rgba(56, 189, 248, 0.3);
}
.tree-match--forfeit .tree-player-box,
.tree-match--cancelled .tree-player-box {
  border-color: rgba(251, 113, 133, 0.32);
}
.tree-match--void {
  opacity: 0.6;
}
.tree-match--void .tree-player-box {
  border-style: dashed;
}
.tree-player__dot {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(125, 180, 215, 0.35);
}
.tree-player__name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-player__seed {
  flex: 0 0 auto;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
}
.tree-player.is-advanced {
  color: var(--text);
  font-weight: 700;
}
.tree-player.is-advanced .tree-player__dot {
  background: rgba(45, 212, 191, 0.6);
}
.tree-player.is-winner {
  color: var(--text);
  font-weight: 700;
  border-color: rgba(45, 212, 191, 0.68);
  background: rgba(16, 58, 67, 0.88);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.12);
}
.tree-player.is-winner .tree-player__dot {
  background: var(--teal);
  box-shadow: 0 0 5px rgba(45, 212, 191, 0.55);
}
.tree-player__check {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--teal);
}
.tree-player--empty {
  border-style: dashed;
  background: rgba(4, 13, 23, 0.28);
}
.tree-player--empty .tree-player__name {
  color: var(--dim);
  font-style: italic;
}
.tree-player .tiny-badge {
  flex: 0 0 auto;
  height: 13px;
  padding: 0 3px;
  font-size: 7px;
}
.tree-match__replay {
  position: absolute;
  right: 0;
  top: -20px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(242, 200, 121, 0.18);
  border-radius: 5px;
  background: var(--panel-solid);
  color: var(--sand);
  cursor: pointer;
}
.tree-match__replay:hover {
  background: rgba(242, 200, 121, 0.16);
}
.round-plan {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.round-plan__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.round-plan__head p {
  max-width: 520px;
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}
.round-plan__scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.round-plan__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 11px;
}
.round-plan__table th {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  white-space: normal;
}
.round-plan__table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(125, 180, 215, 0.07);
  color: var(--muted);
  vertical-align: top;
}
.round-plan__table tr:last-child td {
  border-bottom: 0;
}
.round-plan__table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.round-plan__label {
  color: var(--text) !important;
  font-weight: 700;
  white-space: nowrap;
}
.round-plan__note {
  max-width: 260px;
  font-size: 10px;
  line-height: 1.4;
}
.round-plan__table tr.is-current td {
  background: rgba(45, 212, 191, 0.045);
  color: var(--text);
}
.bracket {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bracket__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.bracket__title-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.bracket__count {
  font-size: 11px;
}
.bracket__deadline {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  padding-top: 8px;
}
.round-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: thin;
}
.round-tab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 13, 23, 0.3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.round-tab:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.round-tab.is-active {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(45, 212, 191, 0.08);
}
.round-tab.is-current:not(.is-active) {
  border-color: rgba(242, 200, 121, 0.3);
  color: var(--sand);
}
.round-tab__meta {
  font-size: 9px;
  color: var(--dim);
}
.round-tab.is-active .round-tab__meta {
  color: var(--teal);
}
.bracket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 9px;
  max-height: min(72vh, 920px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
}
.match-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 13, 23, 0.3);
}
.match-card.is-mine {
  border-color: rgba(242, 200, 121, 0.3);
  background: rgba(242, 200, 121, 0.035);
}
.match-card--finished {
  border-color: rgba(56, 189, 248, 0.16);
}
.match-card--forfeit {
  border-color: rgba(251, 113, 133, 0.16);
}
.match-card--bye {
  opacity: 0.8;
}
.match-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.match-card__number {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.match-player__seed {
  margin-left: auto;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
}
.match-card__deadline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.match-card__players {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.match-player {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 2px 4px;
  border-radius: 6px;
}
.match-player.is-winner {
  background: rgba(45, 212, 191, 0.06);
}
.match-player__name {
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-player__name.muted {
  font-weight: 400;
  color: var(--dim);
}
.match-player__check {
  margin-left: auto;
  color: var(--teal);
}
.match-player__placeholder-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  flex: 0 0 auto;
}
.match-card__vs {
  color: var(--dim);
  font-size: 8px;
  padding-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.match-card__open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 28px;
  margin-top: 2px;
  padding: 0 8px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.05);
  color: var(--teal);
  font-size: 10px;
  font-weight: 600;
}
.match-card__open:hover {
  background: rgba(45, 212, 191, 0.12);
}
.match-card__note {
  font-size: 9px;
  text-align: center;
  padding: 3px 0;
}
.bracket-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.side-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-list li {
  position: relative;
  padding-left: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.side-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

.standings-card {
  padding: 20px;
}
.standings-card__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.standings-card__head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.standings-card__head .muted {
  font-size: 11px;
}
.standings-card__search {
  position: relative;
  width: 220px;
}
.standings-card__search > span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  z-index: 1;
}
.standings-scroll {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.standings-table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.standings-table th,
.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  background: #0b2033;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.standings-table th.num,
.admin-table th.num {
  text-align: right;
}
.standings-table td,
.admin-table td {
  padding: 8px 11px;
  border-bottom: 1px solid rgba(125, 180, 215, 0.07);
  vertical-align: middle;
}
.standings-table tbody tr:last-child td,
.admin-table tbody tr:last-child td {
  border-bottom: 0;
}
.standings-row:hover {
  background: rgba(125, 180, 215, 0.04);
}
.standings-row.is-me {
  background: rgba(45, 212, 191, 0.05);
}
.standings-row--winner {
  background: rgba(242, 200, 121, 0.06);
}
.standings-place {
  width: 52px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--sand);
  white-space: nowrap;
}
.standings-row--active .standings-place {
  color: var(--teal);
}
.standings-player {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.standings-player > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outcome {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.outcome--winner {
  color: var(--sand);
  background: rgba(242, 200, 121, 0.1);
}
.outcome--active {
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
}
.outcome--out {
  color: var(--muted);
  background: rgba(125, 180, 215, 0.06);
}
.table-empty {
  text-align: center;
  padding: 26px !important;
  color: var(--dim);
}
.matches-card {
  padding: 20px;
}
.matches-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.matches-card__head .muted {
  font-size: 11px;
}
.matches-list {
  display: flex;
  flex-direction: column;
}
.match-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 130px 78px 20px;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(125, 180, 215, 0.07);
  color: var(--text);
  font-size: 11px;
}
.match-row:hover {
  background: rgba(125, 180, 215, 0.04);
  color: var(--text);
}
.match-row:last-child {
  border-bottom: 0;
}
.match-row__round {
  color: var(--dim);
  font-size: 10px;
}
.match-row__players {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.match-row__players span:not(.match-row__vs) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-row__players .is-winner {
  color: var(--teal);
  font-weight: 600;
}
.match-row__vs {
  color: var(--dim);
}
.match-row__status {
  font-size: 10px;
  color: var(--muted);
}
.match-row__status--finished {
  color: var(--cyan);
}
.match-row__status--forfeit {
  color: var(--coral);
}
.match-row__status--playing {
  color: var(--teal);
}
.match-row__meta {
  color: var(--dim);
  font-size: 10px;
  text-align: right;
}
.match-row__arrow {
  color: var(--dim);
}
.matches-more {
  align-self: center;
  margin-top: 10px;
}

/* --------------------------------------------------------------- history */

.history-page {
  padding-top: 8px;
}
.history-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.history-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 27, 44, 0.4);
  font-size: 11px;
  color: var(--muted);
}
.history-stat__icon {
  color: var(--teal);
}
.history-stat strong {
  color: var(--text);
  font-size: 15px;
}
.history-groups {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.history-note {
  margin-top: 30px;
  font-size: 10px;
}

/* ----------------------------------------------------------------- admin */

.admin-page {
  padding-top: 8px;
}
.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 11px;
}
.admin-meta strong {
  color: var(--text);
}
.admin-table-card {
  padding: 20px;
}
.admin-table-card__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.admin-table-card__title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.admin-table-card__title .muted {
  font-size: 11px;
}
.admin-table-card__filters {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-icon {
  position: relative;
  display: block;
}
.input-icon > span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  z-index: 1;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.admin-table {
  min-width: 780px;
}
.admin-table tr.is-archived {
  opacity: 0.75;
}
.admin-tournament {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.admin-tournament__name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.admin-tournament__code {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.08em;
}
.admin-tournament__creator {
  font-size: 9px;
}
.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.admin-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.audit-card {
  padding: 20px;
}
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
}
.audit-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 11px;
}
.audit-row__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: 6px;
  flex: 0 0 auto;
}
.audit-row > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
}
.audit-row strong {
  color: var(--text);
}
.audit-row .muted {
  font-size: 9px;
  width: 100%;
}
.warning-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.warning-row {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(251, 113, 133, 0.2);
  background: rgba(251, 113, 133, 0.05);
  color: #fecdd3;
  font-size: 10px;
}
.healthy-state {
  display: flex;
  align-items: center;
  gap: 11px;
}
.healthy-state__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  flex: 0 0 auto;
}
.healthy-state > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.healthy-state strong {
  font-size: 12px;
}
.healthy-state .muted {
  font-size: 10px;
}
.admin-health-note {
  margin-top: 14px;
  font-size: 10px;
  line-height: 1.5;
}

/* ----------------------------------------------------------------- rules */

.rules-page {
  padding-top: 8px;
}
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rule-card {
  padding: 24px;
}
.rule-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rule-card__num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.1em;
}
.rule-card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
}
.rule-card__title {
  font-size: 18px;
}
.rule-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rule-card__body p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rules-list li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.rules-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}
.rules-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(8, 27, 44, 0.45);
}
.rules-cta__actions {
  display: flex;
  gap: 8px;
}

/* ------------------------------------------------------------- 404 / error */

.notfound-page,
.restricted-tournament {
  max-width: 620px;
  margin: 48px auto;
  padding: 34px;
  text-align: center;
}
.restricted-tournament__icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: rgba(45, 212, 191, 0.09);
  color: var(--teal);
}
.restricted-tournament .page-title {
  margin: 10px 0;
}
.restricted-tournament .muted {
  max-width: 460px;
  margin: 0 auto 20px;
}
.restricted-tournament .btn {
  display: inline-flex;
}
.restricted-tournament .text-link {
  display: block;
  margin-top: 18px;
}
.error-page {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
}
.notfound-card,
.error-card {
  max-width: 520px;
  width: 100%;
  padding: 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.notfound-code {
  font-family: var(--mono);
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  color: rgba(125, 180, 215, 0.18);
  letter-spacing: -0.06em;
}
.notfound-icon,
.error-card__icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.07);
  border: 1px solid rgba(45, 212, 191, 0.14);
}
.error-card__icon {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.07);
  border-color: rgba(251, 113, 133, 0.14);
}
.notfound-card h1,
.error-card h1 {
  font-size: 28px;
}
.notfound-card p,
.error-card p {
  font-size: 13px;
  max-width: 380px;
}
.notfound-actions,
.error-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --------------------------------------------------------------- boot */

.boot-screen {
  min-height: 100vh;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  padding: 30px;
  text-align: center;
}
.boot-screen__logo,
.boot-screen__icon {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  color: #04121c;
  background: linear-gradient(145deg, #5eead4, #38bdf8);
  box-shadow: 0 30px 70px -30px rgba(45, 212, 191, 0.8);
  margin-bottom: 6px;
}
.boot-screen__icon {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.1);
  box-shadow: none;
  border: 1px solid rgba(251, 113, 133, 0.2);
}
.boot-screen__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.boot-screen__subtitle {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.boot-screen h1 {
  font-size: 26px;
  color: var(--text);
  margin-top: 8px;
}
.boot-screen p {
  max-width: 380px;
  font-size: 13px;
}
.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  padding: 30px;
  text-align: center;
  z-index: 999;
}

/* ----------------------------------------------------------------- match */

.match-page {
  padding-top: 10px;
}
.m-hero {
  padding: 18px 22px;
}
.m-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.quick-room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 8px 10px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 9px;
  background: rgba(45, 212, 191, 0.06);
}
.quick-room__info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.quick-room__label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.quick-room__code {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
}
.quick-room__actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.quick-room__action-text {
  display: inline;
}
.music-toggle.is-on,
.sfx-toggle.is-on {
  color: var(--teal);
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.07);
}
.audio-control {
  position: relative;
  display: inline-flex;
}
.audio-control__popover {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 1000;
  width: 190px;
  padding: 8px 10px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(6, 21, 35, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  pointer-events: none;
}
.audio-control:hover .audio-control__popover,
.audio-control:focus-within .audio-control__popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.audio-control__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}
.audio-control__value {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10px;
}
.audio-control__slider {
  width: 100%;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}
@media (hover: none) {
  .audio-control__popover {
    width: 170px;
  }
}
.audio-mixer {
  position: fixed;
  right: 14px;
  top: 82px;
  z-index: 12000;
  width: 300px;
  max-height: calc(100dvh - 100px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 13px;
  background: rgba(6, 21, 35, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
}
.audio-mixer.is-collapsed {
  display: none;
}
.audio-mixer__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
}
.audio-mixer__icon {
  display: inline-flex;
  color: var(--teal);
}
.audio-mixer__title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.audio-mixer__title strong {
  font-size: 12px;
}
.audio-mixer__title .muted {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.audio-mixer__collapse {
  margin-left: auto;
}
.audio-mixer__body {
  overflow: auto;
  padding: 9px 11px 11px;
}
.audio-mixer__section-title {
  margin: 9px 0 5px;
  color: var(--teal);
  font: 700 9px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.audio-mixer__row {
  margin-bottom: 8px;
}
.audio-mixer__row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 10px;
  color: var(--muted);
}
.audio-mixer__value {
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.audio-mixer__range {
  width: 100%;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}
.audio-mixer__tests {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}
.audio-mixer__tests .btn {
  padding: 4px 7px;
  font-size: 9px;
}
.audio-mixer__hint {
  margin: 9px 0 0;
  font-size: 9px;
  line-height: 1.4;
}
.audio-mixer__tab {
  position: fixed;
  right: 0;
  top: 45%;
  z-index: 11999;
  width: 34px;
  height: 44px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  background: rgba(6, 21, 35, 0.96);
  color: var(--teal);
  cursor: pointer;
}
.audio-mixer__tab[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .audio-mixer {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    width: auto;
    max-height: 58dvh;
  }
  .audio-mixer__tab {
    top: auto;
    bottom: 86px;
  }
}
.m-hero__crumbs {
  display: flex;
  align-items: center;
  gap: 12px;
}
.m-hero__opponent {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.m-hero__title-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.m-hero__title {
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.03em;
}
.m-hero__tournament {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px dashed rgba(125, 180, 215, 0.3);
}
.m-hero__tournament:hover {
  color: var(--cyan);
}
.m-hero__meta {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}
.m-hero__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.match-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}
.match-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.placement-card {
  padding: 20px;
}
.ship-drag-ghost {
  position: fixed;
  z-index: 9999;
  display: block;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.96;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}
.ship-drag-ghost__cell {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(45, 212, 191, 0.6);
  border-radius: 3px;
  background: linear-gradient(160deg, #5eead4, #0f766e);
}
.ship-drag-ghost__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: brightness(1.18) drop-shadow(0 0 10px rgba(45, 212, 191, 0.55));
  opacity: 0.96;
}
.board--place .board__cell {
  touch-action: none;
}
body.board-dragging {
  user-select: none;
  cursor: grabbing;
}
.placement-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.placement-card__head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.placement-hide-btn {
  white-space: nowrap;
}
.placement-card__head .muted {
  font-size: 11px;
  margin-top: 3px;
  max-width: 520px;
}
.placement-card__counter {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--sand);
  white-space: nowrap;
}
.placement-card__hint {
  margin-top: 12px;
  font-size: 10px;
  text-align: center;
}
.placement-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.placement-panel {
  padding: 18px;
}
.ship-palette {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.ship-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 13, 23, 0.3);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.ship-choice:active {
  cursor: grabbing;
}
  color: var(--text);
}
.ship-choice:hover:not(:disabled) {
  border-color: var(--line-strong);
}
.ship-choice.is-selected {
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.07);
}
.ship-choice:disabled {
  opacity: 0.35;
  cursor: default;
}
.ship-choice__art {
  display: block;
  width: auto;
  height: 30px;
  max-width: 150px;
  object-fit: contain;
  filter: brightness(1.12) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
.ship-choice.is-selected .ship-choice__art {
  filter: brightness(1.25) drop-shadow(0 0 5px rgba(45, 212, 191, 0.65));
}
.ship-choice__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}
.ship-choice.is-selected .ship-choice__count {
  color: var(--teal);
}
.placement-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.placement-panel > .btn--primary {
  margin-top: 2px;
}
.placement-panel .form-inline-hint {
  margin-top: 10px;
}
.duel-card {
  padding: 18px;
}
.duel-player {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid transparent;
}
.duel-player.is-you {
  background: rgba(125, 180, 215, 0.04);
}
.duel-player.is-turn {
  border-color: rgba(45, 212, 191, 0.22);
  background: rgba(45, 212, 191, 0.04);
}
.duel-player__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.duel-player__name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.duel-player__name {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.duel-player__status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: var(--muted);
}
.duel-player__turn {
  margin-left: auto;
  color: var(--teal);
}
.duel-card__divider {
  margin: 4px 10px;
  color: var(--dim);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.duel-card__forfeit {
  margin-top: 10px;
}
.duel-card--waiting p {
  margin-top: 10px;
  font-size: 11px;
}
.turn-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 27, 44, 0.5);
}
.turn-hud.is-you {
  border-color: rgba(45, 212, 191, 0.32);
  background: radial-gradient(400px 120px at 10% 0%, rgba(45, 212, 191, 0.1), transparent 70%),
    rgba(8, 27, 44, 0.5);
}
.turn-hud__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}
.turn-hud__status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  padding-left: 18px;
}
.turn-hud__pulse {
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.turn-hud.is-you .turn-hud__pulse {
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.45);
  animation: pulse 2s infinite;
}
.turn-hud__label {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.turn-hud__sub {
  font-size: 11px;
  color: var(--muted);
}
.turn-hud__busy {
  font-size: 10px;
  color: var(--sand);
  white-space: nowrap;
}
.turn-timer {
  width: 210px;
  flex: 0 0 auto;
}
.turn-timer__top {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.turn-timer__text {
  font-family: var(--mono);
  color: var(--text);
  letter-spacing: 0;
}
.turn-timer__track {
  height: 4px;
  border-radius: 4px;
  background: rgba(125, 180, 215, 0.12);
  overflow: hidden;
}
.turn-timer__bar {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transition: width 0.4s linear;
}
.turn-timer.is-danger .turn-timer__bar {
  background: linear-gradient(90deg, var(--coral), #f43f5e);
}
.turn-timer.is-expired .turn-timer__text {
  color: var(--coral);
}
.turn-timer.is-paused .turn-timer__text {
  color: #fbbf24;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.turn-timer.is-paused .turn-timer__bar {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.pause-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(245, 158, 11, 0.1), rgba(8, 27, 44, 0.55));
}
.pause-ready__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pause-ready__text b {
  font-size: 12px;
  color: #fbbf24;
}
.pause-ready__text span {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.pause-ready__btn {
  flex: 0 0 auto;
}
.field__label--with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.info-dot {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--teal);
  font: 700 10px/1 var(--mono);
  cursor: pointer;
}
.info-dot:hover {
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
}
.field__info {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.06);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.field__info[hidden],
.field[hidden] {
  display: none !important;
}
.form-grid.is-manual-start {
  grid-template-columns: 1fr;
}
.fire-tuning-save {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
}
.fire-tuning-save .muted {
  font-size: 11px;
}
.fire-tuning-save__status {
  margin-left: auto;
  color: var(--teal);
  font: 600 11px/1.2 var(--mono);
}
.fire-tuning-save__status:empty {
  display: none;
}
@media (max-width: 700px) {
  .pause-ready {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
  .pause-ready__btn {
    width: 100%;
  }
}
.board-tabs {
  display: none;
  gap: 4px;
  margin-bottom: 10px;
}
.board-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 13, 23, 0.3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.board-tab.is-active {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.07);
  color: var(--text);
}
.board-tab__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0;
}
.board-tab.is-active .board-tab__dot {
  opacity: 1;
}
.boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.boards.own-fleet-hidden {
  grid-template-columns: 1fr;
}
.boards.own-fleet-hidden .board-panel--own {
  display: none;
}
.own-fleet-toggle {
  margin: 6px 0 8px;
  align-self: flex-start;
}
.board-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 27, 44, 0.36);
  min-width: 0;
}
.board-panel--enemy {
  border-color: rgba(251, 113, 133, 0.13);
}
.board-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.board-panel__title {
  font-size: 14px;
}
.board-panel__sub {
  font-size: 9px;
}
.board-grid-wrap {
  width: 100%;
}
.board {
  position: relative;
  display: grid;
  grid-template-columns: 20px repeat(10, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  background: #071a2b;
  border-radius: 6px;
}
.board__corner {
  display: grid;
  place-items: center;
  color: var(--dim);
}
.board__label {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  user-select: none;
}
.board__label--top {
  height: 18px;
}
.board__label--side {
  width: 20px;
}
.board__cell {
  position: relative;
  z-index: 1;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(125, 180, 215, 0.12);
  border-radius: 4px;
  background: transparent;
  transition: border-color 0.12s, transform 0.12s;
  min-width: 0;
}
.board-ship-art {
  position: absolute;
  z-index: 2;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  filter: brightness(1.16) contrast(1.05) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}
.board-ship-art--burning {
  overflow: visible;
}
.board-ship-art__hull {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.board-ship-art__fire {
  position: absolute;
  left: calc(50% + var(--fire-x, 0%));
  top: calc(68% - 2px - var(--fire-y, 0%));
  width: var(--fire-w, 76%);
  height: 78%;
  object-fit: fill;
  transform: translate(-50%, -100%);
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.55));
}
.board-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}
.board-miss-fx {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, -50%);
  background-image: url('/img/fx/miss-splash.png');
  background-repeat: no-repeat;
  background-size: 900% 100%;
  background-position: 0 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
@keyframes board-miss-splash {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 0;
  }
}
.board-hit-fx {
  position: absolute;
  width: 130%;
  height: 130%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.board-hit-blast {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 320%;
  aspect-ratio: 265 / 240;
  transform: translate(-50%, -50%);
  background-image: url('/img/fx/hit-blast.png');
  background-repeat: no-repeat;
  background-size: 900% 100%;
  background-position: 0 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}
@keyframes board-hit-blast {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 0;
  }
}
.hit-x {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(239, 68, 68, 0.9);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}
.hit-x::before,
.hit-x::after {
  content: '';
  position: absolute;
  left: -10%;
  top: 50%;
  width: 120%;
  height: 2px;
  border-radius: 2px;
  background: #ef4444;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.8);
}
.hit-x::before {
  transform: translateY(-50%) rotate(45deg);
}
.hit-x::after {
  transform: translateY(-50%) rotate(-45deg);
}
.board-boom-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240%;
  height: 240%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.global-fire-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  overflow: visible;
}
.global-fire {
  position: fixed;
  display: none;
  object-fit: fill;
  transform: translate(-50%, -100%);
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.55));
  animation: global-fire-appear 320ms ease-out both;
}
@keyframes global-fire-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.global-fire.is-vertical {
  transform: translate(-50%, -50%) rotate(90deg);
}
.board__cell.is-hit {
  border-color: rgba(239, 68, 68, 0.9) !important;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.8), 0 0 8px rgba(239, 68, 68, 0.3);
}
.board__cell.is-hit::after {
  display: none;
}
.board__cell.is-sunk,
.board__cell.is-sunk.is-hit {
  border-color: transparent !important;
  box-shadow: none !important;
}
.board__cell.is-sunk::after {
  display: none !important;
}
.board-boom {
  position: absolute;
  inset: -50%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 4deg,
      rgba(254, 240, 138, 0.9) 0deg 5deg,
      transparent 5deg 25deg
    ),
    radial-gradient(
      circle,
      rgba(255, 255, 240, 1) 0 6%,
      rgba(254, 240, 138, 0.98) 12%,
      rgba(251, 146, 60, 0.95) 27%,
      rgba(239, 68, 68, 0.72) 43%,
      rgba(127, 29, 29, 0.35) 56%,
      rgba(0, 0, 0, 0) 72%
    );
  box-shadow: 0 0 20px 7px rgba(251, 146, 60, 0.55);
  animation: board-boom 1000ms cubic-bezier(0.12, 0.75, 0.2, 1) forwards;
}
.board-boom::before {
  content: '';
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: #fffdf2;
  box-shadow: 0 0 24px 10px rgba(253, 230, 138, 0.9);
  animation: board-boom-flash 420ms ease-out forwards;
}
.board-boom::after {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2px solid rgba(254, 240, 138, 0.75);
  animation: board-boom-ring 900ms ease-out forwards;
}
.board-smoke {
  position: absolute;
  inset: -25%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 42%, rgba(148, 163, 184, 0.5) 0 12%, transparent 38%),
    radial-gradient(circle at 66% 35%, rgba(100, 116, 139, 0.45) 0 14%, transparent 42%),
    radial-gradient(circle at 48% 62%, rgba(71, 85, 105, 0.4) 0 18%, transparent 45%);
  filter: blur(4px);
  animation: board-smoke 1500ms ease-out forwards;
}
.ship-fire {
  position: absolute;
  inset: -34% -38%;
  filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.6));
  animation: ship-fire-appear 360ms ease-out 520ms both;
}
.ship-fire__anim {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}
.ship-fire::before {
  content: '';
  position: absolute;
  inset: 18% 12%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(249, 115, 22, 0.42) 0 18%,
    rgba(127, 29, 29, 0.18) 48%,
    transparent 72%
  );
  filter: blur(2px);
}
.ship-fire::after {
  content: '';
  position: absolute;
  left: 22%;
  bottom: 58%;
  width: 55%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(148, 163, 184, 0.4), transparent 70%);
  filter: blur(4px);
  animation: ship-fire-smoke 1.8s ease-out infinite;
}
.ship-fire__flame {
  position: absolute;
  bottom: 8%;
  width: 24%;
  height: 80%;
  border-radius: 55% 55% 42% 42%;
  transform-origin: 50% 100%;
  background: radial-gradient(
    ellipse at 50% 82%,
    #fff7ed 0 8%,
    #fde68a 23%,
    #fb923c 48%,
    #dc2626 78%,
    rgba(127, 29, 29, 0) 100%
  );
  filter: blur(0.35px);
  animation: ship-fire-flicker 620ms ease-in-out infinite alternate;
}
.ship-fire__flame:nth-child(1) {
  left: 0;
  height: 52%;
  animation-delay: -160ms;
}
.ship-fire__flame:nth-child(2) {
  left: 23%;
  height: 82%;
}
.ship-fire__flame:nth-child(3) {
  left: 47%;
  height: 96%;
  animation-delay: -310ms;
}
.ship-fire__flame:nth-child(4) {
  left: 72%;
  height: 60%;
  animation-delay: -450ms;
}
@keyframes board-boom {
  0% {
    opacity: 0.95;
    transform: scale(0.28);
  }
  22% {
    opacity: 1;
    transform: scale(0.82);
  }
  55% {
    opacity: 0.9;
    transform: scale(1.18);
  }
  100% {
    opacity: 0;
    transform: scale(1.85);
  }
}
@keyframes board-boom-flash {
  0% {
    opacity: 1;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}
@keyframes board-boom-ring {
  0% {
    opacity: 0.85;
    transform: scale(0.5);
  }
  100% {
    opacity: 0;
    transform: scale(1.75);
  }
}
@keyframes board-smoke {
  0% {
    opacity: 0.8;
    transform: scale(0.45);
  }
  100% {
    opacity: 0;
    transform: translateY(-22%) scale(1.4);
  }
}
@keyframes ship-fire-appear {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes ship-fire-smoke {
  0% {
    opacity: 0;
    transform: translate(-8%, 18%) scale(0.6);
  }
  35% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translate(12%, -34%) scale(1.25);
  }
}
@keyframes ship-fire-flicker {
  0% {
    opacity: 0.72;
    transform: scale(0.86, 0.9) rotate(-3deg);
  }
  45% {
    opacity: 1;
    transform: scale(1.02, 1.08) rotate(2deg);
  }
  100% {
    opacity: 0.8;
    transform: scale(0.92, 1.18) rotate(-1deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .board-boom,
  .board-boom::before,
  .board-boom::after,
  .board-smoke,
  .ship-fire,
  .ship-fire::after,
  .ship-fire__flame {
    animation: none;
  }
  .board-boom {
    opacity: 0.75;
  }
  .ship-fire__flame {
    opacity: 0.9;
  }
}
.board-ship-art.is-selected {
  filter: brightness(1.2) drop-shadow(0 0 4px rgba(45, 212, 191, 0.9));
}
.board-ship-art.is-grabbed {
  filter: brightness(1.35) drop-shadow(0 0 10px rgba(45, 212, 191, 0.95));
  transform: scale(1.06);
  transition: transform 120ms ease, filter 120ms ease;
}
.board-ship-art.is-drag-source {
  opacity: 0;
}
.board__cell.is-grabbed .board__ship-dot {
  display: none;
}
.board-ship-art.is-damaged {
  filter: brightness(1.08) sepia(0.55) saturate(1.9) hue-rotate(-28deg);
}
.board-ship-art.is-sunk {
  filter: saturate(0.55) brightness(0.55) sepia(0.6) hue-rotate(-30deg);
  opacity: 0.82;
}
.board-ship-art.is-sunk.board-ship-art--burning {
  filter: none;
  opacity: 1;
}
.board-ship-art.is-sunk .board-ship-art__hull {
  filter: saturate(0.55) brightness(0.55) sepia(0.6) hue-rotate(-30deg);
  opacity: 0.82;
}
.board-ship-art.is-sunk .board-ship-art__fire {
  filter: saturate(1.25) brightness(1.2) drop-shadow(0 0 6px rgba(249, 115, 22, 0.7));
  opacity: 1;
}
.board__cell.has-ship-art {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
.board__cell:disabled {
  cursor: default;
}
.board--enemy:not(.board--history) .board__cell:not(:disabled):hover {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.1);
  cursor: crosshair;
}
.board__cell.is-ship {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.board--place.is-fleet-hidden .board-ship-art,
.board--place.is-fleet-hidden .board__ship-dot,
.board--place.is-fleet-hidden .board__cell.is-ghost,
.board-shell.is-fleet-hidden .board-ship-art,
.board-shell.is-fleet-hidden .board__ship-dot {
  opacity: 0 !important;
  visibility: hidden !important;
}
.board--place.is-fleet-hidden .board__cell.is-selected-ship,
.board--place.is-fleet-hidden .board__cell.is-grabbed {
  box-shadow: none !important;
  border-color: transparent !important;
}
.board--place.is-fleet-hidden .board__cell.is-ship,
.board--place.is-fleet-hidden .board__cell.has-ship-art {
  background: transparent !important;
  border-color: rgba(125, 180, 215, 0.12) !important;
}
html[data-theme="light"] .board--place.is-fleet-hidden .board__cell.is-ship,
html[data-theme="light"] .board--place.is-fleet-hidden .board__cell.has-ship-art {
  border-color: rgba(20, 55, 78, 0.14) !important;
}
.board-shell.is-fleet-hidden .board__cell.is-ship,
.board-shell.is-fleet-hidden .board__cell.has-ship-art {
  border-color: rgba(125, 180, 215, 0.12) !important;
}
html[data-theme="light"] .board-shell.is-fleet-hidden .board__cell.is-ship,
html[data-theme="light"] .board-shell.is-fleet-hidden .board__cell.has-ship-art {
  border-color: rgba(20, 55, 78, 0.14) !important;
}
.board__cell.is-ship.is-hit {
  background: linear-gradient(160deg, #f97316, #b91c1c);
  border-color: rgba(251, 146, 60, 0.6);
}
.board__cell.is-ship.is-sunk {
  background: linear-gradient(160deg, #7f1d1d, #3f0d12);
  border-color: rgba(251, 113, 133, 0.4);
}
.board__cell.is-hit::after {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background: radial-gradient(circle, #fef3c7 0%, #fb923c 45%, #dc2626 100%);
  box-shadow: 0 0 9px rgba(251, 146, 60, 0.7);
}
.board__cell.is-hit.is-sunk::after {
  background: radial-gradient(circle, #fecaca 0%, #ef4444 55%, #7f1d1d 100%);
  box-shadow: none;
}
.board__cell.is-miss::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0b1b29;
  border: 1px solid rgba(125, 180, 215, 0.3);
}
.board__cell.is-last {
  box-shadow: inset 0 0 0 2px var(--sand);
}
.board__cell.is-pending {
  opacity: 0.55;
  animation: pulse 1s infinite;
}
.board--place .board__cell {
  touch-action: none;
}
.board__cell.is-selected-ship {
  box-shadow: inset 0 0 0 2px var(--teal);
}
.board__cell.is-grabbed {
  border-color: var(--teal) !important;
  box-shadow: inset 0 0 0 2px rgba(45, 212, 191, 0.8), 0 0 10px rgba(45, 212, 191, 0.35);
}
.board__cell.is-ghost {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.08);
}
.board__cell.is-ghost-valid {
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.18);
}
.board__cell.is-ghost-invalid {
  border-color: var(--coral);
  background: rgba(251, 113, 133, 0.18);
}
.board__ship-dot {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(94, 234, 212, 0.35), rgba(45, 212, 191, 0.12));
}
.board__mark {
  display: none;
}
.board--place .board__cell:not(:disabled) {
  cursor: pointer;
}
.board--place .board__cell:not(:disabled):hover {
  border-color: rgba(45, 212, 191, 0.45);
}
.board-shell--place .board {
  max-width: 480px;
}
.move-log {
  padding: 16px;
}
.move-log__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.move-log__head .muted {
  font-size: 9px;
}
.move-log__list {
  display: flex;
  flex-direction: column;
  max-height: 330px;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.move-row {
  display: grid;
  grid-template-columns: 24px 1fr 30px 90px;
  align-items: center;
  gap: 5px;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(125, 180, 215, 0.06);
  font-size: 10px;
}
.move-row:last-child {
  border-bottom: 0;
}
.move-row--hit,
.move-row--sunk {
  background: rgba(251, 113, 133, 0.035);
}
.move-row__n {
  font-family: var(--mono);
  color: var(--dim);
  font-size: 9px;
}
.move-row__who {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.move-row__who .move-row__auto {
  margin-left: 4px;
  font-size: 7px;
  color: var(--dim);
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 3px;
}
.move-row__cell {
  font-family: var(--mono);
  color: var(--text);
  font-size: 10px;
  text-align: center;
}
.move-row__result {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}
.move-row--hit .move-row__result,
.move-row--sunk .move-row__result {
  color: var(--coral);
}
.move-row--miss .move-row__result {
  color: var(--dim);
}
.move-log__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 10px;
  color: var(--dim);
  font-size: 10px;
}
.observer-card {
  min-height: 340px;
}
.observer-stats {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* result */

.result-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.result-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.result-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(14, 42, 66, 0.82), rgba(7, 24, 39, 0.94));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  overflow: hidden;
}
.result-card__icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 4px;
  color: var(--muted);
  background: rgba(125, 180, 215, 0.06);
  border: 1px solid var(--line);
}
.result-card--win {
  border-color: rgba(242, 200, 121, 0.3);
  background: radial-gradient(600px 240px at 50% 0%, rgba(242, 200, 121, 0.14), transparent 70%),
    linear-gradient(155deg, rgba(14, 42, 66, 0.85), rgba(7, 24, 39, 0.95));
}
.result-card--win .result-card__icon {
  color: var(--sand);
  background: rgba(242, 200, 121, 0.1);
  border-color: rgba(242, 200, 121, 0.28);
}
.result-card--lose .result-card__icon {
  color: var(--coral);
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.2);
}
.result-card__title {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
}
.result-card__text {
  max-width: 480px;
  color: var(--muted);
  font-size: 13px;
}
.result-stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.result-stats span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--muted);
  font-size: 10px;
}
.result-stats strong {
  color: var(--text);
  font-size: 20px;
  letter-spacing: -0.03em;
}
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.confetti span {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: 7px;
  height: 11px;
  border-radius: 1px;
  background: hsl(var(--hue) 80% 62%);
  opacity: 0;
  animation: confetti-fall 2.6s var(--delay) ease-in forwards;
}
@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(520px) rotate(720deg);
  }
}

/* ---------------------------------------------------------------- modals */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 14, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.16s ease;
  overflow-y: auto;
}
.modal-overlay.is-open {
  opacity: 1;
}
.modal {
  width: 100%;
  max-width: 570px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #0a1e30;
  box-shadow: 0 40px 100px -30px #000;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}
.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}
.modal--sm {
  max-width: 440px;
}
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 0;
}
.modal__heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.modal__title {
  font-size: 20px;
  letter-spacing: -0.02em;
}
.modal__subtitle {
  color: var(--muted);
  font-size: 11px;
}
.modal__close {
  margin: -5px -5px 0 0;
}
.modal__body {
  padding: 16px 20px;
  overflow-y: auto;
}
.modal__text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px 20px;
  flex-wrap: wrap;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.confirm-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal--danger .modal__title {
  color: #fecdd3;
}
.qr-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.qr-modal__frame {
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px -20px #000;
}
.qr-modal__image {
  width: 250px;
  height: 250px;
  display: block;
}
.qr-modal__hint {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  max-width: 330px;
}
.qr-modal__link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.qr-modal__actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 40px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(9, 28, 45, 0.96);
  box-shadow: 0 20px 50px -20px #000;
  color: var(--text);
  font-size: 12px;
  pointer-events: auto;
  animation: toast-in 0.22s ease both;
}
.toast.is-leaving {
  animation: toast-out 0.22s ease both;
}
.toast__icon {
  color: var(--cyan);
  margin-top: 1px;
  flex: 0 0 auto;
}
.toast__text {
  flex: 1;
  line-height: 1.45;
}
.toast__close {
  border: 0;
  background: none;
  color: var(--dim);
  padding: 1px;
  margin: -1px -2px 0 0;
}
.toast__close:hover {
  color: var(--text);
}
.toast--success {
  border-color: rgba(45, 212, 191, 0.35);
}
.toast--success .toast__icon {
  color: var(--teal);
}
.toast--error {
  border-color: rgba(251, 113, 133, 0.4);
}
.toast--error .toast__icon {
  color: var(--coral);
}
.toast--warning .toast__icon {
  color: var(--sand);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(12px);
  }
}

/* ----------------------------------------------------------------- responsive */

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr 0.85fr;
    gap: 30px;
  }
  .radar {
    width: 330px;
    height: 330px;
  }
  .radar--large {
    width: 390px;
    height: 390px;
  }
  .float-card--match {
    right: -8px;
  }
  .float-card--fleet {
    left: -8px;
  }
  .cards-grid--tournaments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bracket-layout,
  .match-layout,
  .result-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .create-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

.site-header .mobile-toggle {
  display: none;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }
  .site-header .mobile-toggle {
    display: inline-grid;
  }
  .header__actions {
    margin-left: 0;
  }
  .mobile-menu {
    display: none;
    flex-direction: column;
    padding: 8px 26px 18px;
    border-top: 1px solid var(--line);
    background: rgba(4, 13, 23, 0.96);
  }
  .mobile-menu.is-open {
    display: flex;
  }
  .mobile-menu__link {
    padding: 10px 4px;
    border-bottom: 1px solid rgba(125, 180, 215, 0.08);
    color: var(--text);
    font-size: 14px;
  }
  .mobile-menu__button {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(125, 180, 215, 0.08);
    background: none;
    text-align: left;
  }
  .mobile-menu__link.is-accent {
    color: var(--teal);
  }
  .mobile-menu__meta {
    margin-top: 12px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 26px;
  }
  .hero__text {
    max-width: 700px;
  }
  .hero-visual {
    min-height: 440px;
  }
  .auth-page {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
  }
  .auth-main {
    justify-self: center;
  }
  .auth-visual {
    display: none;
  }
  .create-layout {
    grid-template-columns: 1fr;
  }
  .create-side {
    position: static;
  }
  .lobby-layout {
    grid-template-columns: 1fr;
  }
  .lobby-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .lobby-side .lobby-start {
    grid-row: span 2;
  }
  .bracket-layout,
  .match-layout,
  .result-layout {
    grid-template-columns: 1fr;
  }
  .bracket-side,
  .match-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .placement-side {
    position: static;
  }
  .placement-side .placement-panel {
    grid-row: span 2;
  }
  .result-layout > .match-side {
    display: block;
  }
  .admin-columns {
    grid-template-columns: 1fr;
  }
  .boards {
    grid-template-columns: 1fr 1fr;
  }
  .turn-timer {
    width: 160px;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 18px;
  }
  :root {
    --header-h: 62px;
  }
  .site-main {
    padding: 22px 0 40px;
  }
  .header__inner {
    gap: 12px;
  }
  .header__create span:last-child {
    display: none;
  }
  .header__create {
    width: 40px;
    padding: 0;
  }
  .user-toggle__nick,
  .user-toggle__chev {
    display: none;
  }
  .user-toggle {
    padding: 0 4px;
    border: 0;
    background: transparent;
  }
  .header__login {
    display: none;
  }
  .hero__title {
    font-size: clamp(38px, 11vw, 54px);
  }
  .hero__lead {
    font-size: 15px;
  }
  .hero-visual {
    min-height: 380px;
  }
  .radar {
    width: 280px;
    height: 280px;
  }
  .float-card--match {
    right: 0;
    top: 2%;
    width: 210px;
  }
  .float-card--fleet {
    display: none;
  }
  .feature-strip {
    grid-template-columns: 1fr 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }
  .cards-grid--tournaments {
    grid-template-columns: 1fr;
  }
  .dashboard__head {
    flex-direction: column;
  }
  .dashboard__actions {
    width: 100%;
  }
  .dashboard__join {
    flex: 1;
  }
  .dashboard__join .input {
    width: 100%;
    flex: 1;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .live-banner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .live-banner__mark {
    padding-right: 12px;
  }
  .live-banner__cta {
    width: 100%;
    justify-content: space-between;
  }
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-title {
    font-size: 34px;
  }
  .create-form {
    padding: 6px 18px 18px;
  }
  .form-section {
    gap: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .create-form__footer {
    flex-direction: column;
    align-items: stretch;
  }
  .create-form__footer .btn {
    width: 100%;
  }
  .form-section__num {
    width: 23px;
  }
  .t-hero {
    padding: 18px;
  }
  .t-hero__top {
    flex-direction: column;
    align-items: stretch;
  }
  .t-hero__actions {
    justify-content: flex-start;
  }
  .t-hero__share-label {
    display: none;
  }
  .t-hero__title {
    font-size: 30px;
  }
  .lobby-card__head {
    flex-direction: column;
    align-items: stretch;
  }
  .lobby-card__search {
    width: 100%;
  }
  .participant-grid {
    grid-template-columns: 1fr;
    max-height: 460px;
  }
  .lobby-side {
    grid-template-columns: 1fr;
  }
  .lobby-side .lobby-start {
    grid-row: auto;
  }
  .section-title {
    font-size: 24px;
  }
  .bracket-card,
  .standings-card,
  .matches-card {
    padding: 15px;
  }
  .bracket__head {
    flex-direction: column;
    gap: 7px;
  }
  .bracket-grid {
    grid-template-columns: 1fr;
  }
  .bracket-side,
  .match-side {
    grid-template-columns: 1fr;
  }
  .round-tabs {
    margin: 0 -4px;
  }
  .standings-card__head {
    flex-direction: column;
    align-items: stretch;
  }
  .standings-card__search {
    width: 100%;
  }
  .standings-scroll {
    max-height: 420px;
  }
  .match-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "round status" "players players" "meta arrow";
    gap: 5px 8px;
  }
  .match-row__round {
    grid-area: round;
  }
  .match-row__players {
    grid-area: players;
  }
  .match-row__status {
    grid-area: status;
    text-align: right;
  }
  .match-row__meta {
    grid-area: meta;
    text-align: left;
  }
  .match-row__arrow {
    grid-area: arrow;
    text-align: right;
  }
  .admin-table-card__head {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-table-card__filters {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-table-card__filters .input-icon,
  .admin-table-card__filters .input--compact {
    width: 100%;
  }
  .admin-table-card__filters .input--compact {
    min-width: 0;
  }
  .rules-grid {
    grid-template-columns: 1fr;
  }
  .rules-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .auth-card {
    padding: 24px;
  }
  .auth-title {
    font-size: 28px;
  }
  .m-hero {
    padding: 15px;
  }
  .m-hero__top {
    align-items: flex-start;
  }
  .m-hero__share {
    display: none;
  }
  .m-hero__title-line {
    flex-direction: column;
    gap: 3px;
  }
  .m-hero__meta {
    gap: 5px 12px;
  }
  .match-layout {
    margin-top: 12px;
  }
  .board-tabs {
    display: flex;
  }
  .boards {
    display: block;
  }
  .boards .board-panel {
    display: none;
  }
  .boards.show-own .board-panel--own,
  .boards.show-enemy .board-panel--enemy {
    display: block;
  }
  .board {
    grid-template-columns: 18px repeat(10, minmax(0, 1fr));
    gap: 2px;
  }
  .board__label {
    font-size: 8px;
  }
  .board__label--top {
    height: 15px;
  }
  .board__label--side {
    width: 18px;
  }
  .board-panel {
    padding: 10px;
  }
  .board-panel__head {
    margin-bottom: 7px;
  }
  .board-panel__sub {
    display: none;
  }
  .board__cell {
    border-radius: 3px;
  }
  .turn-hud {
    padding: 12px 14px;
  }
  .turn-hud__body {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .turn-timer {
    width: 100%;
  }
  .turn-hud__label {
    font-size: 16px;
  }
  .placement-card {
    padding: 15px;
  }
  .placement-card__head {
    flex-direction: column;
  }
  .placement-side {
    display: flex;
  }
  .placement-panel {
    padding: 15px;
  }
  .result-card {
    padding: 24px 18px;
  }
  .result-stats {
    gap: 14px;
  }
  .result-actions {
    flex-direction: column;
    width: 100%;
  }
  .result-actions .btn {
    width: 100%;
  }
  .modal-overlay {
    padding: 10px;
  }
  .modal {
    max-height: calc(100vh - 20px);
  }
  .modal__header,
  .modal__body {
    padding-left: 15px;
    padding-right: 15px;
  }
  .modal__footer {
    padding: 0 15px 15px;
  }
  .modal__footer .btn {
    flex: 1;
  }
  .toasts {
    bottom: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .qr-modal__image {
    width: 210px;
    height: 210px;
  }
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer__links {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .join-code {
    padding: 5px;
  }
  .join-code .btn {
    height: 38px;
    padding: 0 12px;
  }
  .feature-strip {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .dashboard__hello {
    align-items: flex-start;
  }
  .dashboard__hello .avatar--lg {
    width: 48px;
    height: 48px;
    font-size: 17px;
  }
  .dashboard__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard__join .btn {
    flex: 0 0 auto;
  }
  .t-hero__share {
    flex-wrap: wrap;
  }
  .participant__kick {
    opacity: 1;
  }
  .bracket__title-line {
    flex-direction: column;
    gap: 2px;
  }
  .standings-table th,
  .standings-table td {
    padding: 7px 8px;
  }
  .standings-place {
    width: 40px;
  }
  .history-stats {
    display: grid;
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 20px;
  }
  .notfound-card,
  .error-card {
    padding: 28px 20px;
  }
  .notfound-code {
    font-size: 54px;
  }
  .confetti span {
    width: 5px;
    height: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================================
   Мобильная версия
   ========================================================================= */

html[data-platform="mobile"] {
  --m-nav-h: 64px;
}
html[data-platform="mobile"] body {
  background: radial-gradient(900px 520px at 50% -12%, rgba(45, 212, 191, 0.12), transparent 62%),
    linear-gradient(180deg, #06121f 0%, #04101c 100%);
}
html[data-platform="mobile"] body.has-sheet {
  overflow: hidden;
}
html[data-platform="mobile"] .mobile-main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 0 calc(var(--m-nav-h) + env(safe-area-inset-bottom) + 20px);
  flex: 1 0 auto;
}
html[data-platform="mobile"] .container {
  max-width: none;
  padding-left: 14px;
  padding-right: 14px;
}
html[data-platform="mobile"] .site-main,
html[data-platform="mobile"] .site-header,
html[data-platform="mobile"] .site-footer {
  display: none;
}

.m-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(4, 13, 23, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.m-header__inner {
  width: 100%;
  max-width: 760px;
  height: 56px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.m-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  flex: 0 0 auto;
}
.m-brand:hover {
  color: var(--text);
}
.m-brand__mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #04121c;
  background: linear-gradient(145deg, #5eead4, #38bdf8);
  flex: 0 0 auto;
}
.m-brand__text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.m-header__title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.m-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.m-icon-btn:hover {
  color: var(--text);
  background: rgba(125, 180, 215, 0.1);
}
.m-avatar-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
}
.m-login {
  height: 32px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.m-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 760px;
  height: calc(var(--m-nav-h) + env(safe-area-inset-bottom));
  padding: 5px 8px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(4, 13, 23, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 70;
}
.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.m-nav-item:hover {
  color: var(--text);
}
.m-nav-item.is-active {
  color: var(--teal);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.1), rgba(45, 212, 191, 0.02));
}
.m-nav-item__icon {
  display: grid;
  place-items: center;
  height: 24px;
}
.m-nav-item__label {
  line-height: 1.1;
}
body.mobile-immersive .m-bottom-nav,
body.mobile-auth .m-bottom-nav {
  display: none;
}
body.mobile-immersive .mobile-main {
  padding-bottom: 18px;
}
body.mobile-auth .mobile-main {
  padding-bottom: 20px;
}

/* bottom sheet */

.m-sheet__backdrop {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 8, 14, 0.64);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.m-sheet__backdrop.is-open {
  opacity: 1;
}
.m-sheet {
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 4px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  background: #0a1e30;
  box-shadow: 0 -30px 80px -30px #000;
  transform: translateY(30px);
  transition: transform 0.2s ease;
}
.m-sheet__backdrop.is-open .m-sheet {
  transform: translateY(0);
}
.m-sheet__grip {
  display: block;
  width: 38px;
  height: 4px;
  margin: 6px auto 10px;
  border-radius: 4px;
  background: rgba(125, 180, 215, 0.25);
}
.m-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 8px;
}
.m-sheet__head strong {
  font-size: 16px;
}
.m-sheet__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px 14px;
}
.m-sheet__profile > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.m-sheet__profile strong {
  font-size: 16px;
}
.m-sheet__profile span {
  color: var(--muted);
  font-size: 11px;
}
.m-sheet__links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.m-sheet__link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(125, 180, 215, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.m-sheet__link > span:first-child {
  color: var(--muted);
}
.m-sheet__link:hover {
  color: var(--teal);
}
.m-sheet__chev {
  margin-left: auto;
  color: var(--dim);
}
.m-sheet__guest {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 18px;
}
.m-sheet__guest h3 {
  font-size: 20px;
}
.m-sheet__guest p {
  font-size: 12px;
}
.m-sheet__section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.m-sheet__section-title {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.m-version {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.m-version__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 56px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 13, 23, 0.3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.m-version__btn.is-active {
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.08);
  color: var(--teal);
}
.m-sheet__hint {
  margin-top: 8px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.45;
}
.m-sheet__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 11px;
  background: rgba(251, 113, 133, 0.04);
  color: var(--coral);
  font-size: 13px;
  font-weight: 600;
}

/* mobile home */

.m-home {
  padding: 10px 14px 8px;
}
.m-home-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: radial-gradient(360px 220px at 100% 0%, rgba(45, 212, 191, 0.16), transparent 70%),
    linear-gradient(155deg, rgba(14, 42, 66, 0.85), rgba(7, 24, 39, 0.96));
  box-shadow: var(--shadow);
}
.m-home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--teal);
}
.m-home-hero__badge-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.18);
}
.m-home-hero__badge-text {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.m-home-hero__title {
  font-size: clamp(38px, 11vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.m-home-hero__title span {
  color: var(--sand);
}
.m-home-hero__title .text-gradient {
  color: transparent;
}
.m-home-hero__lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.m-home-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 18px;
}
.m-home-hero__facts {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.m-home-hero__facts span {
  display: flex;
  flex-direction: column;
  color: var(--dim);
  font-size: 9px;
}
.m-home-hero__facts strong {
  color: var(--text);
  font-size: 16px;
}
.m-join-wrap {
  margin-top: 14px;
}
.m-join__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.m-join {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(4, 13, 23, 0.5);
}
.m-join:focus-within {
  border-color: var(--teal);
}
.m-join__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  flex: 0 0 auto;
}
.m-join__input {
  border: 0;
  background: transparent;
  height: 32px;
  padding: 0 2px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.m-join__input:focus {
  box-shadow: none;
  background: transparent;
}
.m-join .btn {
  height: 32px;
  padding: 0 12px;
  flex: 0 0 auto;
}
.m-join__error {
  display: block;
  min-height: 14px;
  margin-top: 4px;
  color: var(--coral);
  font-size: 10px;
}
.m-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}
.m-feature {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8, 27, 44, 0.42);
}
.m-feature__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
}
.m-feature__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.m-feature strong {
  font-size: 10px;
}
.m-feature__text span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}
.m-section {
  margin-top: 20px;
}
.m-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.m-section__title {
  font-size: 18px;
  letter-spacing: -0.02em;
}
.m-section__more {
  margin-top: 10px;
  font-size: 12px;
}
.m-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 27, 44, 0.38);
}
.m-step__num {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
  padding-top: 1px;
}
.m-step > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.m-step strong {
  font-size: 12px;
}
.m-step span:last-child {
  color: var(--muted);
  font-size: 10px;
}
.m-eyebrow {
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* mobile dashboard */

.m-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px 14px;
}
.m-greeting__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.m-greeting__title {
  font-size: 24px;
  letter-spacing: -0.035em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-greeting__sub {
  color: var(--muted);
  font-size: 11px;
}
.m-live-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  margin-bottom: 10px;
  border: 1px solid rgba(242, 200, 121, 0.3);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(242, 200, 121, 0.1), rgba(8, 27, 44, 0.6));
  color: var(--text);
}
.m-live-card:hover {
  color: var(--text);
  border-color: rgba(242, 200, 121, 0.5);
}
.m-live-card__mark {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 9px;
  border-right: 1px solid var(--line);
  color: var(--sand);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  flex: 0 0 auto;
}
.m-live-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.m-live-card__body strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-live-card__body span {
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-live-card__cta {
  margin-left: auto;
  color: var(--sand);
}
.m-quick-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 7px;
  margin-bottom: 10px;
}
.m-quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  gap: 2px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 27, 44, 0.45);
  color: var(--text);
}
.m-quick-card--primary {
  background: radial-gradient(220px 120px at 100% 0%, rgba(45, 212, 191, 0.16), transparent 70%),
    rgba(8, 27, 44, 0.55);
  border-color: rgba(45, 212, 191, 0.24);
}
.m-quick-card__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border-radius: 10px;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.09);
}
.m-quick-card strong {
  font-size: 12px;
}
.m-quick-card > span:last-child {
  color: var(--muted);
  font-size: 9px;
}
.m-quick-card .m-join-wrap {
  width: 100%;
  margin-top: 7px;
}
.m-quick-card .m-join__label {
  display: none;
}
.m-quick-card .m-join {
  padding: 3px;
}
.m-quick-card .m-join__icon {
  display: none;
}
.m-quick-card .m-join__input {
  font-size: 13px;
  letter-spacing: 0.1em;
}
.m-quick-card .m-join .btn {
  height: 28px;
  padding: 0 8px;
  font-size: 10px;
}
.m-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 4px;
}
.m-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 10px 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 27, 44, 0.35);
}
.m-stats strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}
.m-stats span {
  color: var(--muted);
  font-size: 9px;
}
.m-tournament-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.m-tournament-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 30px 11px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8, 27, 44, 0.4);
  color: var(--text);
}
.m-tournament-row:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.m-tournament-row.has-match {
  border-color: rgba(242, 200, 121, 0.28);
}
.m-tournament-row.is-archived {
  opacity: 0.75;
}
.m-tournament-row__top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.m-tournament-row__role {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.m-tournament-row__code {
  margin-left: auto;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.m-tournament-row__name {
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.m-tournament-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 9px;
  color: var(--muted);
  font-size: 9px;
}
.m-tournament-row__match {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--sand);
  font-size: 9px;
}
.m-tournament-row__winner {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--sand);
  font-size: 9px;
}
.m-tournament-row__arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
}
.m-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 22px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
}
.m-empty__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  margin-bottom: 3px;
}
.m-empty strong {
  font-size: 12px;
}
.m-empty p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

/* mobile tournament tabs */

.m-tabs {
  position: sticky;
  top: 57px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin: 10px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 13, 23, 0.86);
  backdrop-filter: blur(12px);
}
.m-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}
.m-tab.is-active {
  background: rgba(45, 212, 191, 0.1);
  color: var(--teal);
}
.m-tab span:first-child {
  display: grid;
  place-items: center;
}
.m-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* platform switch in desktop footer */

.footer-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.footer-link-btn:hover {
  color: var(--text);
}

/* mobile modal / toasts / auth */

html[data-platform="mobile"] .toasts {
  bottom: calc(var(--m-nav-h) + env(safe-area-inset-bottom) + 10px);
  left: 12px;
  right: 12px;
  max-width: 460px;
  margin: 0 auto;
}
html[data-platform="mobile"] body.mobile-immersive .toasts,
html[data-platform="mobile"] body.mobile-auth .toasts {
  bottom: 12px;
}
html[data-platform="mobile"] .modal-overlay {
  align-items: flex-end;
  padding: 0;
}
html[data-platform="mobile"] .modal {
  max-width: 760px;
  max-height: 92vh;
  border-radius: 22px 22px 0 0;
  border-bottom: 0;
}
html[data-platform="mobile"] .modal__header {
  padding-top: 16px;
}
html[data-platform="mobile"] .boot-screen__logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
}
html[data-platform="mobile"] .auth-page {
  padding-top: 10px;
  gap: 16px;
  min-height: 0;
}
html[data-platform="mobile"] .auth-main {
  max-width: none;
  justify-self: stretch;
  padding: 0 14px;
}
html[data-platform="mobile"] .auth-card {
  padding: 22px 18px;
}
html[data-platform="mobile"] .auth-title {
  font-size: 28px;
}
html[data-platform="mobile"] .auth-visual {
  display: none;
}
html[data-platform="mobile"] .auth-side-note {
  margin: 0 2px;
}

/* mobile page tweaks */

html[data-platform="mobile"] .page-head {
  margin-bottom: 18px;
}
html[data-platform="mobile"] .page-title {
  font-size: 30px;
}
html[data-platform="mobile"] .page-subtitle {
  font-size: 12px;
}
html[data-platform="mobile"] .t-hero {
  padding: 15px;
  border-radius: 16px;
}
html[data-platform="mobile"] .t-hero__title {
  margin-top: 12px;
  font-size: 27px;
}
html[data-platform="mobile"] .t-hero__meta {
  margin-top: 8px;
  gap: 4px 12px;
}
html[data-platform="mobile"] .t-hero__meta .meta-item {
  font-size: 10px;
}
html[data-platform="mobile"] .t-hero__actions {
  gap: 5px;
}
html[data-platform="mobile"] .membership-badge {
  display: none;
}
html[data-platform="mobile"] .create-layout,
html[data-platform="mobile"] .lobby-layout,
html[data-platform="mobile"] .bracket-layout,
html[data-platform="mobile"] .match-layout,
html[data-platform="mobile"] .result-layout {
  grid-template-columns: 1fr;
  margin-top: 10px;
  gap: 10px;
}
html[data-platform="mobile"] .lobby-side,
html[data-platform="mobile"] .bracket-side,
html[data-platform="mobile"] .match-side,
html[data-platform="mobile"] .placement-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
html[data-platform="mobile"] .board-tabs {
  display: flex;
}
html[data-platform="mobile"] .boards {
  display: block;
}
html[data-platform="mobile"] .boards .board-panel {
  display: none;
}
html[data-platform="mobile"] .boards.show-own .board-panel--own,
html[data-platform="mobile"] .boards.show-enemy .board-panel--enemy {
  display: block;
}
html[data-platform="mobile"] .lobby-card,
html[data-platform="mobile"] .bracket-card,
html[data-platform="mobile"] .standings-card,
html[data-platform="mobile"] .matches-card {
  padding: 14px;
  border-radius: 16px;
}
html[data-platform="mobile"] .participant-grid {
  grid-template-columns: 1fr;
  max-height: 50vh;
}
html[data-platform="mobile"] .lobby-card__head {
  gap: 8px;
}
html[data-platform="mobile"] .lobby-card__search {
  width: 100%;
}
html[data-platform="mobile"] .standings-scroll {
  max-height: 58vh;
}
html[data-platform="mobile"] .standings-table {
  table-layout: fixed;
}
html[data-platform="mobile"] .standings-table th,
html[data-platform="mobile"] .standings-table td {
  padding: 8px 6px;
}
html[data-platform="mobile"] .standings-table th:nth-child(1),
html[data-platform="mobile"] .standings-table td:nth-child(1) {
  width: 38px;
}
html[data-platform="mobile"] .standings-table th:nth-child(3),
html[data-platform="mobile"] .standings-table td:nth-child(3) {
  width: 78px;
}
html[data-platform="mobile"] .standings-table th:nth-child(4),
html[data-platform="mobile"] .standings-table td:nth-child(4) {
  width: 54px;
}
html[data-platform="mobile"] .standings-player {
  gap: 5px;
}
html[data-platform="mobile"] .standings-player .avatar {
  width: 22px;
  height: 22px;
  font-size: 8px;
}
html[data-platform="mobile"] .outcome {
  height: 19px;
  padding: 0 5px;
  font-size: 9px;
}
html[data-platform="mobile"] .standings-table th:nth-child(5),
html[data-platform="mobile"] .standings-table td:nth-child(5),
html[data-platform="mobile"] .standings-table th:nth-child(6),
html[data-platform="mobile"] .standings-table td:nth-child(6) {
  display: none;
}
html[data-platform="mobile"] .round-tabs {
  flex-wrap: wrap;
  overflow: visible;
}
html[data-platform="mobile"] .round-tab {
  flex: 1 1 calc(33.333% - 4px);
  justify-content: center;
  gap: 4px;
  padding: 0 5px;
  font-size: 10px;
}
html[data-platform="mobile"] .round-tab__meta {
  font-size: 8px;
}
html[data-platform="mobile"] .bracket-grid {
  max-height: 62vh;
  grid-template-columns: 1fr;
}
html[data-platform="mobile"] .round-plan__head {
  display: block;
}
html[data-platform="mobile"] .round-plan__head p {
  margin-top: 5px;
  text-align: left;
}
html[data-platform="mobile"] .round-plan__table {
  min-width: 590px;
  font-size: 10px;
}
html[data-platform="mobile"] .t-section {
  margin-top: 10px;
}
html[data-platform="mobile"] .matches-card__head {
  gap: 6px;
}
html[data-platform="mobile"] .match-row {
  padding: 9px 4px;
}
html[data-platform="mobile"] .schedule-list .schedule-row {
  padding: 8px 0;
}
html[data-platform="mobile"] .m-info .side-card {
  padding: 15px;
}
html[data-platform="mobile"] .m-info .side-card + .side-card {
  margin-top: 0;
}

/* mobile match */

html[data-platform="mobile"] .match-page {
  padding-top: 0;
}
html[data-platform="mobile"] .m-hero {
  padding: 13px 14px;
  border-radius: 16px;
}
html[data-platform="mobile"] .m-hero__title {
  font-size: 26px;
}
html[data-platform="mobile"] .m-hero__share {
  display: none;
}
html[data-platform="mobile"] .m-hero__meta {
  font-size: 10px;
}
html[data-platform="mobile"] .match-layout {
  margin-top: 10px;
  gap: 10px;
}
html[data-platform="mobile"] .turn-hud {
  position: sticky;
  top: 57px;
  z-index: 18;
  padding: 11px 12px;
  margin-bottom: 9px;
  border-radius: 13px;
  background: rgba(8, 27, 44, 0.94);
  backdrop-filter: blur(12px);
}
html[data-platform="mobile"] .turn-hud__label {
  font-size: 15px;
}
html[data-platform="mobile"] .board-tabs {
  margin-bottom: 7px;
}
html[data-platform="mobile"] .board-panel {
  padding: 9px;
  border-radius: 13px;
}
html[data-platform="mobile"] .board-panel__title {
  font-size: 13px;
}
html[data-platform="mobile"] .move-log {
  padding: 14px;
}
html[data-platform="mobile"] .move-log__list {
  max-height: 220px;
}
html[data-platform="mobile"] .duel-card,
html[data-platform="mobile"] .placement-panel {
  padding: 14px;
}
html[data-platform="mobile"] .result-card {
  padding: 22px 16px;
}
html[data-platform="mobile"] .result-card__title {
  font-size: 30px;
}
html[data-platform="mobile"] .result-main {
  gap: 10px;
}

@media (max-width: 390px) {
  html[data-platform="mobile"] .m-header__title {
    display: none;
  }
  html[data-platform="mobile"] .m-quick-grid {
    grid-template-columns: 1fr;
  }
  html[data-platform="mobile"] .m-quick-card .m-join__label {
    display: block;
  }
  html[data-platform="mobile"] .m-quick-card .m-join__icon {
    display: grid;
  }
  html[data-platform="mobile"] .m-feature-grid {
    grid-template-columns: 1fr;
  }
  html[data-platform="mobile"] .m-feature {
    flex-direction: row;
    align-items: center;
  }
  html[data-platform="mobile"] .m-feature__icon {
    margin: 0 2px 0 0;
  }
  html[data-platform="mobile"] .boards {
    display: block;
  }
  html[data-platform="mobile"] .boards .board-panel {
    display: none;
  }
  html[data-platform="mobile"] .boards.show-own .board-panel--own,
  html[data-platform="mobile"] .boards.show-enemy .board-panel--enemy {
    display: block;
  }
}

/* --------------------------------------------------------------- light theme */
html[data-theme="light"] {
  --bg: #f2f8fc;
  --bg-deep: #e7f0f7;
  --bg-2: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --panel-2: #edf6fb;
  --line: rgba(20, 55, 78, 0.15);
  --line-strong: rgba(20, 55, 78, 0.28);
  --text: #102a3b;
  --muted: #4d6678;
  --dim: #6c8496;
  --teal: #0f766e;
  --cyan: #0369a1;
  --blue: #2563eb;
  --sand: #a16207;
  --coral: #be123c;
  --lime: #4d7c0f;
  --shadow: 0 24px 60px -34px rgba(25, 57, 79, 0.32);
}

html[data-theme="light"] body {
  color: var(--text);
  background:
    radial-gradient(1000px 680px at 78% -12%, rgba(13, 148, 136, 0.1), transparent 62%),
    radial-gradient(900px 650px at -8% 26%, rgba(2, 132, 199, 0.08), transparent 60%),
    linear-gradient(180deg, #f7fbfe 0%, #eaf3f9 100%);
}
html[data-theme="light"] body::before {
  background-image: linear-gradient(rgba(20, 55, 78, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 55, 78, 0.055) 1px, transparent 1px);
  opacity: 0.55;
}
html[data-theme="light"] .site-header,
html[data-theme="light"] .m-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(16, 42, 59, 0.45);
}
html[data-theme="light"] .m-bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  box-shadow: 0 -8px 24px -20px rgba(16, 42, 59, 0.45);
}
html[data-theme="light"] .mobile-menu,
html[data-theme="light"] .user-dropdown,
html[data-theme="light"] .m-sheet,
html[data-theme="light"] .modal,
html[data-theme="light"] .m-sheet__backdrop,
html[data-theme="light"] .site-footer {
  background-color: #ffffff;
  color: var(--text);
}
html[data-theme="light"] .mobile-menu,
html[data-theme="light"] .user-dropdown,
html[data-theme="light"] .m-sheet,
html[data-theme="light"] .modal {
  border-color: var(--line);
  box-shadow: 0 18px 50px -28px rgba(16, 42, 59, 0.3);
}
html[data-theme="light"] .site-footer {
  border-top-color: var(--line);
}
html[data-theme="light"] .card,
html[data-theme="light"] .m-card,
html[data-theme="light"] .participant,
html[data-theme="light"] .board-panel,
html[data-theme="light"] .bracket-tree-scroll,
html[data-theme="light"] .match-card,
html[data-theme="light"] .live-banner,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .side-card,
html[data-theme="light"] .placement-panel,
html[data-theme="light"] .duel-card,
html[data-theme="light"] .standings-card,
html[data-theme="light"] .bracket-card {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 12px 34px -28px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .card {
  background: linear-gradient(155deg, #ffffff, #f4f9fc);
}
html[data-theme="light"] .tree-match::before {
  background: rgba(247, 251, 254, 0.9);
  border-color: rgba(20, 55, 78, 0.38);
}
html[data-theme="light"] .tree-match.is-current::before,
html[data-theme="light"] .tree-match.is-mine::before,
html[data-theme="light"] .tree-match--playing::before {
  border-color: rgba(15, 118, 110, 0.7);
}
html[data-theme="light"] .tree-player-box {
  background: #ffffff;
  border-color: rgba(20, 55, 78, 0.45);
  box-shadow: 0 5px 14px -14px rgba(16, 42, 59, 0.4);
}
html[data-theme="light"] .tree-player--empty {
  background: #f4f9fc;
  border-color: rgba(20, 55, 78, 0.34);
}
html[data-theme="light"] .tree-match.is-current .tree-player-box,
html[data-theme="light"] .tree-match.is-mine .tree-player-box {
  border-color: rgba(15, 118, 110, 0.75);
}
html[data-theme="light"] .tree-player.is-winner {
  border-color: rgba(15, 118, 110, 0.85);
}
html[data-theme="light"] .tree-player.is-winner {
  background: #eefaf7;
  border-color: rgba(15, 118, 110, 0.55);
}
html[data-theme="light"] .tree-match__replay {
  background: #ffffff;
  border-color: var(--line);
}
html[data-theme="light"] .bracket-tree-scroll {
  background: #f7fbfe;
}
html[data-theme="light"] .bracket-tree__links path {
  stroke: rgba(20, 55, 78, 0.32);
}
html[data-theme="light"] .input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .search,
html[data-theme="light"] .input--search {
  background: #ffffff;
  color: var(--text);
  border-color: var(--line-strong);
}
html[data-theme="light"] .input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] input[type="search"] {
  background: #ffffff !important;
  color: var(--text) !important;
  color-scheme: light;
}
html[data-theme="light"] .input:focus {
  background: #ffffff !important;
}
html[data-theme="light"] .input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #617b8d;
  opacity: 1;
}
html[data-theme="light"] .share-card__url,
html[data-theme="light"] .code-chip,
html[data-theme="light"] .invite-link,
html[data-theme="light"] .copy-field {
  background: #eef6fb;
  color: var(--text);
  border-color: var(--line);
}
html[data-theme="light"] .btn--ghost {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--text);
}
html[data-theme="light"] .btn--ghost:hover {
  background: #eef6fb;
  border-color: var(--teal);
}
html[data-theme="light"] .icon-btn {
  background: #ffffff;
  border-color: var(--line);
  color: var(--muted);
}
html[data-theme="light"] .icon-btn:hover {
  background: #eef6fb;
  color: var(--text);
}
html[data-theme="light"] .user-toggle {
  background: #ffffff;
  border-color: var(--line);
}
html[data-theme="light"] .user-toggle:hover,
html[data-theme="light"] .user-dropdown__item:hover {
  background: #eef6fb;
}
html[data-theme="light"] .site-header,
html[data-theme="light"] .m-header,
html[data-theme="light"] .m-bottom-nav,
html[data-theme="light"] .m-sheet__link,
html[data-theme="light"] .modal__header,
html[data-theme="light"] .modal__footer {
  border-color: var(--line);
}
html[data-theme="light"] .board {
  background: #e8f1f7;
}
html[data-theme="light"] .board__cell {
  background: transparent;
  border-color: rgba(20, 55, 78, 0.14);
}
html[data-theme="light"] .board__cell.is-ship {
  background: transparent !important;
  border-color: transparent !important;
}
html[data-theme="light"] .board__cell.has-ship-art {
  background: transparent !important;
  border-color: transparent !important;
}
html[data-theme="light"] .board__cell.is-ship {
  background: linear-gradient(160deg, #7aa6b7, #4b7c90);
  border-color: rgba(20, 55, 78, 0.3);
}

html[data-theme="light"] .board__cell.is-miss::after {
  background: #c7d8e3;
  border-color: rgba(20, 55, 78, 0.3);
}
html[data-theme="light"] .board__cell.is-ghost-valid {
  background: rgba(13, 148, 136, 0.18);
}
html[data-theme="light"] .board__cell.is-ghost-invalid {
  background: rgba(190, 18, 60, 0.1);
}
html[data-theme="light"] .board--enemy:not(.board--history) .board__cell:not(:disabled):hover {
  background: rgba(13, 148, 136, 0.12);
}
html[data-theme="light"] .tree-match.is-clickable:hover .tree-player-box,
html[data-theme="light"] .tree-match.is-clickable:focus-visible .tree-player-box {
  background: #f2faf9;
}
html[data-theme="light"] .hero-visual {
  background: transparent;
  border-color: transparent;
}
html[data-theme="light"] .m-home-hero {
  background: linear-gradient(155deg, #ffffff, #eaf4fa);
  border-color: var(--line);
}
html[data-theme="light"] .float-card,
html[data-theme="light"] .feature-strip__item,
html[data-theme="light"] .m-feature,
html[data-theme="light"] .m-quick-card {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="light"] .site-footer__links a,
html[data-theme="light"] .site-footer__brand,
html[data-theme="light"] .muted {
  color: var(--muted);
}
html[data-theme="light"] .brand__mark,
html[data-theme="light"] .m-brand__mark {
  color: #062735;
}
html[data-theme="light"] .qr-modal__image,
html[data-theme="light"] .qr-card {
  background: #ffffff;
}
html[data-theme="light"] .table th,
html[data-theme="light"] .standings-table th,
html[data-theme="light"] .admin-table th {
  background: #eef6fb !important;
  color: var(--muted) !important;
}
html[data-theme="light"] .main-nav a {
  color: var(--muted);
}
html[data-theme="light"] .main-nav a:hover,
html[data-theme="light"] .main-nav a.is-active {
  color: var(--text);
}
html[data-theme="light"] .turn-hud,
html[data-theme="light"] .turn-hud.is-you {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 10px 28px -28px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .turn-hud.is-you {
  background: linear-gradient(100deg, #effbf8, #ffffff 70%);
}
html[data-theme="light"] .duel-card__forfeit {
  background: #ffffff;
  color: var(--coral);
  border-color: rgba(190, 18, 60, 0.3);
}
html[data-theme="light"] .m-live-card,
html[data-theme="light"] .m-quick-card,
html[data-theme="light"] .m-quick-card--primary,
html[data-theme="light"] .m-join,
html[data-theme="light"] .m-stats > div,
html[data-theme="light"] .m-tournament-row {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="light"] .m-live-card {
  background: linear-gradient(100deg, #effbf8, #ffffff 70%);
}
html[data-theme="light"] .m-join {
  background: #f3f9fc;
}
html[data-theme="light"] .m-join__input,
html[data-theme="light"] .m-join__input:focus {
  background: transparent !important;
  color: var(--text);
}
html[data-theme="light"] .m-live-card__body span,
html[data-theme="light"] .m-tournament-row__meta,
html[data-theme="light"] .m-stats span {
  color: var(--muted);
}
html[data-theme="light"] .table td {
  border-color: var(--line);
}
html[data-theme="light"] .placement-controls .btn,
html[data-theme="light"] .ship-choice {
  background: #ffffff;
  border-color: var(--line);
}
html[data-theme="light"] .ship-choice.is-selected {
  background: #e7f7f4;
}
html[data-theme="light"] .schedule-preview__row {
  background: #f3f9fc;
}
html[data-theme="light"] .schedule-preview__row:nth-child(odd) {
  background: #eaf4fa;
}
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #e7f0f7;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(20, 55, 78, 0.2);
}
html[data-theme="light"] .feature-strip {
  background: #e4f1f8;
  border-color: var(--line);
}
html[data-theme="light"] .m-tabs {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
  box-shadow: 0 10px 26px -24px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .m-tab {
  color: var(--muted);
}
html[data-theme="light"] .m-tab.is-active {
  background: #e7f7f4;
  color: var(--teal);
}
html[data-theme="light"] .m-step {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 10px 24px -26px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .rules-cta {
  background: linear-gradient(140deg, #ffffff, #eaf6fb);
  border-color: var(--line);
}
html[data-theme="light"] .rules-cta h2 {
  color: var(--text);
}
html[data-theme="light"] .m-version__btn {
  background: #ffffff;
  border-color: var(--line);
  color: var(--muted);
}
html[data-theme="light"] .m-version__btn.is-active {
  background: #e7f7f4;
  border-color: rgba(15, 118, 110, 0.42);
  color: var(--teal);
}
html[data-theme="light"] .pause-ready {
  background: linear-gradient(120deg, #fff8e8, #f7fbfd);
  border-color: rgba(161, 98, 7, 0.28);
}
html[data-theme="light"] .pause-ready__text b {
  color: #9a5b00;
}
html[data-theme="light"] .board-tab {
  background: #ffffff;
  border-color: var(--line);
  color: var(--muted);
}
html[data-theme="light"] .board-tab.is-active {
  background: #e7f7f4;
  border-color: rgba(15, 118, 110, 0.42);
  color: var(--text);
}
html[data-theme="light"] .empty-state-card {
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px -28px rgba(16, 42, 59, 0.3);
}
html[data-theme="light"] .empty-state-card__icon {
  background: #e7f7f4;
}
html[data-theme="light"] .history-stat {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 8px 22px -24px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .radar {
  background: radial-gradient(
    circle at 50% 50%,
    rgba(13, 148, 136, 0.08),
    rgba(255, 255, 255, 0.62) 58%,
    transparent 72%
  );
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: inset 0 0 90px rgba(13, 148, 136, 0.06),
    0 0 120px -50px rgba(15, 118, 110, 0.35);
}
html[data-theme="light"] .radar__center {
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 0 30px rgba(15, 118, 110, 0.12);
}
html[data-theme="light"] .t-card {
  background: linear-gradient(155deg, #ffffff, #f1f9fd 82%);
  border-color: var(--line);
  color: var(--text);
  box-shadow: 0 12px 30px -26px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .t-card:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 18px 34px -26px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .t-card__my-match {
  background: #fff8e8;
  border-color: rgba(161, 98, 7, 0.22);
}
html[data-theme="light"] .t-card__progress {
  background: rgba(16, 42, 59, 0.1);
}
html[data-theme="light"] .step {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 12px 28px -26px rgba(16, 42, 59, 0.3);
}
html[data-theme="light"] .cta-panel {
  background: radial-gradient(800px 300px at 20% 0%, rgba(13, 148, 136, 0.12), transparent 60%),
    linear-gradient(140deg, #ffffff, #eaf6fb);
  border-color: rgba(15, 118, 110, 0.24);
}
html[data-theme="light"] .cta-panel h2 {
  color: var(--text);
}
html[data-theme="light"] .join-code {
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: 0 10px 26px -24px rgba(16, 42, 59, 0.4);
}
html[data-theme="light"] .join-code__icon {
  background: #e7f7f4;
  color: var(--teal);
}
html[data-theme="light"] .join-code__input {
  color: var(--text);
}
html[data-theme="light"] .join-code__input::placeholder {
  color: #6c8496;
  opacity: 1;
}
html[data-theme="light"] .result-card {
  background: linear-gradient(155deg, #ffffff, #edf7fb);
  border-color: var(--line);
  box-shadow: 0 18px 40px -30px rgba(16, 42, 59, 0.35);
}
html[data-theme="light"] .result-card--win {
  background: radial-gradient(600px 240px at 50% 0%, rgba(161, 98, 7, 0.12), transparent 70%),
    linear-gradient(155deg, #ffffff, #f2fbf8);
  border-color: rgba(161, 98, 7, 0.28);
}
html[data-theme="light"] .result-card--lose {
  background: radial-gradient(600px 240px at 50% 0%, rgba(190, 18, 60, 0.08), transparent 70%),
    linear-gradient(155deg, #ffffff, #f8f2f4);
  border-color: rgba(190, 18, 60, 0.2);
}
html[data-theme="light"] .result-card__icon {
  background: #f1f7fa;
  border-color: var(--line);
}
html[data-theme="light"] .result-card--win .result-card__icon {
  background: #fdf6e7;
  border-color: rgba(161, 98, 7, 0.24);
}
html[data-theme="light"] .result-card--lose .result-card__icon {
  background: #fdf0f3;
  border-color: rgba(190, 18, 60, 0.18);
}
html[data-theme="light"] .result-card__title {
  color: var(--text);
}
html[data-theme="light"] .audio-control__popover {
  background: #ffffff;
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: 0 14px 36px -20px rgba(16, 42, 59, 0.4);
}
html[data-theme="light"] .audio-control__slider {
  color-scheme: light;
}

/* Телефон в горизонтальной ориентации: оба поля рядом, без переключения. */
@media (orientation: landscape) and (max-width: 1100px) {
  html[data-platform="mobile"] .match-layout.battle-layout {
    display: block;
    margin-top: 6px;
  }
  html[data-platform="mobile"] .battle-main {
    width: 100%;
  }
  html[data-platform="mobile"] .board-tabs {
    display: none;
  }
  html[data-platform="mobile"] .turn-hud {
    position: static;
    margin-bottom: 6px;
    padding: 8px 10px;
  }
  html[data-platform="mobile"] .turn-hud__sub {
    display: none;
  }
  html[data-platform="mobile"] .boards {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }
  html[data-platform="mobile"] .boards .board-panel {
    display: block;
    flex: 0 1 auto;
    width: auto;
    padding: 5px;
    border-radius: 10px;
  }
  html[data-platform="mobile"] .boards.own-fleet-hidden .board-panel--own {
    display: none;
  }
  html[data-platform="mobile"] .board-panel__head {
    margin-bottom: 3px;
  }
  html[data-platform="mobile"] .board-panel__sub {
    display: none;
  }
  html[data-platform="mobile"] .board-panel__title {
    font-size: 10px;
  }
  html[data-platform="mobile"] .board {
    width: min(
      calc((100vw - 30px) / 2),
      clamp(240px, calc(100dvh - 120px), 460px)
    );
    max-width: none;
    margin: 0 auto;
    gap: 2px;
  }
  html[data-platform="mobile"] .board__cell {
    border-radius: 2px;
  }
  html[data-platform="mobile"] .board__label {
    font-size: 7px;
  }
  html[data-platform="mobile"] .battle-layout > .match-side {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 8px;
  }

  /* Компактная шапка, чтобы расстановка помещалась в экран. */
  html[data-platform="mobile"] .m-hero {
    padding: 8px 10px;
    border-radius: 12px;
  }
  html[data-platform="mobile"] .m-hero__top {
    gap: 5px;
  }
  html[data-platform="mobile"] .m-hero .back-link {
    font-size: 10px;
  }
  html[data-platform="mobile"] .m-hero .match-status {
    font-size: 9px;
    padding: 2px 6px;
  }
  html[data-platform="mobile"] .m-hero__title-line {
    margin: 3px 0 0;
  }
  html[data-platform="mobile"] .match-page--placing .m-hero__title-line,
  html[data-platform="mobile"] .match-page--placing .m-hero__meta {
    display: none;
  }
  html[data-platform="mobile"] .m-hero__title {
    font-size: 19px;
  }
  html[data-platform="mobile"] .m-hero__tournament {
    font-size: 10px;
  }
  html[data-platform="mobile"] .m-hero__meta {
    display: none;
  }
  html[data-platform="mobile"] .quick-room {
    margin: 5px 0 2px;
    padding: 4px 6px;
    gap: 4px;
  }
  html[data-platform="mobile"] .quick-room__label {
    font-size: 8px;
  }
  html[data-platform="mobile"] .quick-room__code {
    font-size: 12px;
  }
  html[data-platform="mobile"] .quick-room__actions .btn {
    padding: 3px 7px;
    font-size: 10px;
  }

  /* Расстановка в ландшафте: поле слева, корабли справа. */
  html[data-platform="mobile"] .match-layout.placement-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(225px, 36vw);
    gap: 8px;
    align-items: start;
  }
  html[data-platform="mobile"] .placement-layout .placement-card {
    padding: 8px;
  }
  html[data-platform="mobile"] .placement-layout .placement-card__head {
    margin-bottom: 5px;
  }
  html[data-platform="mobile"] .placement-layout .placement-card__head .muted {
    display: none;
  }
  html[data-platform="mobile"] .placement-layout .section-title {
    font-size: 17px;
  }
  html[data-platform="mobile"] .placement-layout .board {
    width: min(100%, calc(100dvh - 150px));
    max-width: 100%;
    margin: 0 auto;
  }
  html[data-platform="mobile"] .placement-layout .placement-card__hint {
    margin-top: 5px;
    font-size: 9px;
  }
  html[data-platform="mobile"] .placement-layout .placement-side {
    display: block;
    position: static;
    max-height: calc(100dvh - 100px);
    overflow: auto;
  }
  html[data-platform="mobile"] .placement-layout .placement-panel {
    padding: 9px;
  }
  html[data-platform="mobile"] .placement-layout .ship-palette {
    gap: 4px;
    margin-bottom: 8px;
  }
  html[data-platform="mobile"] .placement-layout .ship-choice {
    min-height: 31px;
    padding: 3px 5px;
  }
  html[data-platform="mobile"] .placement-layout .ship-choice__art {
    height: 24px;
  }
  html[data-platform="mobile"] .placement-layout .placement-controls {
    gap: 4px;
  }
}
html[data-platform="mobile"] .cards-grid--tournaments {
  grid-template-columns: 1fr;
}
html[data-platform="mobile"] .t-card {
  min-width: 0;
  overflow: hidden;
}
html[data-platform="mobile"] .t-card__top {
  flex-wrap: wrap;
  gap: 6px;
}
html[data-platform="mobile"] .t-card__role {
  display: none;
}
html[data-platform="mobile"] .t-card__code {
  margin-left: auto;
}
html[data-platform="mobile"] .t-card__name,
html[data-platform="mobile"] .t-card__winner {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  html .cards-grid--tournaments {
    grid-template-columns: 1fr;
  }
  html .t-card {
    min-width: 0;
    overflow: hidden;
  }
  html .t-card__top {
    flex-wrap: wrap;
    gap: 6px;
  }
  html .t-card__role {
    display: none;
  }
  html .t-card__code {
    margin-left: auto;
  }
  html .t-card__name,
  html .t-card__winner {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
.t-card__top {
  flex-wrap: wrap;
}
.t-card__role {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.t-card__code {
  margin-left: auto;
}
@media (max-width: 900px) {
  .t-card__role {
    display: none;
  }
  html .cards-grid--tournaments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  html .cards-grid--tournaments {
    grid-template-columns: 1fr;
  }
}
.spectator-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
}
.spectator-note > span {
  display: grid;
  place-items: center;
  color: var(--teal);
  flex: 0 0 auto;
}
.turn-hud.is-spectator {
  background: var(--panel-2);
}
.spectator-side p {
  font-size: 12px;
}
.spectator-players {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  font-size: 12px;
}
.spectator-players span:nth-child(2) {
  color: var(--dim);
  font-size: 10px;
}
.boards--spectator .board-panel {
  min-width: 0;
}
.result-stats--spectator {
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 480px);
  gap: 7px;
}
.spectator-result-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  font-size: 11px;
}
.spectator-result-stat strong {
  font-size: 12px;
}
.spectator-result-stat span {
  color: var(--muted);
  text-align: right;
}
.spectator-result-stat.is-winner {
  border-color: rgba(161, 98, 7, 0.35);
  background: rgba(242, 200, 121, 0.1);
}
html[data-theme="light"] .spectator-result-stat {
  background: #f2f8fb;
}
html[data-theme="light"] .spectator-result-stat.is-winner {
  background: #fff8e8;
  border-color: rgba(161, 98, 7, 0.25);
}
html[data-platform="mobile"] .boards.boards--spectator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
html[data-platform="mobile"] .boards.boards--spectator .board-panel {
  display: block;
}
@media (max-width: 700px) {
  html .boards.boards--spectator {
    grid-template-columns: 1fr;
  }
}
.organizer-watch-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(242, 200, 121, 0.28);
  border-radius: 11px;
  background: rgba(242, 200, 121, 0.08);
  color: var(--muted);
  font-size: 12px;
}
.organizer-watch-note > span:first-child {
  display: grid;
  place-items: center;
  color: var(--sand);
  flex: 0 0 auto;
}
html[data-theme="light"] .organizer-watch-note {
  background: #fff8e8;
  border-color: rgba(161, 98, 7, 0.24);
  color: #6b4e16;
}
.bracket-tree__links path.is-lucky {
  stroke: #e05b5b;
  stroke-width: 2.2;
  stroke-dasharray: 5 4;
}

.bracket__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.bracket__expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bracket-modal {
  max-width: min(1340px, 96vw);
}
.bracket-modal .modal__body {
  padding: 0;
  overflow: hidden;
}
.bracket-modal .bracket-tree-scroll {
  max-height: calc(100vh - 190px);
  border: 0;
  border-radius: 0;
}
@media (max-width: 700px) {
  .bracket__tools {
    width: 100%;
    justify-content: space-between;
  }
  .bracket-modal {
    max-width: 96vw;
  }
}
.bracket__rounds {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.bracket__rounds .input {
  width: auto;
  height: 32px;
  padding: 0 28px 0 10px;
}
.bracket-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.bracket-legend__line {
  width: 30px;
  height: 0;
  border-top: 2px dashed #e05b5b;
  flex: 0 0 auto;
}
html[data-theme="light"] .bracket-legend__line {
  border-top-color: #c0392b;
}
