.view {
  animation: fade-in 0.4s ease both;
}

.lobby-view {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(30px, 4.5vw, 68px) clamp(20px, 4.5vw, 68px) clamp(48px, 6vw, 92px);
}

.lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(316px, 0.72fr);
  gap: clamp(28px, 5vw, 86px);
  align-items: center;
  min-height: min(690px, calc(100svh - var(--header-h) - 145px));
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: space-between;
  min-height: 570px;
  padding: clamp(12px, 2vw, 30px) 0 18px;
  animation: rise-in 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-art {
  position: absolute;
  top: 46%;
  right: -2%;
  z-index: -1;
  width: clamp(340px, 47vw, 630px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.85;
  pointer-events: none;
}

.hero-ring,
.hero-axis,
.hero-orbit-dot {
  position: absolute;
}

.hero-ring {
  top: 50%;
  left: 50%;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hero-ring-a {
  width: 100%;
  height: 100%;
  border-color: var(--line-strong);
  animation: slow-spin 95s linear infinite;
}

.hero-ring-a::before,
.hero-ring-a::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--text);
  border-radius: 50%;
  background: var(--bg);
  content: "";
}

.hero-ring-a::before {
  top: 13%;
  left: 8%;
}

.hero-ring-a::after {
  right: 3%;
  bottom: 22%;
  width: 4px;
  height: 4px;
}

.hero-ring-b {
  width: 72%;
  height: 72%;
  border-style: dashed;
  opacity: 0.48;
  animation: slow-spin 62s linear infinite reverse;
}

.hero-ring-b::before {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  content: "";
  transform: translateX(-50%);
}

.hero-axis {
  top: 50%;
  left: 50%;
  background: var(--line);
}

.hero-axis-x {
  width: 114%;
  height: 1px;
  transform: translate(-50%, -50%);
}

.hero-axis-y {
  width: 1px;
  height: 114%;
  transform: translate(-50%, -50%);
}

.hero-orbit-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.5;
}

.hero-orbit-dot-a {
  top: 17.5%;
  right: 19%;
}

.hero-orbit-dot-b {
  bottom: 10%;
  left: 27%;
  width: 3px;
  height: 3px;
  opacity: 0.32;
}

.hero-coordinate {
  position: absolute;
  right: 3%;
  bottom: 6%;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(18px, 2.7vw, 30px);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
  animation: text-in 0.7s 0.18s ease both;
}

.eyebrow-mark {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px var(--surface);
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(54px, 7.2vw, 107px);
  font-weight: 300;
  letter-spacing: -0.075em;
  line-height: 0.88;
  text-wrap: balance;
  animation: rise-in 0.8s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero h1 span {
  position: relative;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.065em;
  white-space: nowrap;
}

.hero h1 span::after {
  position: absolute;
  right: 2px;
  bottom: -1px;
  left: 7px;
  height: 1px;
  content: "";
  background: var(--line-strong);
  transform: rotate(-1.1deg);
}

.hero-lede {
  max-width: 475px;
  margin-top: clamp(22px, 3vw, 34px);
  color: var(--muted);
  font-size: clamp(13px, 1.25vw, 15px);
  line-height: 1.65;
  animation: text-in 0.7s 0.34s ease both;
}

.hero-specs {
  display: flex;
  gap: clamp(20px, 3.4vw, 52px);
  margin-top: clamp(32px, 4.8vw, 58px);
  animation: text-in 0.7s 0.46s ease both;
}

.hero-spec {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-spec strong {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 1;
}

.hero-spec span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.15em;
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 26px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.17em;
  animation: text-in 0.7s 0.6s ease both;
}

.hero-foot span {
  display: flex;
  align-items: center;
  gap: 26px;
}

.hero-foot span:not(:last-child)::after {
  width: 16px;
  height: 1px;
  background: var(--line);
  content: "";
}

.setup-panel {
  position: relative;
  align-self: center;
  width: 100%;
  padding: clamp(22px, 2.4vw, 31px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  box-shadow: 0 30px 80px var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  animation: rise-in 0.8s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.setup-panel::before {
  position: absolute;
  top: -1px;
  right: 22%;
  left: 22%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--text), transparent);
  opacity: 0.45;
}

.setup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}

.setup-head h2 {
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.local-badge {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.13em;
}

.local-badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  animation: soft-pulse 2.6s ease-in-out infinite;
}

.setup-section {
  margin-top: 23px;
}

.setup-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.setup-label,
.setup-label-note {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.13em;
}

.setup-label-note {
  color: var(--muted);
  letter-spacing: 0.08em;
}

.mode-list {
  display: grid;
  gap: 3px;
}

.mode-option {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 51px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  text-align: left;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.mode-option:hover {
  background: var(--surface);
  color: var(--text-soft);
}

.mode-option[aria-selected="true"] {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.mode-option[aria-selected="true"]::before {
  position: absolute;
  top: 50%;
  left: -1px;
  width: 2px;
  height: 20px;
  border-radius: 2px;
  content: "";
  background: var(--text);
  transform: translateY(-50%);
}

.mode-index {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 7px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.mode-option[aria-selected="true"] .mode-index {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.mode-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mode-copy strong {
  color: inherit;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mode-copy small {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-badge {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.06em;
}

.mode-option[aria-selected="true"] .mode-badge {
  color: var(--text-soft);
}

.custom-config {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding: 10px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  animation: fade-in 0.25s ease both;
}

.custom-config > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.custom-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.1em;
}

.custom-config strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.difficulty-section {
  margin-top: 22px;
}

.difficulty-switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.difficulty-option {
  min-height: 31px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.difficulty-option:hover {
  color: var(--text);
}

.difficulty-option[aria-checked="true"] {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.difficulty-note {
  min-height: 2.8em;
  margin-top: 8px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.45;
}

.setup-actions {
  margin-top: 22px;
}

.setup-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.07em;
}

.setup-foot span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-soft);
}

.lobby-ticker {
  position: relative;
  overflow: hidden;
  margin-top: clamp(48px, 8vw, 100px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  padding: 12px 24px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.13em;
  white-space: nowrap;
  animation: ticker-drift 34s linear infinite;
}

.ticker-track span:nth-child(even) {
  color: var(--text);
  opacity: 0.55;
}

@keyframes ticker-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 1100px) {
  .lobby-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    gap: 36px;
  }

  .hero h1 {
    font-size: clamp(54px, 7.5vw, 84px);
  }

  .hero-art {
    right: -9%;
    width: 53vw;
  }
}

@media (max-width: 860px) {
  .lobby-view {
    padding-top: 34px;
  }

  .lobby-grid {
    grid-template-columns: 1fr;
    gap: 42px;
    min-height: 0;
  }

  .hero {
    min-height: 0;
    padding-bottom: 0;
  }

  .hero-art {
    top: 40%;
    right: -15%;
    width: min(76vw, 500px);
    opacity: 0.62;
  }

  .hero h1 {
    font-size: clamp(56px, 12vw, 97px);
  }

  .hero-specs {
    margin-top: 35px;
  }

  .hero-foot {
    margin-top: 40px;
  }

  .setup-panel {
    max-width: 600px;
    justify-self: center;
  }

  .lobby-ticker {
    margin-top: 55px;
  }
}

@media (max-width: 560px) {
  .lobby-view {
    padding: 26px 15px 50px;
  }

  .hero {
    padding-top: 4px;
  }

  .hero-art {
    top: 30%;
    right: -44%;
    width: 110vw;
    opacity: 0.45;
  }

  .hero h1 {
    font-size: clamp(47px, 14.5vw, 69px);
    letter-spacing: -0.075em;
  }

  .hero-lede {
    max-width: 90%;
    font-size: 12px;
  }

  .hero-specs {
    gap: 24px;
  }

  .hero-spec strong {
    font-size: 18px;
  }

  .hero-spec span {
    font-size: 6px;
  }

  .hero-foot {
    gap: 9px;
    margin-top: 32px;
    font-size: 6px;
  }

  .hero-foot span {
    gap: 10px;
  }

  .setup-panel {
    padding: 20px 16px;
    border-radius: 13px;
  }

  .setup-head {
    margin-bottom: 20px;
  }

  .setup-head h2 {
    font-size: 21px;
  }

  .mode-option {
    min-height: 53px;
  }

  .setup-section {
    margin-top: 20px;
  }

  .lobby-ticker {
    margin-top: 43px;
  }
}

@media (max-height: 720px) and (min-width: 861px) {
  .lobby-grid {
    min-height: 0;
  }

  .hero {
    min-height: 520px;
  }

  .setup-panel {
    transform: scale(0.97);
    transform-origin: center;
  }
}
