/* ===================================================== */
/* LOGIN OVERLAY */
/* ===================================================== */

.login-overlay {
  position: fixed;
  inset: 0;
  background: url("/releases/2026.11.02-01/frontend/assets/locations/loginscreen.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.5s ease;
  overflow: hidden;
  animation: loginBgMove 80s ease-in-out infinite alternate;
}

@keyframes loginBgMove {
  from { background-size: 100%; }
  to { background-size: 108%; }
}

.login-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0.02) 26%,
    rgba(0,0,0,0.28) 62%,
    rgba(0,0,0,0.64) 100%
  );
  pointer-events: none;
}

.login-overlay::after {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 40%, rgba(255,255,255,0.05), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,0.04), transparent 45%);
  animation: fogMove 60s linear infinite;
  pointer-events: none;
}

@keyframes fogMove {
  from { transform: translateX(-5%) translateY(-3%) scale(1.05); }
  to   { transform: translateX(5%) translateY(3%) scale(1.1); }
}

.login-fade-out {
  opacity: 0;
}

.login-game-loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(360px, calc(100vw - 48px));
  text-align: center;
}

.login-game-loading h2,
.login-game-loading p {
  margin: 0;
}

.login-game-loading p {
  color: rgba(245, 238, 220, 0.76);
  line-height: 1.55;
}

.login-game-loading-kicker {
  color: #d9bd78;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-game-loading-spinner {
  width: 46px;
  height: 46px;
  border: 3px solid rgba(217, 189, 120, 0.2);
  border-top-color: #d9bd78;
  border-radius: 50%;
  animation: loginGameLoadingSpin 1s linear infinite;
}

.login-game-loading-progress {
  width: 100%;
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 189, 120, 0.13);
}

.login-game-loading-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #d9bd78, transparent);
  animation: loginGameLoadingProgress 1.8s ease-in-out infinite;
}

.login-game-loading-failed .login-primary-action {
  width: 100%;
  margin-top: 8px;
}

@keyframes loginGameLoadingSpin {
  to { transform: rotate(360deg); }
}

@keyframes loginGameLoadingProgress {
  from { transform: translateX(-110%); }
  to { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  .login-game-loading-spinner,
  .login-game-loading-progress span {
    animation: none;
  }
}

.login-box .login-remember {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
}

.login-box .login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #c8a85a;
}

.login-box .login-remember span { display: block; }

#loginForm #loginBtn {
  margin-top: 12px;
}

#loginForm + .login-footer {
  margin-top: 16px;
}

/* Keep the classic login flow on one deliberate column. The form used to
   inherit a wider layout than its Back action, making inputs and Login spill
   beyond the visual rhythm of the panel. */
/* removed old width constraint */

#loginContent > #loginForm input:not([type="checkbox"]),
#loginContent > #loginForm button,
#loginContent > .login-footer button,
.login-btn {
  width: 100%;
  min-width: 0;
}

/* Buttons use global styles from components.css (restore) */

.login-buttons {
  gap: 16px;
}

.login-overlay-footer {
  position: absolute;
  inset: auto 0 22px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 4;
}

/* Weekly maintenance notice - top left, warning style */
.login-box {
  position: relative;
}

.login-weekly-notice {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 240px;
  padding: 8px 10px;
  background: rgba(60, 45, 20, 0.95);
  border: 1px solid rgba(212, 160, 75, 0.7);
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.25;
  color: #e8d4a0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  pointer-events: auto;
}

.login-weekly-notice-icon {
  font-size: 14px;
  line-height: 1;
  margin-top: 1px;
  flex-shrink: 0;
}

.login-weekly-notice-content {
  min-width: 0;
}

.login-weekly-notice-title {
  font-weight: 700;
  color: #f4c070;
  margin-bottom: 2px;
  font-size: 12.5px;
}

.login-weekly-notice-body {
  color: #e8d4a0;
  font-size: 11.5px;
  opacity: 0.95;
}

.login-footer-left {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.login-community-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  white-space: nowrap;
}

.login-community-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f4e8c8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(212, 160, 75, 0.3);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  transition: all 150ms ease;
}

.login-community-link:hover,
.login-community-link:focus-visible {
  color: #fff4d4;
  background: rgba(212, 160, 75, 0.15);
  border-color: rgba(212, 160, 75, 0.55);
  text-shadow: 0 0 10px rgba(236, 199, 111, 0.4);
  transform: translateY(-1px);
}

.login-community-link-website img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.login-studio-badge,
.login-version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: rgba(245, 238, 220, 0.72);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.login-studio-badge-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.74;
  filter:
    drop-shadow(0 5px 14px rgba(0, 0, 0, 0.45))
    saturate(0.92);
}

.login-version-badge {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.88;
}

.login-music-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(14, 12, 9, 0.62);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.login-music-label,
.login-music-value {
  color: rgba(245, 238, 220, 0.8);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-music-value {
  min-width: 48px;
  text-align: center;
}

.login-music-btn {
  width: auto;
  min-width: 42px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: #f7edd2;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.login-music-btn:hover {
  transform: translateY(-1px);
  background: rgba(214, 187, 106, 0.14);
  border-color: rgba(214, 187, 106, 0.24);
}

/* ===================================================== */
/* STAGE WRAPPER */
/* ===================================================== */

.login-box {
  position: relative;
  width: 100%;
  min-height: 100cqh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  animation: none;
}

/* ===================================================== */
/* FREE FLOATING LOGO */
/* ===================================================== */

.login-box::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, 1344px);
  height: clamp(140px, 346px, 800px);
  transform: translate(-50%, calc(-50% - 145px));
  background: url("/releases/2026.11.02-01/frontend/assets/ui/logo.png") center/contain no-repeat;
  filter:
    drop-shadow(0 12px 28px rgba(0,0,0,0.50))
    drop-shadow(0 0 20px rgba(210,170,95,0.18));
  pointer-events: none;
  z-index: 2;
}

/* ===================================================== */
/* HIDE OLD LOGIN ELEMENTS (use floating logo) */
/* ===================================================== */

.guild-emblem,
.game-title,
.login-subtitle {
  display: none !important;
}

.login-offline-kicker,
.login-server-offline h2,
.login-box h2 {
  font-family: var(--font-accent);
}

/* ===================================================== */
/* ACTUAL LOGIN PANEL */
/* ===================================================== */

.login-box > * {
  position: relative;
  z-index: 3;
}

.login-box form,
.login-box .login-panel,
.login-box .login-actions,
.login-box .login-content,
.login-box .login-inner {
  width: min(420px, 1690px);
}

/* ACTUAL LOGIN PANEL */
/* ===================================================== */

.login-box > div,
.login-box > form {
  width: min(420px, 1690px);
  max-width: calc(var(--canvas-visible-width, 1920px) - 32px);
  margin-top: 170px;
  padding: 26px 26px 24px;
  border-radius: 18px;
  background: rgba(18,18,18,0.48);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.46),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

.login-box input {
  width: 100%;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 12px 13px;
  background: rgba(20,20,20,0.92);
  border: 1px solid rgba(255,255,255,0.14);
  color: white;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.login-box input:focus {
  outline: none;
  border-color: #c8a85a;
  box-shadow: 0 0 8px rgba(200,170,90,0.34);
}

/* ===================================================== */
/* BUTTON */
/* ===================================================== */

.login-box button {
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.enter-world-btn {
  animation: enterPulse 4s ease-in-out infinite;
}

@keyframes enterPulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.2),
      0 10px 20px rgba(0,0,0,0.28);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.28),
      0 12px 24px rgba(0,0,0,0.3),
      0 0 18px rgba(214, 188, 116, 0.18);
  }
}

.enter-world-btn:hover {
  transform: translateY(-1px);
}

/* ===================================================== */
/* ERROR */
/* ===================================================== */

.login-error {
  color: #ff8080;
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}

.login-offline-kicker,
.login-steam-status {
  margin-bottom: 12px;
  color: rgba(246, 237, 214, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.login-server-offline h2,
.login-box h2 {
  margin: 0 0 14px;
  color: #f7edd2;
  font-size: 24px;
  line-height: 1.15;
  text-align: center;
}

.login-offline-copy,
.login-steam-status {
  margin-top: 0;
  color: rgba(246, 237, 214, 0.78);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.login-buttons {
  display: grid;
  gap: 10px;
}

.login-btn.steam {
  border: 1px solid rgba(102, 192, 244, 0.45);
  background: linear-gradient(180deg, #234b68, #132e46);
  color: #f4fbff;
}

.login-btn.steam:hover {
  border-color: rgba(102, 192, 244, 0.72);
  background: linear-gradient(180deg, #2c6f95, #134b72);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(102, 192, 244, 0.18) inset,
    0 10px 26px rgba(19, 75, 114, 0.34);
}

.login-btn.steam.is-pending {
  border-color: rgba(102, 192, 244, 0.28);
  background: linear-gradient(180deg, #283a45, #17252f);
  color: rgba(244, 251, 255, 0.78);
}

.login-btn.steam.is-pending:hover {
  border-color: rgba(102, 192, 244, 0.48);
  background: linear-gradient(180deg, #30566b, #1d3d54);
  color: #f4fbff;
}

.login-steam-warning {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(214, 187, 106, 0.36);
  border-radius: 10px;
  background: rgba(214, 187, 106, 0.12);
  color: #f7edd2;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.login-footer-separated {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(246, 237, 214, 0.12);
}

.login-footer-separated #backBtn {
  border: 1px solid rgba(246, 237, 214, 0.16);
  background: rgba(17, 15, 12, 0.58);
  color: rgba(246, 237, 214, 0.82);
  box-shadow: none;
}

.login-footer-separated #backBtn:hover {
  border-color: rgba(246, 237, 214, 0.32);
  background: rgba(35, 31, 25, 0.78);
  color: #ffffff;
}

/* ===================================================== */
/* GAME UI VISIBILITY CONTROL */
/* ===================================================== */

.app-hidden {
  opacity: 0;
  pointer-events: none;
}

.app-visible {
  opacity: 1;
  transition: opacity 0.8s ease;
}

/* ===================================================== */
/* FIREFLIES */
/* ===================================================== */

.fireflies {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe8a3;
  box-shadow:
    0 0 6px rgba(255,230,140,0.8),
    0 0 12px rgba(255,210,100,0.6);
  opacity: 0;
  animation: fireflyFloat linear infinite;
}

@keyframes fireflyFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-300px) translateX(60px);
    opacity: 0;
  }
}

/* ===================================================== */
/* MOBILE */
/* ===================================================== */

@media (max-width: 640px) {
  .login-box::before {
    width: min(360px, 1498px);
    height: clamp(110px, 461px, 180px);
    transform: translate(-50%, calc(-50% - 120px));
  }

  .login-box > div,
  .login-box > form {
    width: min(1690px, 360px);
    margin-top: 135px;
    padding: 20px 18px 18px;
    border-radius: 16px;
  }

  .login-box button {
    font-size: 16px;
    padding: 13px 16px;
  }

  .login-overlay-footer {
    inset: auto 0 16px 0;
    padding: 0 16px;
    align-items: stretch;
    gap: 12px;
  }

  .login-studio-badge-icon {
    width: 40px;
    height: 40px;
  }

  .login-version-badge {
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .login-footer-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .login-music-controls {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
  }

  .login-music-label,
  .login-music-value {
    font-size: 11px;
  }
}

/* ===================================================== */
/* FAKE LOGIN SCREEN MATCH */
/* ===================================================== */

.login-overlay {
  inset: auto;
  left: calc(var(--canvas-extra-left, 0px) * -1);
  top: calc(var(--canvas-extra-top, 0px) * -1);
  width: var(--canvas-visible-width, 1920px);
  height: var(--canvas-visible-height, 1080px);
  box-sizing: border-box;
  background: url("/releases/2026.11.02-01/frontend/assets/locations/loginscreen.png") center/cover no-repeat;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  color: #e8d4a0;
  animation: none;
}

.login-overlay::before {
  background:
    radial-gradient(ellipse at center, rgba(212, 160, 75, 0.08), transparent 38%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.16) 22%, rgba(0, 0, 0, 0.54) 100%);
}

.login-overlay::after,
.fireflies {
  display: none;
}

.login-stage {
  --login-stage-width: min(486px, calc(var(--canvas-visible-width, 1920px) - 40px));
  width: var(--login-stage-width);
  display: grid;
  justify-items: stretch;
  gap: 20px;
}

.login-box {
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(31, 26, 14, 0.95) 0%, rgba(14, 12, 8, 0.98) 100%);
  border: 1px solid rgba(212, 160, 75, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  backdrop-filter: none;
}

.login-box::before {
  content: none;
}

.login-box > div,
.login-box > form,
.login-box form {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#loginContent {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  padding: 10px 32px 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.login-brand,
.login-header {
  margin: 0 0 14px;
  text-align: center;
}

.login-brand::before,
.login-header::before {
  content: "";
  display: block;
  width: min(370px, 90%);
  height: 156px;
  margin: -4px auto 4px;
  background: url("/releases/2026.11.02-01/frontend/assets/ui/logo.png") center/contain no-repeat;
  filter:
    drop-shadow(0 8px 16px rgba(0,0,0,0.62))
    drop-shadow(0 0 12px rgba(212, 160, 75, 0.18));
}

.guild-emblem,
.game-title,
.login-subtitle {
  display: none !important;
}

.game-title {
  margin: 0 0 4px;
  color: #f4e8c8;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.login-subtitle {
  color: #b89a6b;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.login-weekly-notice {
  position: fixed;
  top: 28px;
  left: 28px;
  max-width: 240px;
  min-height: 0;
  padding: 14px 16px;
  gap: 12px;
  border-radius: 8px;
  background: #3c2d14;
  border: 1px solid rgba(212, 160, 75, 0.7);
  color: #e8d4a0;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.login-weekly-notice-icon {
  color: #f4c070;
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}

.login-weekly-notice-title {
  margin-bottom: 4px;
  color: #f4c070;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.login-weekly-notice-body {
  color: #e8d4a0;
  font-size: 12.5px;
  line-height: 1.35;
}

.login-admin-notice {
  position: absolute;
  z-index: 6;
  top: 22px;
  left: 50%;
  width: min(680px, calc(100% - 40px));
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid rgba(225, 174, 86, 0.78);
  border-radius: 8px;
  background: rgba(45, 31, 15, 0.96);
  color: #f1dfb5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.login-admin-notice strong { display: block; color: #ffd488; margin-bottom: 3px; }
.login-admin-notice p { margin: 0; white-space: pre-wrap; }

.login-box input:not([type="checkbox"]) {
  box-sizing: border-box;
  height: 42px;
  display: block;
  margin: 0 0 12px;
  width: 100%;
  padding: 0 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 160, 75, 0.35);
  color: #e8d4a0;
  font-size: 14px;
  box-shadow: none;
}

.login-box input:not([type="checkbox"])::placeholder {
  color: #8a6640;
}

.login-box input:not([type="checkbox"]):focus {
  border-color: #d4af77;
  box-shadow: 0 0 0 1px rgba(212, 175, 119, 0.16);
}

.login-box input:-webkit-autofill,
.login-box input:-webkit-autofill:hover,
.login-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e8d4a0;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.72) inset;
  border-color: rgba(212, 160, 75, 0.45);
  caret-color: #e8d4a0;
}

.login-box .login-remember {
  margin: 0 0 14px;
  color: rgba(232, 212, 160, 0.72);
}

.login-primary-action,
.login-box #loginBtn,
.enter-world-btn {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 6px 0 12px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #c8a85a;
  background: linear-gradient(180deg, #d4af77, #8b5e2f);
  color: #1f1a0e;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  box-shadow: none;
  animation: none;
}

.login-primary-action:hover,
.login-box #loginBtn:hover,
.enter-world-btn:hover {
  filter: brightness(1.1);
  transform: none;
}

.login-secondary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.login-secondary-action,
.login-box .login-secondary-action {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid rgba(212, 160, 75, 0.5);
  background: rgba(0, 0, 0, 0.24);
  color: #c9a86a;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
}

.login-secondary-action:hover,
.login-box .login-secondary-action:hover {
  background: #3c2d14;
  color: #f4e8c8;
}

.login-card-version {
  margin-top: 18px;
  color: #7a5f3a;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}

.login-error {
  margin: 12px 0 0;
  color: #ffb0a5;
  font-size: 13px;
}

#loginContent.login-content-queueing {
  min-height: 390px;
}

#loginContent.login-content-queueing > :not(.login-queue-panel) {
  visibility: hidden;
  pointer-events: none;
}

.login-queue-panel {
  box-sizing: border-box;
  position: absolute;
  z-index: 12;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  padding: 34px 28px;
  border: 1px solid rgba(212, 160, 75, 0.48);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 18%, rgba(176, 128, 54, 0.17), transparent 42%),
    linear-gradient(180deg, rgba(33, 27, 16, 0.99), rgba(13, 11, 8, 0.995));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 231, 178, 0.05);
  color: #e8d4a0;
  text-align: center;
}

.login-queue-spinner {
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border: 2px solid rgba(212, 160, 75, 0.2);
  border-top-color: #d4af77;
  border-radius: 50%;
  animation: loginQueueSpin 1.2s linear infinite;
}

.login-queue-spinner span {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 160, 75, 0.34);
  border-right-color: transparent;
  border-radius: 50%;
}

.login-queue-panel.is-admitted .login-queue-spinner {
  border-color: rgba(151, 193, 105, 0.3);
  border-top-color: #a9d279;
}

.login-queue-kicker {
  margin-bottom: 6px;
  color: #b89255;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-queue-title,
.login-box .login-queue-title {
  margin: 0 0 16px;
  color: #f2dfb8;
  font-size: 22px;
  line-height: 1.2;
}

.login-queue-position {
  display: grid;
  gap: 2px;
  min-width: 150px;
  margin-bottom: 14px;
  padding: 10px 22px;
  border: 1px solid rgba(212, 160, 75, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.login-queue-position small {
  color: rgba(232, 212, 160, 0.68);
  font-size: 11px;
}

.login-queue-position strong {
  color: #f0c978;
  font-size: 30px;
  line-height: 1;
}

.login-queue-copy {
  max-width: 360px;
  margin: 0;
  color: rgba(232, 220, 191, 0.82);
  font-size: 13px;
  line-height: 1.55;
}

.login-queue-progress {
  width: min(310px, 86%);
  height: 4px;
  margin: 22px 0 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.login-queue-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #d4af77, transparent);
  animation: loginQueueProgress 1.8s ease-in-out infinite;
}

.login-queue-countdown {
  min-height: 18px;
  margin: 0;
  color: rgba(212, 175, 119, 0.72);
  font-size: 11px;
}

@keyframes loginQueueSpin {
  to { transform: rotate(360deg); }
}

@keyframes loginQueueProgress {
  from { transform: translateX(-130%); }
  to { transform: translateX(330%); }
}

@media (prefers-reduced-motion: reduce) {
  .login-queue-spinner,
  .login-queue-progress span {
    animation: none;
  }
}

.login-footer {
  margin: 16px 16px 0;
}

.login-footer button,
.login-box #backBtn,
.login-box #registerBtn,
.login-box #steamRegisterBtn,
.login-box #steamLinkSubmitBtn {
  min-height: 38px;
  border-radius: 8px;
}

.login-overlay-footer {
  position: static;
  box-sizing: border-box;
  width: 100%;
  display: block;
  padding: 0;
  z-index: 4;
}

.login-footer-left {
  display: contents;
}

.login-community-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

.login-community-link {
  box-sizing: border-box;
  width: 100%;
  min-height: 34px;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(212, 160, 75, 0.4);
  background: rgba(50, 38, 22, 0.6);
  color: #e8d4a0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

.login-community-link:hover,
.login-community-link:focus-visible {
  background: rgba(212, 160, 75, 0.15);
  border-color: #d4af77;
  color: #f4e8c8;
  transform: none;
}

.login-community-link-website img {
  width: 16px;
  height: 16px;
}

.login-version-badge {
  display: none;
}

.login-studio-badge {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-studio-badge-icon {
  width: 52px;
  height: 52px;
  opacity: 0.92;
}

.login-music-controls {
  position: fixed;
  left: 88px;
  bottom: 28px;
  z-index: 5;
  display: inline-flex;
  min-height: 42px;
  border-color: rgba(212, 160, 75, 0.28);
  background: rgba(18, 13, 8, 0.76);
}

@media (max-width: 640px) {
  .login-overlay {
    justify-content: center;
    padding: 20px 16px;
    overflow-y: auto;
  }

  .login-box,
  .login-overlay-footer {
    width: min(454px, calc(var(--canvas-visible-width, 1920px) - 32px));
  }

  .login-box {
    padding: 14px 14px 28px;
  }

  .login-brand,
  .login-header {
    margin: 0 10px 18px;
  }

  .login-brand::before,
  .login-header::before {
    height: 92px;
  }

  .login-weekly-notice {
    position: static;
    order: -2;
    width: min(420px, calc(var(--canvas-visible-width, 1920px) - 32px));
    margin-bottom: 12px;
    max-width: none;
  }

  .login-studio-badge,
  .login-music-controls {
    display: none;
  }

  .login-secondary-actions {
    grid-template-columns: 1fr;
  }
}
/* Connection interruptions have their own compact, asset-independent status card. */
.login-overlay-disconnected::before {
  background: radial-gradient(ellipse at center, rgba(13, 11, 8, .3), rgba(8, 7, 5, .78));
  backdrop-filter: blur(4px);
}
.login-overlay-disconnected .login-stage { --login-stage-width: min(540px, calc(var(--canvas-visible-width, 1920px) - 40px)); gap: 18px; }
.login-overlay-disconnected .login-box {
  padding: 0;
  border-color: rgba(205, 169, 103, .5);
  background: radial-gradient(ellipse at 50% 0, rgba(118, 86, 40, .22), transparent 65%), linear-gradient(160deg, #241e15, #100e0b);
  box-shadow: 0 28px 90px #0009, inset 0 0 0 5px #17130e, inset 0 0 0 6px #b68b4824;
}
.login-overlay-disconnected #loginContent { padding: 0; }
.login-connection-panel { padding: 34px 40px 30px; text-align: center; }
.login-connection-brand { color: #d7c298; font-family: Georgia, serif; font-size: 19px; letter-spacing: .06em; }
.login-connection-emblem { width: 68px; height: 68px; display: grid; place-items: center; margin: 28px auto 23px; color: #dfb974; border: 1px solid #c69a535c; border-radius: 50%; background: #c79b4910; box-shadow: 0 0 36px #b8832512; }
.login-connection-emblem svg { width: 42px; height: 42px; }
.login-connection-kicker { color: #b69b6e; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; }
.login-box .login-connection-panel h1 { margin: 12px 0 16px; color: #f3e5c9; font-family: Georgia, serif; font-size: 29px; font-weight: 400; line-height: 1.2; }
.login-connection-copy { margin: 0 auto; max-width: 370px; color: #bdb29d; font-size: 14px; line-height: 1.7; }
.login-connection-status { display: flex; justify-content: center; align-items: center; gap: 9px; margin: 24px 0; padding: 13px 8px; border-top: 1px solid #bd98582b; border-bottom: 1px solid #bd98582b; color: #d9bd89; font-size: 12px; }
.login-connection-status span { width: 6px; height: 6px; border-radius: 50%; background: #d6a85c; box-shadow: 0 0 9px #d6a85c55; }
.login-connection-panel .login-primary-action { min-height: 46px; margin: 0; background: linear-gradient(#c2a06a, #987442); border-color: #d6b782; color: #20180e; }
.login-connection-panel .login-primary-action:focus-visible { outline: 2px solid #f4dba8; outline-offset: 4px; }
.login-connection-panel .login-primary-action:disabled { opacity: .65; cursor: wait; }
.login-connection-hint { margin: 15px 0 0; color: #918573; font-size: 11px; line-height: 1.5; }
.login-overlay-disconnected .login-community-links { flex-direction: row; justify-content: center; gap: 24px; }
.login-overlay-disconnected .login-community-link { width: auto; min-height: 30px; padding: 4px; background: transparent; border-color: transparent; color: #c1b297; font-size: 12px; font-weight: 400; }
.login-overlay-disconnected .login-community-link-website img,
.login-overlay-disconnected .login-studio-badge { display: none; }
@media (max-width: 640px) {
  .login-connection-panel { padding: 28px 24px; }
  .login-box .login-connection-panel h1 { font-size: 25px; }
  .login-overlay-disconnected .login-box,
  .login-overlay-disconnected .login-overlay-footer { width: 100%; }
}
