:root {
  color-scheme: dark;
  --bg: #090d0c;
  --surface: #101615;
  --surface-strong: #151d1b;
  --line: rgba(220, 232, 220, 0.14);
  --line-strong: rgba(205, 255, 61, 0.42);
  --text: #eef2e9;
  --muted: #89948b;
  --acid: #c9ff3d;
  --acid-dark: #9bc927;
  --danger: #ff705c;
  --font-display: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-body: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 42%, rgba(116, 147, 51, 0.12), transparent 32rem),
    linear-gradient(135deg, #0c1210 0%, var(--bg) 55%, #080b0a 100%);
  font-family: var(--font-body);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.018) 3px 4px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: auto, 84px 100%;
}

.site-header,
main,
footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--acid);
  color: var(--acid);
  font: 700 18px/1 var(--font-display);
  letter-spacing: -0.06em;
  transform: skew(-5deg);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  text-transform: uppercase;
  font: 800 15px/1 var(--font-display);
  letter-spacing: 0.12em;
}

.brand-copy span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.server-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.header-actions,
.account-controls {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 24px;
}

.account-controls {
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.account-controls > span {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.header-logout {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid rgba(238, 242, 233, 0.28);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.header-logout:hover {
  border-color: var(--acid);
  color: var(--acid);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8c948e;
  box-shadow: 0 0 0 4px rgba(140, 148, 142, 0.08);
}

.server-pill.is-online .status-dot {
  background: var(--acid);
  box-shadow: 0 0 12px rgba(201, 255, 61, 0.65);
}

.server-pill.is-offline .status-dot {
  background: var(--danger);
}

main {
  min-height: calc(100vh - 162px);
}

.guest-screen {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: 64px;
  min-height: calc(100vh - 162px);
  padding: 60px 0 72px;
}

.eyebrow,
.card-label {
  margin: 0 0 20px;
  color: var(--acid);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.hero-copy h1,
.member-heading h1 {
  margin: 0;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  max-width: 720px;
  font-size: clamp(56px, 7.8vw, 112px);
  line-height: 0.84;
}

.hero-copy h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 242, 233, 0.72);
}

.hero-text {
  max-width: 570px;
  margin: 34px 0 0;
  color: #aab3aa;
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  transition: 160ms ease;
}

.button:focus-visible,
.icon-button:focus-visible,
.auth-tabs button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.button-primary {
  border-color: var(--acid);
  color: #111608;
  background: var(--acid);
}

.button-primary:hover {
  border-color: #ddff84;
  background: #ddff84;
  transform: translateY(-2px);
}

.button-primary:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.button-secondary:hover {
  border-color: rgba(238, 242, 233, 0.38);
  background: rgba(255, 255, 255, 0.055);
}

.button-full {
  width: 100%;
  margin-top: 8px;
}

.zone-visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(201, 255, 61, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 255, 61, 0.035) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(201, 255, 61, 0.09), transparent 55%),
    #0b100e;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.zone-visual::before,
.zone-visual::after {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  content: "";
  pointer-events: none;
}

.zone-visual::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--acid);
  border-left: 2px solid var(--acid);
}

.zone-visual::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--acid);
  border-bottom: 2px solid var(--acid);
}

.radar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(74%, 440px);
  aspect-ratio: 1;
  border: 1px solid rgba(201, 255, 61, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -54%);
}

.radar::before,
.radar::after {
  position: absolute;
  content: "";
  background: rgba(201, 255, 61, 0.14);
}

.radar::before {
  top: 50%;
  right: -12%;
  left: -12%;
  height: 1px;
}

.radar::after {
  top: -12%;
  bottom: -12%;
  left: 50%;
  width: 1px;
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(201, 255, 61, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one {
  width: 68%;
  height: 68%;
}

.ring-two {
  width: 40%;
  height: 40%;
}

.ring-three {
  width: 12%;
  height: 12%;
  border-color: rgba(201, 255, 61, 0.4);
}

.radar-sweep {
  position: absolute;
  inset: 50% 50% 0 0;
  overflow: hidden;
  border-left: 1px solid rgba(201, 255, 61, 0.7);
  background: linear-gradient(110deg, rgba(201, 255, 61, 0.19), transparent 72%);
  transform-origin: 100% 0;
  animation: radar-sweep 5s linear infinite;
}

@keyframes radar-sweep {
  to {
    transform: rotate(360deg);
  }
}

.map-point {
  position: absolute;
  z-index: 3;
  width: 8px;
  height: 8px;
  border: 1px solid var(--acid);
  background: var(--acid);
  box-shadow: 0 0 16px rgba(201, 255, 61, 0.75);
  transform: rotate(45deg);
}

.point-one {
  top: 26%;
  left: 62%;
}

.point-two {
  top: 66%;
  left: 34%;
}

.point-three {
  top: 54%;
  left: 74%;
}

.extract-label {
  position: absolute;
  top: 22%;
  left: 65%;
  color: var(--acid);
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.16em;
}

.coordinate-strip {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(4, 7, 6, 0.82);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.member-screen {
  padding: 72px 0 84px;
}

.member-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.heading-status {
  display: grid;
  min-width: 150px;
  gap: 7px;
  padding: 16px 20px;
  border-left: 2px solid var(--acid);
  background: rgba(201, 255, 61, 0.045);
}

.heading-status span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.heading-status strong {
  color: var(--acid);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.member-heading h1 {
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.95;
}

.member-heading h1 span {
  color: var(--acid);
}

.terminal-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr;
  gap: 16px;
  margin-top: 24px;
}

.terminal-card {
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent);
}

.terminal-card-main {
  background:
    linear-gradient(135deg, rgba(201, 255, 61, 0.06), transparent 50%),
    var(--surface);
}

.operation-state {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: 42px;
}

.operation-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border: 2px solid var(--acid);
  transform: rotate(45deg);
}

.operation-state h2 {
  margin: 0 0 8px;
  text-transform: uppercase;
  font: 800 24px/1 var(--font-display);
  letter-spacing: 0.03em;
}

.operation-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.progress-track {
  height: 3px;
  margin-top: 42px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--acid);
  box-shadow: 0 0 8px rgba(201, 255, 61, 0.42);
}

.progress-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.progress-caption strong {
  color: var(--acid);
}

.data-list {
  margin: 38px 0 0;
}

.data-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.data-list dt,
.data-list dd {
  margin: 0;
  font-size: 12px;
}

.data-list dt {
  color: var(--muted);
}

.data-list dd {
  text-align: right;
}

.accent-text {
  color: var(--acid);
}

.lobby-section {
  margin-top: 88px;
  padding-top: 46px;
  border-top: 1px solid var(--line);
}

.section-heading,
.panel-heading,
.room-card-top,
.room-card-footer,
.room-heading,
.room-capacity,
.lobby-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  align-items: flex-end;
}

.section-heading h2,
.panel-heading h2 {
  margin: 0;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 900;
}

.section-heading h2 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow) {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.lobby-toolbar {
  margin-top: 38px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.lobby-toolbar strong {
  color: var(--text);
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.live-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(201, 255, 61, 0.65);
}

.live-label.is-offline i {
  background: var(--danger);
  box-shadow: none;
}

.rooms-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.room-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 350px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(201, 255, 61, 0.035), transparent 42%),
    var(--surface);
  transition: border-color 160ms ease, transform 160ms ease;
}

.room-card:hover {
  border-color: rgba(201, 255, 61, 0.28);
  transform: translateY(-2px);
}

.room-index {
  color: var(--acid);
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.room-identity h3 {
  margin: 7px 0 0;
  text-transform: uppercase;
  font: 800 21px/1 var(--font-display);
  letter-spacing: 0.02em;
}

.capacity-badge {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(201, 255, 61, 0.28);
  color: var(--acid);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.capacity-badge.is-full {
  border-color: rgba(255, 112, 92, 0.3);
  color: var(--danger);
}

.room-members {
  align-self: start;
  margin-top: 26px;
}

.room-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(220, 232, 220, 0.08);
}

.member-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.member-name strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.host-tag {
  padding: 3px 5px;
  border: 1px solid rgba(201, 255, 61, 0.24);
  color: var(--acid);
  font-style: normal;
  text-transform: uppercase;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.member-state {
  flex: 0 0 auto;
  color: #6e786f;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.member-state.is-ready {
  color: var(--acid);
}

.room-card-footer {
  align-items: flex-end;
  margin-top: 24px;
}

.room-card-footer > span {
  color: #657067;
  text-transform: uppercase;
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.room-join-button {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 9px;
}

.rooms-empty,
.rooms-loading,
.rooms-error {
  grid-column: 1 / -1;
  min-height: 300px;
  padding: 56px 28px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.rooms-empty {
  display: grid;
  place-content: center;
}

.empty-coordinate {
  color: var(--acid);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.rooms-empty h3 {
  margin: 16px 0 8px;
  color: var(--text);
  text-transform: uppercase;
  font: 800 24px/1 var(--font-display);
}

.rooms-empty p {
  max-width: 430px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.55;
}

.room-screen {
  min-height: calc(100vh - 162px);
  padding: 52px 0 84px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.back-link:hover {
  color: var(--acid);
}

.room-heading {
  align-items: flex-end;
  margin-top: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.room-heading h1 {
  margin: 0;
  text-transform: uppercase;
  font: 900 clamp(44px, 6vw, 82px)/0.9 var(--font-display);
  letter-spacing: -0.05em;
}

.room-heading h1 span {
  color: var(--acid);
}

.room-heading p:not(.eyebrow) {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.room-capacity {
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
}

.room-capacity strong {
  color: var(--acid);
  font: 900 32px/1 var(--font-display);
}

.room-capacity span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: 16px;
  margin-top: 24px;
}

.squad-panel,
.ready-panel {
  border: 1px solid var(--line);
  background: var(--surface);
}

.squad-panel {
  padding: 28px;
}

.panel-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.panel-heading .card-label {
  display: block;
  margin-bottom: 10px;
}

.panel-heading h2 {
  font-size: 28px;
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.participant-card {
  position: relative;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(201, 255, 61, 0.055), transparent 50%),
    #0c1210;
}

.participant-card::after {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(201, 255, 61, 0.08);
  border-radius: 50%;
  content: "";
}

.participant-card.is-empty {
  display: grid;
  place-items: center;
  align-content: center;
  border-style: dashed;
  color: #5e6860;
  text-align: center;
  background: rgba(255, 255, 255, 0.012);
}

.participant-slot {
  position: absolute;
  top: 14px;
  right: 16px;
  color: #4e5850;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.participant-avatar,
.empty-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--acid);
  font: 800 18px/1 var(--font-display);
  transform: skew(-3deg);
}

.empty-avatar {
  width: 42px;
  height: 42px;
  border-color: var(--line);
  color: #667067;
  font-family: var(--font-body);
  font-weight: 300;
}

.participant-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.participant-title h3,
.participant-card.is-empty h3 {
  margin: 0;
  text-transform: uppercase;
  font: 800 19px/1 var(--font-display);
}

.participant-card.is-empty h3 {
  margin-top: 16px;
  font-size: 16px;
}

.participant-card.is-empty p {
  margin: 6px 0 0;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.participant-status {
  display: inline-block;
  margin-top: 14px;
  padding-left: 13px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.participant-status::before {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: 2px 0 0 -13px;
  border-radius: 50%;
  content: "";
  background: #69726b;
}

.participant-status.is-ready {
  color: var(--acid);
}

.participant-status.is-ready::before {
  background: var(--acid);
  box-shadow: 0 0 8px rgba(201, 255, 61, 0.5);
}

.ready-panel {
  display: flex;
  min-height: 520px;
  padding: 28px;
  justify-content: space-between;
  flex-direction: column;
  background:
    linear-gradient(160deg, rgba(201, 255, 61, 0.04), transparent 45%),
    #0d1311;
}

.readiness-indicator {
  margin-top: 44px;
}

.readiness-indicator span {
  display: block;
  color: var(--acid);
  font: 900 58px/0.9 var(--font-display);
  letter-spacing: -0.04em;
}

.readiness-indicator small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.15em;
}

.ready-panel p {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.room-actions {
  display: grid;
  gap: 10px;
}

.ready-button.is-ready,
#ready-button.is-ready {
  border-color: var(--acid);
  color: var(--acid);
  background: transparent;
}

.text-danger-button {
  padding: 12px;
  border: 0;
  color: rgba(255, 112, 92, 0.75);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.text-danger-button:hover {
  color: var(--danger);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100% - 48px));
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(13, 19, 17, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  font-size: 12px;
  line-height: 1.45;
}

.toast[data-tone="error"] {
  border-color: rgba(255, 112, 92, 0.5);
}

.toast[data-tone="warning"] {
  border-color: rgba(255, 190, 92, 0.5);
}

footer {
  display: flex;
  justify-content: space-between;
  min-height: 70px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: #626c64;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.16em;
}

dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: #0d1211;
  box-shadow: 0 24px 100px rgba(0, 0, 0, 0.7);
}

dialog::backdrop {
  background: rgba(3, 6, 5, 0.82);
  backdrop-filter: blur(7px);
}

.dialog-shell {
  position: relative;
  padding: 34px;
}

.icon-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--text);
}

.auth-tabs {
  display: flex;
  gap: 26px;
  margin: 0 42px 38px 0;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  position: relative;
  padding: 0 0 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.auth-tabs button[aria-selected="true"] {
  color: var(--text);
}

.auth-tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--acid);
}

#auth-form h2 {
  margin: 0;
  text-transform: uppercase;
  font: 900 35px/1 var(--font-display);
  letter-spacing: -0.02em;
}

.auth-description {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

#auth-form label {
  display: block;
  margin: 20px 0 8px;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#auth-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: #080c0b;
}

#auth-form input:focus {
  border-color: var(--line-strong);
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: #68726a;
  font-size: 10px;
}

.form-message {
  min-height: 20px;
  margin: 20px 0 4px;
  color: var(--danger);
  font-size: 12px;
}

@media (max-width: 900px) {
  .guest-screen {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .zone-visual {
    min-height: 440px;
  }

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

  .terminal-card-main {
    grid-column: 1 / -1;
  }

  .rooms-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ready-panel {
    min-height: 400px;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1240px);
  }

  .site-header {
    height: 76px;
  }

  .brand-copy,
  .server-pill span:last-child {
    display: none;
  }

  .header-actions {
    gap: 12px;
  }

  .account-controls {
    gap: 9px;
    padding-left: 12px;
  }

  .account-controls > span {
    display: none;
  }

  .guest-screen {
    gap: 48px;
    min-height: auto;
    padding: 56px 0;
  }

  .hero-copy h1 {
    font-size: clamp(49px, 16vw, 74px);
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button {
    width: 100%;
  }

  .zone-visual {
    min-height: 360px;
  }

  .coordinate-strip span:nth-child(2) {
    display: none;
  }

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

  .heading-status {
    width: 100%;
  }

  .member-heading .button {
    width: 100%;
  }

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

  .terminal-card-main {
    grid-column: auto;
  }

  .lobby-section {
    margin-top: 60px;
  }

  .section-heading,
  .room-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading .button {
    width: 100%;
  }

  .lobby-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .rooms-list,
  .participants-grid {
    grid-template-columns: 1fr;
  }

  .room-card {
    min-height: 330px;
  }

  .room-heading {
    margin-top: 32px;
  }

  .room-capacity {
    align-items: flex-start;
  }

  .squad-panel,
  .ready-panel {
    padding: 20px;
  }

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

  .participant-card {
    min-height: 190px;
  }

  footer {
    flex-direction: column;
    gap: 8px;
  }

  .dialog-shell {
    padding: 28px 22px;
  }
}

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