.server-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 10, 11, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.server-auth-overlay[hidden] {
  display: none;
}

.server-auth-card [hidden] {
  display: none !important;
}

.server-auth-card {
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.server-auth-card .server-auth-kicker {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
}

.server-auth-card h2 {
  margin: 7px 0 5px;
  color: var(--text);
  font-size: 23px;
}

.server-auth-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.server-auth-card label {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.server-auth-card input {
  width: 100%;
  height: 40px;
}

.server-auth-card button {
  width: 100%;
  height: 42px;
  margin-top: 4px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.server-auth-purchase { display: block; margin: 0 0 8px; color: var(--cyan); font-size: 10px; font-weight: 900; text-align: right; text-decoration: none; }

.server-auth-switch {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid var(--line2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--field);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.server-auth-error {
  min-height: 18px;
  margin: 11px 0 0 !important;
  color: var(--red) !important;
}

.app-user-bar {
  position: fixed;
  z-index: 9000;
  top: 16px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(520px, calc(100vw - 36px));
  min-height: 34px;
  padding: 5px 7px 5px 11px;
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.app-user-bar[hidden] { display: none; }
.app-top-button { display:inline-flex; align-items:center; justify-content:center; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); color: var(--text); font-size: 10px; font-weight: 900; text-decoration: none; cursor: pointer; white-space: nowrap; }
.app-announcement-list { display: grid; gap: 10px; max-height: 55vh; overflow: auto; }
.app-announcement-list article { padding: 10px; border: 1px solid var(--line); background: var(--field); }
.app-announcement-list h3 { font-size: 13px; }
.app-announcement-list h3 small { color: var(--yellow); font-size: 9px; }
.app-announcement-list time { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.app-announcement-list p { margin-top: 7px; color: var(--text); font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.app-user-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 900; }
.app-user-expiry { color: var(--muted); font-size: 10px; white-space: nowrap; }
.app-merge-button { height: 26px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 3px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.app-merge-overlay { position: fixed; inset: 0; z-index: 10010; display: grid; place-items: center; padding: 18px; background: rgba(5, 6, 7, .74); backdrop-filter: blur(3px); }
.app-merge-overlay[hidden] { display: none; }
.app-merge-card { width: min(460px, 100%); padding: 18px; border: 1px solid var(--line2); border-radius: 4px; background: var(--panel); color: var(--text); box-shadow: 0 18px 54px rgba(0,0,0,.48); }
.app-merge-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 13px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.app-merge-head strong { font-size: 17px; }
.app-merge-head p { margin-top: 4px; color: var(--muted); font-size: 10px; }
.app-merge-close { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; }
.app-merge-card label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.app-merge-card input { width: 100%; height: 38px; }
.app-merge-error { min-height: 18px; margin: 10px 0 0; color: var(--red); font-size: 10px; }
.app-merge-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.app-merge-actions button { height: 36px; border: 1px solid var(--line2); border-radius: 3px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 900; cursor: pointer; }
.app-merge-actions button.secondary { background: var(--field); color: var(--text); }
@media (max-width: 760px) {
  .app-user-bar { top: 8px; right: 8px; left: 8px; max-width: none; justify-content: flex-start; }
  .app-user-name { max-width: 30vw; }
  .app-user-expiry { overflow: hidden; text-overflow: ellipsis; }
}

body.server-locked > .app {
  pointer-events: none;
  user-select: none;
}

body .registrar-switch a[hidden] {
  display: none !important;
}

body .registrar-switch[data-permission-pending] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  pointer-events: none;
}

body .registrar-switch[data-permission-pending] a {
  display: flex;
}

body .registrar-switch-placeholder {
  display: none;
  grid-column: 1 / -1;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line2);
  border-radius: 2px;
  background: var(--panel2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  opacity: .86;
}

body .registrar-switch[data-permission-pending] .registrar-switch-placeholder {
  display: flex;
}

.server-announcement {
  position: fixed;
  z-index: 10001;
  top: 14px;
  left: 50%;
  width: min(760px, calc(100vw - 28px));
  min-height: 58px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: start;
  padding: 12px 12px 12px 15px;
  border: 1px solid var(--yellow);
  border-radius: 6px;
  background: #211b0d;
  color: var(--text);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.42);
}

.server-announcement strong {
  display: block;
  color: var(--yellow);
  font-size: 12px;
}

.server-announcement p {
  margin: 5px 0 0;
  color: #f2e6c1;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.server-announcement button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 4px;
  background: transparent;
  color: var(--yellow);
  font-size: 20px;
  cursor: pointer;
}

.server-paused-banner {
  position: fixed;
  z-index: 10000;
  right: 14px;
  bottom: 14px;
  max-width: min(460px, calc(100vw - 28px));
  padding: 11px 14px;
  border: 1px solid var(--red);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.server-paused-banner strong,
.server-paused-banner span {
  display: block;
}

.server-paused-banner strong {
  color: var(--red);
  font-size: 12px;
}

.server-paused-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 600px) {
  .server-announcement {top: 8px;width: calc(100vw - 16px)}
  .server-paused-banner {right: 8px;bottom: 8px;max-width: calc(100vw - 16px)}
}

.server-auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.server-auth-code-row label {
  min-width: 0;
  margin-bottom: 0;
}

.server-auth-code-row > button {
  width: auto;
  min-width: 104px;
  height: 40px;
  margin-top: 0;
  align-self: end;
  white-space: nowrap;
}

#serverAuthBindingSubmit {
  margin-top: 14px;
}

.captcha-key-label-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:5px}
.captcha-key-label-row label{min-width:0;margin-bottom:0}
.captcha-key-actions{display:flex;align-items:center;flex:0 0 auto;margin-top:0}
.captcha-key-link{min-height:24px;padding:0 8px;border:1px solid var(--line);border-radius:3px;background:var(--field);color:var(--muted);display:inline-flex;align-items:center;justify-content:center;font-size:9px;font-weight:900;text-decoration:none}
.captcha-key-link:hover,.captcha-key-link:focus-visible{border-color:var(--line2);color:var(--text)}
