:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --text: #151515;
  --muted: #707070;
  --line: #e7e7ea;
  --line-2: #d8d8de;
  --accent: #111111;
  --accent-soft: #f0f0f2;
  --danger: #d93025;
  --ok: #167a3a;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(20, 20, 25, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}
.narrow { width: min(760px, calc(100% - 40px)); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
}
.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.nav a, .langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #303030;
  font-weight: 650;
  font-size: 14px;
}
.nav a:hover, .langs a:hover, .langs a.active { background: var(--accent-soft); }
.langs { display: flex; gap: 4px; align-items: center; }
.langs a { font-size: 12px; min-height: 32px; padding: 6px 9px; }
.header-menu { display: contents; }
.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #fff;
  color: #111;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(20, 20, 25, .06);
}
.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.mobile-menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.button {
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.secondary, .button.ghost {
  background: #fff;
  color: #111;
  border-color: var(--line-2);
}
.button.secondary:hover, .button.ghost:hover { border-color: #111; }
.button.small { min-height: 38px; padding: 8px 12px; }
.button.mini { min-height: 34px; padding: 7px 11px; font-size: 13px; }
.button.danger { background: #fff; color: var(--danger); border-color: #f1b8b2; }

.alert {
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
  color: #222;
}
.alert.error { border-color: #f0c8c4; background: #fff7f6; color: #8f1e16; }

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(0,0,0,.045), transparent 36%),
    linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
.hero-grid {
  min-height: 410px;
  padding: 78px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #555;
  margin-bottom: 16px;
}
h1, h2, h3 { line-height: 1.08; margin: 0; letter-spacing: -.045em; }
h1 { font-size: clamp(42px, 7vw, 78px); }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 22px; }
p { margin: 0; color: var(--muted); }
.hero p { max-width: 650px; font-size: 19px; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.stats-box {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stats-box div {
  min-height: 92px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.stats-box b { font-size: 34px; letter-spacing: -.05em; }
.stats-box span { color: var(--muted); font-weight: 700; }

.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-head p { margin-top: 8px; }

.filters {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(20,20,25,.05);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 230px auto;
  gap: 10px;
  margin-bottom: 18px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #111; box-shadow: 0 0 0 4px rgba(0,0,0,.06); }
textarea { resize: vertical; }

.server-list { display: grid; gap: 14px; }
.server-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(20,20,25,.05);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: center;
}
.server-main { min-width: 0; display: flex; align-items: center; gap: 16px; }
.server-icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 24px;
}
.server-icon.large { width: 82px; height: 82px; border-radius: 24px; font-size: 34px; }
.server-card h3 a:hover { text-decoration: underline; }
.server-card p { margin-top: 7px; max-width: 720px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags span, .status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 750;
  color: #444;
}
.server-side {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 9px;
  text-align: right;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f4f4f5;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 7px;
  color: #1f1f1f;
  word-break: break-word;
}
.server-side strong { font-size: 18px; }

.card, .table-card, .empty-state {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
}
.card h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 10px; }
.muted { margin-bottom: 20px; }
.form { display: grid; gap: 14px; margin-top: 18px; }
.form label { display: grid; gap: 8px; font-weight: 800; color: #282828; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.table-card { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #fafafa; font-size: 13px; color: #555; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.status.approved { background: #f0faf4; color: var(--ok); border-color: #ccebd7; }
.status.pending { background: #fff9e8; color: #8a6400; border-color: #f1dfaa; }
.status.rejected { background: #fff3f2; color: var(--danger); border-color: #f0c8c4; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }

.server-detail { display: grid; gap: 22px; }
.copy-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 16px;
}
.empty-state { text-align: center; }
.empty-state h1, .empty-state h3 { margin-bottom: 8px; }
.empty-state pre { white-space: pre-wrap; text-align: left; background: #fafafa; border: 1px solid var(--line); border-radius: 14px; padding: 14px; overflow: auto; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.footer-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 0;
  }
  .brand { min-width: 0; }
  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-menu-toggle { display: inline-flex; }
  .header-menu {
    grid-column: 1 / -1;
    width: 100%;
    display: none;
    margin-top: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 50px rgba(20, 20, 25, .10);
  }
  .header-menu.is-open {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .nav a,
  .nav a.button.small {
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
    min-height: 42px;
    padding: 10px 12px;
  }
  .langs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .langs a { border-radius: 12px; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; padding: 52px 0; }
  .filters { grid-template-columns: 1fr; }
  .server-card { grid-template-columns: 1fr; }
  .server-side { justify-items: start; text-align: left; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .container, .narrow { width: min(100% - 24px, 1180px); }
  h1 { font-size: 38px; }
  .hero p { font-size: 16px; }
  .server-main { align-items: flex-start; }
  .two-cols { grid-template-columns: 1fr; }
  .card, .table-card, .empty-state { border-radius: 20px; padding: 18px; }
  .server-card { border-radius: 20px; padding: 14px; }
}


/* GIF + server icons addon — still white/simple */
.server-card {
  overflow: hidden;
  padding: 0;
}
.server-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: center;
  padding: 18px;
}
.server-banner,
.detail-banner {
  display: block;
  border-bottom: 1px solid var(--line);
  background: #f6f6f7;
}
.server-banner img,
.detail-banner img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}
.detail-banner {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.detail-banner img { height: 120px; }
.server-icon-img {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 20, 25, .08);
}
.server-icon-img.large {
  width: 82px;
  height: 82px;
  border-radius: 24px;
}
.server-info { min-width: 0; }
.players-pill {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
}
.hint {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 900px) {
  .server-row { grid-template-columns: 1fr; }
  .stats-box { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .server-row { padding: 14px; }
  .server-banner img { height: 68px; }
  .detail-banner img { height: 90px; }
  .stats-box { grid-template-columns: 1fr; }
}

/* V4 layout fix: banner/icon/card blocks must never overlap */
.server-card {
  display: block !important;
  grid-template-columns: none !important;
  align-items: initial !important;
  width: 100%;
  min-height: 0;
}
.server-banner {
  width: 100%;
  grid-column: auto !important;
}
.server-banner img {
  width: 100%;
  height: 92px;
  object-fit: cover;
}
.server-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 18px;
  align-items: center;
}
.server-main {
  min-width: 0;
  width: 100%;
}
.server-info {
  min-width: 0;
  width: 100%;
}
.server-info p {
  max-width: none;
  overflow-wrap: anywhere;
}
.server-side {
  min-width: 210px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}
.server-side code {
  max-width: 100%;
  white-space: normal;
  text-align: right;
}
.server-side form,
.server-side .button {
  max-width: 100%;
}
@media (max-width: 760px) {
  .server-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .server-side {
    min-width: 0;
    align-items: flex-start;
    text-align: left;
  }
  .server-side code { text-align: left; }
}
@media (max-width: 520px) {
  .server-main {
    flex-direction: column;
    align-items: flex-start;
  }
  .server-banner img { height: 72px; }
}

/* Frenklu API/vote bridge */
.vote-form {
    display: grid;
    gap: 8px;
}
.vote-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    outline: none;
}
.vote-form input:focus {
    border-color: #111827;
}
.detail-vote {
    max-width: 420px;
    margin-top: 16px;
}
.api-key {
    display: block;
    max-width: 320px;
    white-space: normal;
    word-break: break-all;
    font-size: 12px;
    line-height: 1.45;
}
.api-help {
    margin-top: 18px;
}
.api-help code {
    word-break: break-all;
}

/* Server modes / subservers */
.mode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.mode-list.compact { margin-top: 10px; }
.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #333;
}
.mode-chip b {
  font-size: 12px;
  color: var(--muted);
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.mode-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(20,20,25,.05);
  padding: 18px;
  display: grid;
  gap: 12px;
}
.mode-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.mode-card h3 { margin-bottom: 8px; }
.mode-actions { margin-top: 4px; }
.token-label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #282828;
}
.config-example {
  margin: 12px 0 0;
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 14px;
  color: #222;
}
.add-mode-card { margin-top: 18px; }
.detail-modes { margin: 0; }
.public-mode { box-shadow: none; background: var(--surface-2); }
@media (max-width: 900px) {
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card-head { flex-direction: column; }
}

/* Player-verified reviews */
.reviews-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: grid;
  gap: 18px;
}
.reviews-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}
.reviews-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}
.review-form {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-2);
  padding: 18px;
}
.reviews-list {
  display: grid;
  gap: 12px;
}
.review-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}
.review-card p {
  margin-top: 10px;
  color: #333;
  overflow-wrap: anywhere;
}
.review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.review-meta strong {
  font-weight: 900;
}
.review-meta span {
  color: #111;
  letter-spacing: .04em;
}
.review-meta em,
.review-meta time {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
}
.small-empty {
  box-shadow: none;
  padding: 18px;
}

.verify-code-box {
    margin: 18px 0;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(255, 255, 255, 0.98));
}
.verify-code-box h2 { margin-bottom: 8px; }
.verify-code-box input[name="verification_code"] {
    font-size: 22px;
    letter-spacing: 6px;
    text-align: center;
    font-weight: 800;
}

/* Monitoring plan additions */
.maintenance-banner {
  border-bottom: 1px solid #ead38a;
  background: #fff8dc;
  color: #5f4600;
  font-weight: 800;
  padding: 10px 0;
}
.promo-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border: 1px solid #ead38a;
  background: #fff8dc;
  color: #5f4600;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
}
.players-pill.technical,
.status.technical {
  background: #fff8dc !important;
  color: #5f4600 !important;
  border-color: #ead38a !important;
}
.copy-ip {
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.copy-ip:hover,
.copy-ip.copied,
.copy-btn.copied {
  border-color: #111 !important;
  background: #f0f0f2 !important;
  transform: translateY(-1px);
}
.copy-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.copy-box span {
  color: var(--muted);
  font-weight: 800;
}
.token-actions {
  margin-top: -4px;
}
.wizard-dots {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.wizard-dots span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--muted);
}
.wizard-dots span.active {
  background: #111;
  border-color: #111;
  color: #fff;
}
.add-server-wizard h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 12px;
}
.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 560px) {
  .copy-box { align-items: stretch; }
  .copy-box .button { width: 100%; }
}
.mode-chip.technical {
  border-color: #ead38a;
  background: #fff8dc;
  color: #5f4600;
}
.mode-chip.technical b { color: #5f4600; }

.players-pill.online,
.status.online {
  background: #87ff99 !important;
  color: #2a2a2a !important;
  border-color: #58f74f !important;
}
.mode-chip.online {
  border-color: #58f74f;
  background: #87ff99;
  color: #2a2a2a;
}
.mode-chip.online b { color: #2a2a2a; }

.players-pill.offline,
.status.offline {
  background: #ff8787 !important;
  color: #0f0f0f !important;
  border-color: #f74f4f !important;
}
.mode-chip.offline {
  border-color: #f74f4f;
  background: #ff8787;
  color: #0f0f0f;
}
.mode-chip.offline b { color: #0f0f0f; }

/* Noto Animated Emoji hero/stat integration */
.hero-emoji-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.noto-emoji {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 20, 25, .08);
  overflow: hidden;
}
.noto-emoji picture,
.noto-emoji img {
  display: block;
  width: 40px;
  height: 40px;
}
.noto-emoji img {
  object-fit: contain;
}
.noto-emoji-fallback {
  display: none;
  font-size: 30px;
  line-height: 1;
}
.noto-emoji.is-broken picture {
  display: none;
}
.noto-emoji.is-broken .noto-emoji-fallback {
  display: block;
}
.hero-emoji-strip .noto-emoji:nth-child(2),
.stats-box .stat-card:nth-child(2) .noto-emoji {
  transform: rotate(3deg);
}
.hero-emoji-strip .noto-emoji:nth-child(3),
.stats-box .stat-card:nth-child(3) .noto-emoji {
  transform: rotate(-3deg);
}
.stats-box .stat-card {
  align-items: center;
}
.stat-text {
  display: grid;
  gap: 2px;
}
.stats-box .noto-emoji {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  box-shadow: none;
}
.stats-box .noto-emoji picture,
.stats-box .noto-emoji img {
  width: 36px;
  height: 36px;
}
@media (max-width: 560px) {
  .hero-emoji-strip .noto-emoji {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }
  .hero-emoji-strip .noto-emoji picture,
  .hero-emoji-strip .noto-emoji img {
    width: 34px;
    height: 34px;
  }
}

/* Updated status colors */
.players-pill.online,
.status.online {
  background: #dafbdf !important;
  color: #2a2a2a !important;
  border-color: #7dd278 !important;
}
.mode-chip.online {
  border-color: #7dd278 !important;
  background: #dafbdf !important;
  color: #2a2a2a !important;
}
.mode-chip.online b { color: #2a2a2a !important; }

/* Hero stats width/overflow fix */
@media (min-width: 901px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 480px) !important;
  }

  .stats-box {
    width: min(100%, 480px);
    justify-self: end;
  }
}

.stats-box .stat-card {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 12px;
  overflow: hidden;
}

.stats-box .stat-text {
  min-width: 0;
  overflow: hidden;
}

.stats-box .stat-text b {
  display: block;
  max-width: 100%;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-box .stat-text span {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-box .noto-emoji {
  flex: 0 0 auto;
  justify-self: end;
}

@media (max-width: 560px) {
  .stats-box .stat-text b {
    font-size: clamp(24px, 8vw, 32px);
  }
}

/* Black floating dust particles for the hero block */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: relative;
  z-index: 2;
}
.hero-dust-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--dust-size, 6px);
  height: var(--dust-size, 6px);
  border-radius: 999px;
  background: rgba(0, 0, 0, var(--dust-alpha, .52));
  box-shadow: 0 0 9px rgba(0, 0, 0, .28);
  pointer-events: none;
  z-index: 1;
  will-change: transform, opacity;
  transform: translate3d(var(--dust-x, 0px), var(--dust-y, 0px), 0) scale(.45);
  opacity: 0;
  animation: heroDustParticle var(--dust-duration, 5600ms) cubic-bezier(.22, .61, .36, 1) forwards;
}
@keyframes heroDustParticle {
  0% {
    opacity: 0;
    transform: translate3d(var(--dust-x, 0px), var(--dust-y, 0px), 0) scale(.35);
  }
  14% {
    opacity: var(--dust-alpha, .52);
    transform: translate3d(calc(var(--dust-x, 0px) + var(--dust-dx1, 18px)), calc(var(--dust-y, 0px) + var(--dust-dy1, -22px)), 0) scale(1);
  }
  72% {
    opacity: var(--dust-alpha, .52);
    transform: translate3d(calc(var(--dust-x, 0px) + var(--dust-dx2, 70px)), calc(var(--dust-y, 0px) + var(--dust-dy2, -86px)), 0) scale(.96);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--dust-x, 0px) + var(--dust-dx3, 105px)), calc(var(--dust-y, 0px) + var(--dust-dy3, -128px)), 0) scale(.18);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dust-particle {
    display: none;
  }
}
@media (max-width: 560px) {
  .hero-dust-particle {
    box-shadow: 0 0 6px rgba(0, 0, 0, .18);
  }
}

.toast-stack {
  position: fixed;
  top: 86px;
  right: 22px;
  z-index: 99999;
  width: min(430px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 14px;
  border: 1px solid #dfdfdf;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  color: #1f1f1f;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: toastInDesktop .34s cubic-bezier(.2, .9, .2, 1) both;
  overflow: hidden;
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #bdbdbd;
}

.toast-success,
.toast-info {
  border-color: #9bdc9f;
  background: rgba(242, 255, 244, .97);
}
.toast-success::before,
.toast-info::before { background: #68c96e; }

.toast-error,
.toast-danger {
  border-color: #ffb0b0;
  background: rgba(255, 242, 242, .98);
}
.toast-error::before,
.toast-danger::before { background: #f74f4f; }

.toast-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  background: #f2f2f2;
  color: #222;
}
.toast-success .toast-icon,
.toast-info .toast-icon {
  background: #dafbdf;
  color: #1f4b24;
}
.toast-error .toast-icon,
.toast-danger .toast-icon {
  background: #ff8787;
  color: #0f0f0f;
}

.toast-message {
  min-width: 0;
  padding-top: 4px;
  font-size: 14px;
  line-height: 1.38;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.toast-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #555;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.toast-close:hover {
  background: rgba(0, 0, 0, .06);
  color: #111;
  transform: scale(1.04);
}

.toast.is-hiding {
  animation: toastOut .24s ease both;
}

@keyframes toastInDesktop {
  from { opacity: 0; transform: translateX(28px) translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}

@keyframes toastInMobile {
  0% { opacity: 0; transform: translateY(-34px) scale(.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-12px) scale(.98); }
}

@media (max-width: 700px) {
  .toast-stack {
    top: 10px;
    left: 12px;
    right: 12px;
    width: auto;
    gap: 10px;
  }

  .toast {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 9px;
    padding: 13px 12px;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
    animation-name: toastInMobile;
  }

  .toast-icon,
  .toast-close {
    width: 28px;
    height: 28px;
  }

  .toast-message {
    font-size: 13.5px;
    line-height: 1.34;
    padding-top: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-hiding {
    animation: none !important;
  }
}

/* Beautiful select + online/offline mode status */
.form select,
.vote-form select,
.detail-vote select,
.review-form select,
select.fr-select {
  width: 100%;
  min-height: 50px;
  padding: 0 48px 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background-color: #ffffff;
  color: #222222;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #2a2a2a 50%),
    linear-gradient(135deg, #2a2a2a 50%, transparent 50%),
    linear-gradient(to right, #f4f4f5, #f4f4f5);
  background-position:
    calc(100% - 23px) 21px,
    calc(100% - 16px) 21px,
    calc(100% - 42px) 50%;
  background-size: 7px 7px, 7px 7px, 1px 28px;
  background-repeat: no-repeat;
}

.form select:hover,
.vote-form select:hover,
.detail-vote select:hover,
.review-form select:hover,
select.fr-select:hover {
  border-color: #cfd4dc;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.form select:focus,
.vote-form select:focus,
.detail-vote select:focus,
.review-form select:focus,
select.fr-select:focus {
  border-color: #7dd278;
  background-color: #fbfffc;
  box-shadow: 0 0 0 4px rgba(125, 210, 120, 0.22), 0 14px 32px rgba(15, 23, 42, 0.10);
}

.form select:disabled,
.vote-form select:disabled,
.detail-vote select:disabled,
.review-form select:disabled,
select.fr-select:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.form select option,
.vote-form select option,
.detail-vote select option,
.review-form select option,
select.fr-select option {
  color: #222222;
  background: #ffffff;
  font-weight: 600;
}

.form select.select-online,
.vote-form select.select-online,
.detail-vote select.select-online,
select.fr-select.select-online {
  border-color: #7dd278 !important;
  background-color: #dafbdf !important;
  color: #2a2a2a !important;
  box-shadow: 0 0 0 4px rgba(125, 210, 120, 0.18), 0 14px 32px rgba(15, 23, 42, 0.08) !important;
}

.form select.select-offline,
.vote-form select.select-offline,
.detail-vote select.select-offline,
select.fr-select.select-offline {
  border-color: #f74f4f !important;
  background-color: #ffe1e1 !important;
  color: #151515 !important;
  box-shadow: 0 0 0 4px rgba(247, 79, 79, 0.16), 0 14px 32px rgba(15, 23, 42, 0.08) !important;
}

.form select.select-offline:focus,
.vote-form select.select-offline:focus,
.detail-vote select.select-offline:focus,
select.fr-select.select-offline:focus {
  border-color: #f74f4f !important;
  background-color: #ffe1e1 !important;
  box-shadow: 0 0 0 4px rgba(247, 79, 79, 0.24), 0 14px 32px rgba(15, 23, 42, 0.10) !important;
}

.form select.select-technical,
.vote-form select.select-technical,
.detail-vote select.select-technical,
select.fr-select.select-technical {
  border-color: #f2c94c !important;
  background-color: #fff6cf !important;
  color: #2a2a2a !important;
  box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.18), 0 14px 32px rgba(15, 23, 42, 0.08) !important;
}

@media (max-width: 640px) {
  .form select,
  .vote-form select,
  .detail-vote select,
  .review-form select,
  select.fr-select {
    min-height: 48px;
    border-radius: 14px;
    font-size: 14px;
    padding-left: 14px;
    padding-right: 46px;
  }
}

/* Vote form: keep server selector neutral until a mode is chosen */
.detail-vote .mode-status-select.select-neutral,
.vote-form select.select-neutral,
select.fr-select.select-neutral {
  border-color: #e5e7eb !important;
  background-color: #ffffff !important;
  color: #6b7280 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

.detail-vote .mode-status-select option[disabled] {
  color: #9ca3af;
}

.vote-extra-fields {
  display: grid;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px) scale(0.985);
  pointer-events: none;
  transition:
    max-height .36s ease,
    opacity .22s ease,
    transform .28s ease;
}

.vote-extra-fields.is-visible {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.vote-extra-fields input {
  animation: voteInputPop .28s ease both;
}

@keyframes voteInputPop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vote-extra-fields,
  .vote-extra-fields input {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* Multi-language / multi-mode server editor */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.choice-pill {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 62px;
  padding: 12px 12px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.choice-pill:hover {
  transform: translateY(-1px);
  border-color: #cfd4dc;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.choice-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-pill span {
  color: #191919;
  font-weight: 900;
  letter-spacing: .03em;
}

.choice-pill small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.choice-pill:has(input:checked) {
  border-color: #7dd278;
  background: #dafbdf;
  box-shadow: 0 0 0 4px rgba(125, 210, 120, .20), 0 14px 32px rgba(15, 23, 42, .08);
}

.language-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: #444;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.language-badge.muted {
  border-color: #e5e7eb;
  background: #f7f7f8;
  color: #6b7280;
}

.language-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-editor {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.mode-edit-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e7e7ea;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfbfc);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
}

.mode-edit-row h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #1f2937;
}

.danger-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: #b42318;
  font-weight: 800;
}

.danger-check input {
  width: auto !important;
}

.dashboard-actions {
  flex-wrap: wrap;
  gap: 7px;
}

.server-preview-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
}

.preview-banner {
  overflow: hidden;
  border-radius: 18px;
  background: #f3f4f6;
  aspect-ratio: 5 / 1.35;
}

.preview-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.preview-icon {
  flex: 0 0 auto;
  overflow: hidden;
}

.preview-icon.has-image {
  background: #fff;
}

.preview-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-main h3 {
  margin: 0 0 6px;
  font-size: 23px;
}

.preview-main p {
  margin: 0 0 12px;
  color: #555;
}

.preview-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-page-card {
  animation: previewFadeIn .24s ease both;
}

@keyframes previewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .preview-main {
    flex-direction: column;
  }
  .dashboard-actions {
    display: grid;
  }
}

/* Fix language badges alignment inside server tags */
.tags {
  align-items: center !important;
}

.tags > span,
.tags .status,
.tags .players-pill,
.tags .language-badge {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 5px 10px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.tags .language-badge {
  min-width: 34px !important;
  border-color: var(--line) !important;
  background: var(--surface-2) !important;
  color: #444 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.tags .language-badge.muted {
  border-color: #e5e7eb !important;
  background: #f7f7f8 !important;
  color: #6b7280 !important;
}

.language-inline {
  align-items: center !important;
}

.language-inline .language-badge {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  height: 28px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}


/* Mode list compact as server tags, with status colors preserved */
.mode-list.compact {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 12px !important;
}

.mode-list.compact .mode-chip {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
    gap: 7px !important;
    box-shadow: none !important;
    vertical-align: middle !important;
}

.mode-list.compact .mode-chip b {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    color: inherit !important;
}

.mode-list.compact .mode-chip.online {
    border-color: #7dd278 !important;
    background: #dafbdf !important;
    color: #2a2a2a !important;
}

.mode-list.compact .mode-chip.offline {
    border-color: #f74f4f !important;
    background: #ff8787 !important;
    color: #0f0f0f !important;
}

.mode-list.compact .mode-chip.technical {
    border-color: #ead38a !important;
    background: #fff8dc !important;
    color: #5f4600 !important;
}


/* Mode compact hover status tooltip + calmer online weight */
.mode-list.compact .mode-chip {
    position: relative !important;
}

.mode-list.compact .mode-chip[data-status-tooltip]::after {
    content: attr(data-status-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translateX(-50%) translateY(4px);
    z-index: 30;
    pointer-events: none;
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 999px;
    background: #111111;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
    transition: opacity .16s ease, transform .16s ease;
}

.mode-list.compact .mode-chip[data-status-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(4px);
    z-index: 31;
    pointer-events: none;
    border: 5px solid transparent;
    border-top-color: #111111;
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease;
}

.mode-list.compact .mode-chip[data-status-tooltip]:hover::after,
.mode-list.compact .mode-chip[data-status-tooltip]:focus-visible::after,
.mode-list.compact .mode-chip[data-status-tooltip]:hover::before,
.mode-list.compact .mode-chip[data-status-tooltip]:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mode-list.compact .mode-chip.online,
.mode-list.compact .mode-chip.online b,
.players-pill.online,
.status.online {
    font-weight: 600 !important;
}

/* Mode online/count text should not be bold */
.mode-list.compact .mode-chip > b,
.mode-list.compact .mode-chip.online > b,
.mode-list.compact .mode-chip.offline > b,
.mode-list.compact .mode-chip.technical > b {
    font-weight: 500 !important;
}

.mode-list.compact .mode-chip.online,
.players-pill.online,
.status.online {
    font-weight: 500 !important;
}

/* Public online history chart */
.server-public-section {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

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

.section-mini-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.section-mini-head p {
  margin: 0;
  color: var(--muted);
}

.chart-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  flex: 0 0 auto;
}

.chart-tab {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  background: transparent;
  color: #444;
  font-weight: 650;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.chart-tab:hover {
  transform: translateY(-1px);
}

.chart-tab.active {
  background: #ffffff;
  color: #111;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.online-chart-panel {
  overflow: hidden;
  border: 1px solid #eceef2;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
}

.online-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
}

.online-grid-line {
  stroke: #e8eaef;
  stroke-width: 1;
}

.online-axis-label,
.online-x-label {
  fill: #777;
  font-size: 12px;
  font-weight: 600;
}

.online-x-label.end {
  text-anchor: end;
}

.online-line {
  fill: none;
  stroke: #111111;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.online-point circle {
  fill: #111111;
  stroke: #ffffff;
  stroke-width: 2;
}

.online-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

/* Server screenshots */
.screenshots-grid,
.preview-screenshots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.screenshot-card,
.preview-screenshot-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.screenshot-card img,
.preview-screenshot-card img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}

.screenshot-card:hover img {
  transform: scale(1.035);
}

.screenshot-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.screenshots-editor {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.screenshots-editor h3 {
  margin: 0;
}

.screenshot-edit-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.screenshot-edit-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  border: 1px dashed #d5d8df;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 650;
}

.screenshot-edit-preview img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  display: block;
}

.screenshot-edit-fields {
  display: grid;
  gap: 10px;
}

@media (max-width: 820px) {
  .section-mini-head {
    flex-direction: column;
  }

  .chart-tabs {
    width: 100%;
  }

  .chart-tab {
    flex: 1;
  }

  .screenshots-grid,
  .preview-screenshots {
    grid-template-columns: 1fr;
  }

  .screenshot-edit-row {
    grid-template-columns: 1fr;
  }
}

/* Server public rating cards */
.rating-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.rating-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.rating-card .card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: #222222;
  font-size: 15px;
  font-weight: 650;
}

.rating-card .icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f7f7f8;
  border: 1px solid #eceef2;
  font-size: 18px;
}

.place-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 10px;
}

.place-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #171717;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.place-badge.green {
  background: #dafbdf;
  border-color: #7dd278;
}

.place-badge.orange {
  background: #fff0d2;
  border-color: #f2bf62;
}

.place-badge.blue {
  background: #dcecff;
  border-color: #86baf7;
}

.place-of {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.rating-card .card-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Public screenshots table */
.screenshots-table {
  display: grid;
  gap: 10px;
}

.screenshot-row {
  display: grid;
  grid-template-columns: 34px 94px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.screenshot-row:hover {
  transform: translateY(-1px);
  border-color: #d5d9e1;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.screenshot-row-number {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f5f5f6;
  border: 1px solid #eceef2;
  color: #555555;
  font-size: 13px;
  font-weight: 600;
}

.screenshot-row-thumb {
  width: 94px;
  height: 58px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.screenshot-row-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.screenshot-row-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.screenshot-row-info strong {
  color: #222222;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screenshot-row-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screenshot-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f6f7f9;
  border: 1px solid #eceef2;
  color: #222222;
  font-size: 13px;
  font-weight: 600;
}

.screenshots-empty {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed #d7dbe3;
  background: #fafafa;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .rating-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .screenshot-row-number,
  .screenshot-row-action {
    display: none;
  }

  .screenshot-row-thumb {
    width: 72px;
    height: 52px;
  }
}

/* Animated vote button near server title */
.server-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.server-title-row h1 {
  margin: 0;
}

.server-detail > .vote-hero-button {
  margin: 16px 0 4px;
}

.vote-hero-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid #7dd278;
  border-radius: 999px;
  background: linear-gradient(135deg, #dafbdf 0%, #ffffff 48%, #dafbdf 100%);
  color: #1e2a1f;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(125, 210, 120, .34), 0 0 0 0 rgba(125, 210, 120, .34);
  animation: votePulse 1.9s ease-in-out infinite;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  overflow: visible;
}

.vote-hero-button::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
  transform: translateX(-120%);
  transition: transform .52s ease;
}

.vote-hero-button span,
.vote-hero-button i {
  position: relative;
  z-index: 1;
}

.vote-hero-button i {
  display: inline-flex;
  font-style: normal;
  filter: drop-shadow(0 5px 8px rgba(15, 23, 42, .18));
  transform-origin: center bottom;
}

.vote-hero-button:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: #58bf52;
  box-shadow: 0 20px 48px rgba(125, 210, 120, .48), 0 8px 20px rgba(15, 23, 42, .08);
}

.vote-hero-button:hover::before {
  transform: translateX(120%);
}

.vote-hero-button:hover i {
  animation: rocketFly .72s ease-in-out both;
}

@keyframes votePulse {
  0%, 100% { box-shadow: 0 14px 36px rgba(125, 210, 120, .28), 0 0 0 0 rgba(125, 210, 120, .28); }
  50% { box-shadow: 0 18px 44px rgba(125, 210, 120, .42), 0 0 0 9px rgba(125, 210, 120, 0); }
}

@keyframes rocketFly {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  45% { transform: translate(12px, -16px) rotate(18deg) scale(1.18); opacity: 1; }
  70% { transform: translate(26px, -30px) rotate(24deg) scale(.92); opacity: 0; }
  71% { transform: translate(-16px, 18px) rotate(-16deg) scale(.85); opacity: 0; }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
}


/* Flying vote rewards from the vote button */
.server-action-stack {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.server-action-stack.has-vote-reward-layer::before {
  content: '';
  position: absolute;
  inset: -18px -22px 48px;
  z-index: 0;
  pointer-events: none;
}

.server-action-stack .vote-hero-button,
.server-action-stack .ip-copy-hero-button {
  position: relative;
  z-index: 3;
}

.vote-reward-viewport-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: visible;
  contain: layout style;
}

.vote-reward-flyer {
  position: absolute;
  left: var(--reward-left, 50%);
  top: var(--reward-top, 60px);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale(.78) rotate(var(--reward-r0, 0deg));
  opacity: 0;
  filter: none;
  animation: voteRewardFly var(--reward-duration, 2600ms) cubic-bezier(.22, .82, .22, 1) forwards;
  animation-delay: var(--reward-delay, 0ms);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.vote-reward-flyer.is-image {
  width: calc(var(--reward-img-size, 28px) + 12px);
  height: calc(var(--reward-img-size, 28px) + 12px);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .12), 0 0 0 4px rgba(255, 255, 255, .42);
}

.vote-reward-flyer.is-image img {
  width: var(--reward-img-size, 28px);
  height: var(--reward-img-size, 28px);
  object-fit: contain;
  filter: drop-shadow(0 6px 7px rgba(15, 23, 42, .18));
}

.vote-reward-flyer.is-text {
  min-height: 30px;
  max-width: 190px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 209, 102, .70);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #a86500;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .13), 0 0 0 4px rgba(255, 209, 102, .14);
}

.vote-reward-flyer.is-text strong {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}

.vote-reward-flyer.is-text:nth-child(4n + 1) {
  border-color: rgba(125, 210, 120, .65);
  color: #1d7c2a;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .13), 0 0 0 4px rgba(125, 210, 120, .13);
}

.vote-reward-flyer.is-text:nth-child(4n + 2) {
  border-color: rgba(255, 135, 135, .55);
  color: #c23a3a;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .13), 0 0 0 4px rgba(255, 135, 135, .11);
}

.vote-reward-flyer.is-text:nth-child(4n + 3) {
  border-color: rgba(94, 147, 255, .48);
  color: #315fb7;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .13), 0 0 0 4px rgba(94, 147, 255, .10);
}

@keyframes voteRewardFly {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 10px, 0) scale(.72) rotate(var(--reward-r0, 0deg));
  }
  18% {
    opacity: .98;
    transform: translate3d(calc(-50% + var(--reward-x1a, 0px)), calc(-14px + var(--reward-y1a, 0px)), 0) scale(.96) rotate(var(--reward-r1, 0deg));
  }
  52% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--reward-x1, 0px)), calc(-34px + var(--reward-y1, 0px)), 0) scale(1.02) rotate(var(--reward-r1, 0deg));
  }
  78% {
    opacity: .86;
    transform: translate3d(calc(-50% + var(--reward-x2a, 0px)), calc(-68px + var(--reward-y2a, 0px)), 0) scale(.98) rotate(var(--reward-r2, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--reward-x2, 0px)), calc(-92px + var(--reward-y2, 0px)), 0) scale(.84) rotate(var(--reward-r2, 0deg));
  }
}

.vote-reward-flyer.is-viewport-burst {
  position: fixed;
  z-index: 10000;
}

.vote-reward-flyer.is-idle {
  z-index: 2;
  opacity: 0;
  animation-name: voteRewardIdleAboveButton;
  animation-timing-function: cubic-bezier(.16, .74, .24, 1);
}

.vote-reward-flyer.is-idle.is-text {
  min-height: 29px;
  padding: 7px 11px;
  font-size: 12px;
}

.vote-reward-flyer.is-idle.is-image {
  background: rgba(255, 255, 255, .82);
}

@keyframes voteRewardIdleAboveButton {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 10px, 0) scale(.72) rotate(var(--reward-r0, 0deg));
  }
  18% {
    opacity: .86;
    transform: translate3d(calc(-50% + var(--reward-idle-x1a, 0px)), calc(-6px + var(--reward-idle-y1a, 0px)), 0) scale(.94) rotate(var(--reward-r1, 0deg));
  }
  42% {
    opacity: .94;
    transform: translate3d(calc(-50% + var(--reward-x1, 0px)), calc(-15px + var(--reward-y1, 0px)), 0) scale(1) rotate(var(--reward-r1, 0deg));
  }
  72% {
    opacity: .92;
    transform: translate3d(calc(-50% + var(--reward-idle-x1b, 0px)), calc(-20px + var(--reward-idle-y1b, 0px)), 0) scale(1.01) rotate(var(--reward-r1, 0deg));
  }
  90% {
    opacity: .55;
    transform: translate3d(calc(-50% + var(--reward-idle-x2a, 0px)), calc(-27px + var(--reward-idle-y2a, 0px)), 0) scale(.96) rotate(var(--reward-r2, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--reward-x2, 0px)), calc(-34px + var(--reward-y2, 0px)), 0) scale(.88) rotate(var(--reward-r2, 0deg));
  }
}

/* Vote panel with form + latest votes table */
.server-vote-panel {
  display: grid;
  gap: 18px;
  max-height: 0;
  margin: 0;
  padding: 0 18px;
  border: 0 solid transparent;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfffc 100%);
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px) scale(.985);
  transition: max-height .45s ease, opacity .28s ease, transform .28s ease, padding .28s ease, margin .28s ease, border-color .28s ease;
}

.server-vote-panel.is-open {
  max-height: 980px;
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid #d7efd9;
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .07);
}

.vote-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.vote-panel-head h2 {
  margin: 0 0 4px;
  font-size: clamp(20px, 3vw, 28px);
}

.vote-panel-head p {
  margin: 0;
  color: var(--muted);
}

.vote-panel-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.vote-panel-close:hover {
  transform: translateY(-2px);
  background: #fff1f1;
  border-color: #ffc4c4;
}

.vote-panel-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.server-vote-panel .detail-vote {
  max-width: none;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

.vote-leaderboard {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

.vote-leaderboard-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}

.vote-leaderboard-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.vote-leaderboard-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.vote-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.vote-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.vote-history-table th,
.vote-history-table td {
  padding: 12px 16px;
  border-top: 1px solid #f0f1f3;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.vote-history-table th {
  color: #6b7280;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
  background: #fafafa;
}

.vote-history-table tbody tr {
  transition: background .16s ease;
}

.vote-history-table tbody tr:hover {
  background: #fbfffc;
}

.vote-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f4f4f5;
  color: #3f3f46;
  font-weight: 650;
}

.vote-player-name {
  color: #171717;
  font-weight: 650;
}

.vote-score-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #7dd278;
  background: #dafbdf;
  color: #2a2a2a;
  font-weight: 650;
  white-space: nowrap;
}

.vote-score-change b {
  color: #1e9a39;
  font-weight: 750;
}

.vote-leaderboard-empty {
  margin: 0 16px 16px;
  padding: 14px;
  border-radius: 16px;
  background: #f7f7f8;
  color: var(--muted);
}

@media (max-width: 860px) {
  .vote-panel-grid {
    grid-template-columns: 1fr;
  }
  .server-vote-panel.is-open {
    max-height: 1280px;
  }
}

@media (max-width: 560px) {
  .server-title-row {
    align-items: flex-start;
  }
  .vote-hero-button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }
  .server-vote-panel.is-open {
    padding: 14px;
    border-radius: 22px;
  }
  .vote-panel-head {
    align-items: center;
  }
  .vote-history-table th,
  .vote-history-table td {
    padding: 11px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vote-hero-button,
  .vote-hero-button:hover i,
  .vote-reward-flyer {
    animation: none !important;
  }
  .server-vote-panel {
    transition: none;
  }
}

/* Dynamic server action buttons */
.server-action-stack {
  width: min(100%, 448px);
  margin: 16px auto 6px;
  display: grid;
  gap: 11px;
}

.server-action-stack .vote-hero-button {
  width: 100%;
  min-height: 54px;
  margin: 0;
  border-radius: 18px;
  font-size: 15px;
}

.ip-copy-hero-button {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  color: #111827;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.ip-copy-hero-button:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 210, 120, .75);
  background: #fbfffc;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .09), 0 0 0 4px rgba(125, 210, 120, .12);
}

.ip-copy-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 0 0 18px 18px;
  background: #7dd278;
  transition: height .22s ease, background .22s ease;
}

.ip-copy-hero-button.is-copied .ip-copy-line {
  height: 6px;
  background: #19b85c;
}

.ip-copy-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 650;
  transition: opacity .24s ease, transform .24s ease;
}

.ip-copy-layer svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.ip-copy-default {
  color: #256b2b;
}

.ip-copy-address {
  max-width: min(100%, 310px);
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ip-copy-success {
  color: #159447;
  opacity: 0;
  transform: translateY(9px) scale(.98);
  pointer-events: none;
}

.ip-copy-hero-button.is-copied .ip-copy-default {
  opacity: 0;
  transform: translateY(-9px) scale(.98);
}

.ip-copy-hero-button.is-copied .ip-copy-success {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.copy-confetti-piece {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 8px;
  height: 11px;
  border-radius: 3px;
  background: #111827;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  animation: copyConfettiFly .88s cubic-bezier(.16, .75, .28, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.copy-confetti-piece:nth-last-child(3n) { background: #7dd278; }
.copy-confetti-piece:nth-last-child(3n + 1) { background: #ffd166; }
.copy-confetti-piece:nth-last-child(3n + 2) { background: #ff8787; }

@keyframes copyConfettiFly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(var(--scale, 1)) rotate(var(--r)); }
}

/* Internal screenshot viewer */
.screenshot-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.screenshot-viewer[hidden] {
  display: none !important;
}

html.screenshot-viewer-open body {
  overflow: hidden;
}

.screenshot-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  transition: opacity .22s ease;
}

.screenshot-viewer.is-open {
  opacity: 1;
}

.screenshot-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.screenshot-viewer-card {
  position: relative;
  z-index: 1;
  width: min(100%, 1060px);
  max-height: min(86vh, 760px);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 28px;
  background: #0f1115;
  box-shadow: 0 34px 90px rgba(0,0,0,.35);
  overflow: hidden;
  transform: translateY(14px) scale(.985);
  transition: transform .22s ease;
}

.screenshot-viewer.is-open .screenshot-viewer-card {
  transform: translateY(0) scale(1);
}

.screenshot-viewer-card figure {
  margin: 0;
  display: grid;
  gap: 0;
}

.screenshot-viewer-card img {
  width: 100%;
  max-height: calc(86vh - 78px);
  object-fit: contain;
  display: block;
  background: #090a0d;
}

.screenshot-viewer-card figcaption {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  color: #ffffff;
  background: rgba(15,17,21,.96);
}

.screenshot-viewer-card figcaption strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenshot-viewer-card figcaption a {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #dafbdf;
  background: rgba(255,255,255,.06);
}

.screenshot-viewer-close,
.screenshot-viewer-nav {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(15,17,21,.66);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .18s ease, background .18s ease;
}

.screenshot-viewer-close {
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  font-size: 28px;
  line-height: 1;
}

.screenshot-viewer-nav {
  top: 50%;
  width: 46px;
  height: 56px;
  border-radius: 18px;
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.screenshot-viewer-nav.prev { left: 14px; }
.screenshot-viewer-nav.next { right: 14px; }

.screenshot-viewer-close:hover,
.screenshot-viewer-nav:hover {
  background: rgba(255,255,255,.16);
}

@media (max-width: 640px) {
  .server-action-stack {
    width: 100%;
  }
  .server-action-stack .vote-hero-button {
    width: 100%;
    min-height: 52px;
    border-radius: 18px;
  }
  .ip-copy-layer {
    font-size: 14px;
  }
  .screenshot-viewer {
    padding: 12px;
  }
  .screenshot-viewer-card {
    border-radius: 22px;
  }
  .screenshot-viewer-nav {
    width: 40px;
    height: 48px;
    font-size: 32px;
  }
  .screenshot-viewer-card figcaption {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ip-copy-hero-button,
  .ip-copy-layer,
  .copy-confetti-piece,
  .vote-reward-flyer,
  .screenshot-viewer,
  .screenshot-viewer-card {
    animation: none !important;
    transition: none !important;
  }
}

/* Monitoring card IP copy button */
.server-side .ip-copy-card-button {
  width: min(100%, 230px);
  min-height: 48px;
  border-radius: 16px;
  margin: 0 0 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.server-side .ip-copy-card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .09), 0 0 0 4px rgba(125, 210, 120, .10);
}

.server-side .ip-copy-card-button .ip-copy-layer {
  padding: 0 12px;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.server-side .ip-copy-card-button .ip-copy-layer svg {
  width: 18px;
  height: 18px;
}

.server-side .ip-copy-card-button .ip-copy-address {
  max-width: 165px;
}

.server-side .ip-copy-card-button .ip-copy-line {
  height: 3px;
  border-radius: 0 0 16px 16px;
}

.copy-confetti-piece {
  left: 50%;
  top: 50%;
}

@media (max-width: 760px) {
  .server-side .ip-copy-card-button {
    width: 100%;
    max-width: 100%;
  }
  .server-side .ip-copy-card-button .ip-copy-address {
    max-width: calc(100vw - 140px);
  }
}

/* Exact offset for vote panel scroll under sticky header */
.server-vote-panel {
  scroll-margin-top: 96px;
}

@media (max-width: 700px) {
  .server-vote-panel {
    scroll-margin-top: 86px;
  }
}

/* Version filters and multi-version editor */
.tag-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 16px;
}

.tag-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  flex: 1;
}

.tag-slider::-webkit-scrollbar { display: none; }

.tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #2a2a2a;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.tg:hover,
.tg.active {
  transform: translateY(-1px);
  border-color: #7dd278;
  background: #dafbdf;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.tag-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #2a2a2a;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  transition: transform .18s ease, background-color .18s ease;
}

.tag-arrow:hover {
  transform: translateY(-1px);
  background: #f7f8fa;
}

.fr-select-multiple {
  min-height: 170px !important;
  padding: 10px 12px !important;
  background-image: none !important;
  overflow: auto;
}

.fr-select-multiple option {
  padding: 7px 9px;
  border-radius: 10px;
}

.version-editor {
  display: grid;
  gap: 14px;
}

.version-editor label {
  display: grid;
  gap: 8px;
}


.version-range-block {
  display: grid;
  gap: 8px;
}

.version-range-title {
  color: #252525;
  font-size: 14px;
  font-weight: 700;
}

.version-range-title .hint {
  display: block;
  margin-top: 3px;
  font-weight: 500;
}

.version-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.version-range-field {
  min-width: 0;
}

.version-range-hint {
  margin: -4px 0 0;
}

.pe-support-toggle {
  width: fit-content;
  min-width: min(100%, 280px);
}

.pe-version-box {
  transition: opacity .2s ease, filter .2s ease;
}

.pe-version-box.is-disabled {
  opacity: .48;
  filter: grayscale(.45);
}

.pe-version-box.is-disabled select {
  pointer-events: none;
}

@media (max-width: 700px) {
  .tag-slider-wrap {
    margin-top: 14px;
  }
  .tag-arrow {
    display: none;
  }
  .tg {
    min-height: 34px;
    font-size: 12px;
    padding: 0 11px;
  }
  .fr-select-multiple {
    min-height: 145px !important;
  }
  .version-range-block {
  display: grid;
  gap: 8px;
}

.version-range-title {
  color: #252525;
  font-size: 14px;
  font-weight: 700;
}

.version-range-title .hint {
  display: block;
  margin-top: 3px;
  font-weight: 500;
}

.version-range-grid {
    grid-template-columns: 1fr;
  }
}


/* Dashboard table polish */
.dashboard-table-card {
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  min-width: 1060px;
}

.dashboard-table td {
  vertical-align: middle;
}

.dashboard-server-cell strong {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  color: #121212;
}

.dashboard-ip-cell code {
  display: inline-flex;
  align-items: center;
  max-width: 170px;
  padding: 6px 10px;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  background: #fafafa;
  color: #20242b;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.dashboard-languages-cell .language-inline {
  min-width: 56px;
}

.dashboard-online-cell {
  font-weight: 700;
  color: #111827;
}

.dashboard-online-cell .hint {
  display: block;
  margin-top: 6px;
  white-space: nowrap;
}

.dashboard-status-cell .status {
  white-space: nowrap;
}

.dashboard-votes-cell {
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.dashboard-manage-cell {
  min-width: 248px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dashboard-actions .button {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .dashboard-table {
    min-width: 920px;
  }
  .dashboard-ip-cell code {
    max-width: 150px;
  }
}


/* Server modes onboarding / training */
.setup-training-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #dce7ff;
  background: linear-gradient(135deg, #ffffff, #f6f9ff);
}

.setup-training-banner h2,
.setup-steps-card h2,
.setup-config-card h2 {
  margin: 0 0 8px;
}

.setup-training-banner p {
  margin: 0;
  color: #5b6472;
  max-width: 760px;
}

.mode-card.setup-mode-blur-soft,
.mode-card.setup-mode-blur-strong {
  position: relative;
  overflow: hidden;
}

.mode-card.setup-mode-blur-soft > *:not(.setup-lock-overlay),
.mode-card.setup-mode-blur-strong > *:not(.setup-lock-overlay) {
  pointer-events: none;
  user-select: none;
}

.mode-card.setup-mode-blur-soft > *:not(.setup-lock-overlay) {
  filter: blur(2px);
  opacity: .78;
}

.mode-card.setup-mode-blur-strong > *:not(.setup-lock-overlay) {
  filter: blur(7px);
  opacity: .42;
}

.setup-lock-overlay {
  position: absolute;
  inset: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 42px rgba(15,23,42,.12);
}

.setup-lock-overlay strong {
  font-size: 17px;
  color: #111827;
}

.setup-lock-overlay span {
  color: #4b5563;
  font-size: 13px;
  max-width: 260px;
}

.setup-training-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  align-items: start;
}

.setup-steps {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: setupStep;
}

.setup-steps li {
  counter-increment: setupStep;
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 14px 14px 54px;
  border: 1px solid #e8ebf0;
  border-radius: 18px;
  background: #fbfcff;
}

.setup-steps li::before {
  content: counter(setupStep);
  position: absolute;
  left: 14px;
  top: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}

.setup-steps strong {
  color: #111827;
}

.setup-steps span {
  color: #5b6472;
  line-height: 1.45;
}

.setup-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setup-copy-row code,
.setup-config-example {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.setup-config-card {
  display: grid;
  gap: 14px;
}

.setup-config-card label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.setup-live-status {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #fde7aa;
  border-radius: 18px;
  background: #fff9e8;
  color: #6b4b00;
}

.setup-live-status p {
  margin: 2px 0 0;
  color: inherit;
  opacity: .78;
}

.setup-live-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .32);
  animation: setupPulse 1.35s ease-in-out infinite;
  flex: 0 0 auto;
}

.setup-live-status.is-success {
  border-color: #bce8c2;
  background: #effaf1;
  color: #17612a;
}

.setup-live-status.is-success .setup-live-dot {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.34);
}

@keyframes setupPulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: .72; }
  70% { box-shadow: 0 0 0 10px transparent; opacity: 1; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: .72; }
}

@media (max-width: 900px) {
  .setup-training-banner,
  .setup-training-layout {
    grid-template-columns: 1fr;
  }
  .setup-training-banner {
    display: grid;
  }
  .setup-copy-row {
    display: grid;
  }
}


/* Setup training downloads + success page */
.setup-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.setup-troubleshoot-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed #d7dce5;
  border-radius: 18px;
  background: #fbfcff;
}

.setup-troubleshoot-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: #111827;
}

.setup-troubleshoot-card p {
  margin: 0 0 12px;
  color: #586174;
  line-height: 1.45;
}

.setup-success-page {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
}

.setup-success-card {
  position: relative;
  z-index: 2;
  max-width: 720px;
  width: 100%;
  text-align: center;
  padding: clamp(26px, 5vw, 52px);
  border-color: #c7efd0;
  background:
    radial-gradient(circle at top, rgba(218,251,223,.78), transparent 48%),
    linear-gradient(180deg, #ffffff, #fbfffc);
}

.setup-success-emoji {
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: #dafbdf;
  font-size: 44px;
  box-shadow: 0 20px 48px rgba(34, 197, 94, .18);
  animation: setupSuccessPop .9s cubic-bezier(.2, 1.2, .25, 1) both;
}

.setup-success-card h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 52px);
}

.setup-success-card p {
  margin: 0 auto 18px;
  max-width: 560px;
  color: #4b5563;
  line-height: 1.55;
}

.setup-success-ping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px auto 18px;
  padding: 10px 14px;
  border: 1px solid #d7f0dc;
  border-radius: 999px;
  background: #f3fff5;
  color: #17612a;
  font-weight: 800;
}

.setup-success-actions {
  justify-content: center;
}

.training-confetti-piece {
  position: absolute;
  top: 16%;
  left: 50%;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  background: var(--confetti-color, #22c55e);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: trainingConfetti 1.9s cubic-bezier(.16,.82,.26,1) var(--confetti-delay, 0s) forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes setupSuccessPop {
  0% { opacity: 0; transform: translateY(18px) scale(.72) rotate(-8deg); }
  65% { opacity: 1; transform: translateY(-4px) scale(1.08) rotate(4deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes trainingConfetti {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(0) rotate(0deg) scale(.6);
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--confetti-x, 0px)), 420px) rotate(var(--confetti-rot, 180deg)) scale(1);
  }
}

@media (max-width: 700px) {
  .setup-download-actions,
  .setup-success-actions {
    display: grid;
  }

  .setup-success-ping {
    display: grid;
    border-radius: 18px;
  }
}


/* Setup training important note */
.setup-important-note {
  margin: 14px 0 18px;
  padding: 16px 18px;
  border: 1px solid #d7ead4;
  border-radius: 18px;
  background: linear-gradient(180deg, #f5fff6, #ffffff);
  box-shadow: 0 14px 34px rgba(21, 128, 61, .08);
}

.setup-important-note strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #14532d;
  font-size: 16px;
  font-weight: 900;
}

.setup-important-note strong::before {
  content: "💡";
  font-size: 18px;
}

.setup-important-note p {
  margin: 7px 0 0;
  color: #2f3a34;
  line-height: 1.55;
}

.setup-important-note code {
  border: 1px solid #d8ead8;
  background: #ffffff;
}


/* Add/manage server validation UX */
.form-field-invalid input,
.form-field-invalid select,
.form-field-invalid textarea {
  border-color: #f74f4f !important;
  background-color: #fff7f7 !important;
  box-shadow:
    0 0 0 4px rgba(247, 79, 79, .16),
    0 12px 26px rgba(15, 23, 42, .08) !important;
}

.choice-grid.form-field-invalid,
.language-choice-grid.form-field-invalid {
  border: 1px solid rgba(247, 79, 79, .55);
  border-radius: 18px;
  padding: 10px;
  background: #fff7f7;
  box-shadow: 0 0 0 4px rgba(247, 79, 79, .10);
}

.form-field-invalid .choice-pill,
.choice-grid.form-field-invalid .choice-pill {
  border-color: rgba(247, 79, 79, .42);
}

.field-error-message {
  margin-top: 7px;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.mode-edit-row.form-field-invalid,
.screenshot-edit-row.form-field-invalid {
  border-color: rgba(247, 79, 79, .55) !important;
  background: linear-gradient(180deg, #fff, #fff7f7) !important;
}

/* Admin, profile, premium and balance */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.balance-card h2,
.economy-balance strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  color: #111827;
}
.economy-panel {
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff, #f7fff8);
}
.dashboard-commerce {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.premium-mini,
.pin-mini,
.premium-public-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f7f7f8;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.premium-mini.active,
.premium-public-badge {
  border-color: #7dd278;
  background: #dafbdf;
  color: #244328;
}
.pin-mini.active {
  border-color: #ffd36a;
  background: #fff5d6;
  color: #7a5200;
}
.dashboard-buy-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #edf0f3;
  border-radius: 14px;
  background: #fff;
}
.dashboard-buy-box summary {
  cursor: pointer;
  font-weight: 800;
  color: #2d3748;
}
.dashboard-buy-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.dashboard-buy-grid form,
.inline-admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.dashboard-buy-grid label,
.inline-admin-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #374151;
}
.dashboard-buy-grid select,
.inline-admin-form select,
.inline-admin-form input {
  min-height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: #111827;
  font-weight: 700;
}
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.admin-page .stat-card {
  min-height: 86px;
}
.admin-block {
  margin-bottom: 18px;
}
.admin-table-card {
  margin-top: 14px;
}
.admin-table {
  min-width: 1180px;
}
.admin-table code {
  white-space: normal;
  overflow-wrap: anywhere;
}
.inline-admin-form.stack {
  display: grid;
  align-items: stretch;
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 330px;
}
.inline-admin-form.stack select {
  grid-column: 1 / -1;
}
@media (max-width: 980px) {
  .profile-grid { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-admin-form.stack { grid-template-columns: 1fr; }
}

/* Owner quick menu on public monitoring cards */
.server-card.has-owner-menu {
  position: relative;
  overflow: visible !important;
}

.server-owner-menu {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
}

.server-owner-menu-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(17, 24, 39, .10);
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  color: #111827;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  backdrop-filter: blur(12px);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.server-owner-menu-toggle:hover,
.server-owner-menu.is-open .server-owner-menu-toggle {
  transform: translateY(-1px);
  border-color: rgba(125, 210, 120, .65);
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .15);
}

.server-owner-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e8eaef;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.server-owner-menu.is-open .server-owner-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.server-owner-menu-panel > strong {
  display: block;
  padding: 2px 4px 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.server-owner-menu-panel form {
  margin: 0;
}

.owner-menu-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #eef0f4;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.owner-menu-item:hover {
  transform: translateY(-1px);
  border-color: #d8dee8;
  background: #fafafa;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.owner-menu-item.is-disabled {
  cursor: not-allowed;
  opacity: .72;
  background: #f8f8f9;
  color: #6b7280;
  box-shadow: none;
}

.owner-menu-item.is-disabled:hover {
  transform: none;
  border-color: #eef0f4;
  background: #f8f8f9;
  box-shadow: none;
}

.owner-menu-item.is-buy {
  border-color: #f5d58d;
  background: #fff8e8;
  color: #7a5200;
}

@media (max-width: 760px) {
  .server-owner-menu {
    top: 10px;
    right: 10px;
  }
  .server-owner-menu-panel {
    right: 0;
    width: min(280px, calc(100vw - 22px));
  }
}

.owner-menu-note {
  display: block;
  margin: -2px 4px 2px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}


/* Dashboard pagination */
.dashboard-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 12px;
  color: #1f2937;
}

.dashboard-list-head > div:first-child {
  display: grid;
  gap: 3px;
}

.dashboard-list-head strong {
  font-size: 18px;
  font-weight: 850;
}

.dashboard-list-head span,
.dashboard-page-mini {
  color: #6b7280;
  font-size: 13px;
  font-weight: 650;
}

.dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #242424;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.page-btn:hover:not(.disabled):not(.active) {
  transform: translateY(-1px);
  border-color: #cfd4dc;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
}

.page-btn.active {
  border-color: #7dd278;
  background: #dafbdf;
  color: #1f2937;
}

.page-btn.disabled {
  opacity: .45;
  pointer-events: none;
  box-shadow: none;
}

.page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 24px;
  color: #777;
  font-weight: 900;
}

@media (max-width: 640px) {
  .dashboard-list-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-pagination {
    justify-content: flex-start;
  }
  .page-btn {
    min-width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 13px;
  }
}


/* Monitoring pagination */
.monitoring-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 14px;
  padding: 12px 14px;
  border: 1px solid #eceef2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
}

.monitoring-list-head strong {
  font-size: 15px;
  font-weight: 850;
  color: #1f2937;
}

.monitoring-list-head span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 650;
}

.monitoring-pagination {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .monitoring-list-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Premium boost + pinned card visual effects */
.server-card.has-premium-boost,
.server-card.has-promo-rank {
  position: relative;
  isolation: isolate;
  border-color: rgba(245, 190, 72, .62) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 248, 219, .86), rgba(255, 255, 255, .95)) !important;
  box-shadow:
    0 18px 52px rgba(161, 112, 0, .12),
    0 8px 22px rgba(15, 23, 42, .06) !important;
}

.server-card.has-premium-boost::before,
.server-card.has-promo-rank::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 226, 115, .42), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, .75), transparent 24%),
    linear-gradient(110deg, transparent 0%, rgba(255, 216, 104, .18) 38%, rgba(255, 255, 255, .72) 50%, rgba(255, 216, 104, .18) 62%, transparent 100%);
  background-size: 100% 100%, 100% 100%, 220% 100%;
  animation: frCardGoldShine 5.8s ease-in-out infinite;
  pointer-events: none;
}

.server-card.has-premium-boost::after,
.server-card.has-promo-rank::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border-radius: calc(24px - 6px);
  background: rgba(255, 255, 255, .28);
  border: 1px solid rgba(255, 255, 255, .42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}

.server-card.has-promo-rank {
  transform: translateZ(0);
}

.server-card.has-promo-rank:hover,
.server-card.has-premium-boost:hover {
  box-shadow:
    0 24px 72px rgba(161, 112, 0, .18),
    0 12px 28px rgba(15, 23, 42, .08) !important;
}

.server-card.promo-rank-1 {
  border-color: rgba(255, 193, 7, .76) !important;
  background: linear-gradient(135deg, #ffffff, #fff4bf 45%, #ffffff) !important;
}

.server-card.promo-rank-2 {
  border-color: rgba(168, 178, 190, .76) !important;
  background: linear-gradient(135deg, #ffffff, #f2f6fb 44%, #ffffff) !important;
  box-shadow:
    0 18px 52px rgba(88, 105, 130, .13),
    0 8px 22px rgba(15, 23, 42, .06) !important;
}

.server-card.promo-rank-3 {
  border-color: rgba(203, 127, 64, .72) !important;
  background: linear-gradient(135deg, #ffffff, #ffe5cf 44%, #ffffff) !important;
  box-shadow:
    0 18px 52px rgba(150, 82, 28, .13),
    0 8px 22px rgba(15, 23, 42, .06) !important;
}

.server-card.promo-rank-2::before {
  background:
    radial-gradient(circle at 18% 16%, rgba(214, 224, 237, .55), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, .78), transparent 24%),
    linear-gradient(110deg, transparent 0%, rgba(210, 222, 238, .26) 38%, rgba(255, 255, 255, .8) 50%, rgba(210, 222, 238, .26) 62%, transparent 100%);
  background-size: 100% 100%, 100% 100%, 220% 100%;
}

.server-card.promo-rank-3::before {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 183, 124, .45), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, .76), transparent 24%),
    linear-gradient(110deg, transparent 0%, rgba(232, 145, 78, .20) 38%, rgba(255, 255, 255, .72) 50%, rgba(232, 145, 78, .20) 62%, transparent 100%);
  background-size: 100% 100%, 100% 100%, 220% 100%;
}

.promo-badge {
  position: relative;
  overflow: hidden;
  border-color: rgba(202, 138, 4, .34) !important;
  background: linear-gradient(135deg, #fff8dc, #ffd66b, #fff7c2) !important;
  color: #5d3a00 !important;
  box-shadow: 0 8px 20px rgba(202, 138, 4, .18);
}

.promo-badge::after {
  content: "";
  position: absolute;
  inset: -40% -70%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.76), transparent);
  transform: translateX(-80%) rotate(18deg);
  animation: frBadgeSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

.server-card.promo-rank-2 .promo-badge {
  border-color: rgba(148, 163, 184, .42) !important;
  background: linear-gradient(135deg, #f8fafc, #dbe4ef, #ffffff) !important;
  color: #334155 !important;
  box-shadow: 0 8px 20px rgba(100, 116, 139, .14);
}

.server-card.promo-rank-3 .promo-badge {
  border-color: rgba(180, 83, 9, .32) !important;
  background: linear-gradient(135deg, #fff7ed, #fdba74, #fff7ed) !important;
  color: #7c2d12 !important;
  box-shadow: 0 8px 20px rgba(180, 83, 9, .15);
}

.premium-public-badge {
  position: relative !important;
  overflow: visible !important;
  border: 1px solid rgba(255, 112, 67, .55) !important;
  background: linear-gradient(135deg, #1d0b04, #ff7a1a, #ffd166, #ff4d00) !important;
  background-size: 240% 240% !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .34);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .28) inset,
    0 0 18px rgba(255, 98, 0, .35),
    0 8px 20px rgba(188, 67, 0, .18);
  animation: frPremiumFlameBg 2.4s ease-in-out infinite, frPremiumPulse 1.8s ease-in-out infinite;
}

.premium-public-badge::before,
.premium-public-badge::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -7px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 55%, rgba(255, 236, 153, .95) 0 16%, transparent 32%),
    radial-gradient(circle at 45% 42%, rgba(255, 122, 24, .9) 0 18%, transparent 36%),
    radial-gradient(circle at 72% 58%, rgba(255, 59, 0, .85) 0 15%, transparent 34%);
  filter: blur(3px);
  opacity: .88;
  transform-origin: center bottom;
  animation: frPremiumFire 1.05s ease-in-out infinite alternate;
  pointer-events: none;
}

.premium-public-badge::after {
  left: 28%;
  right: 8%;
  bottom: -10px;
  opacity: .55;
  animation-duration: .82s;
  animation-delay: -.25s;
}

@keyframes frCardGoldShine {
  0%, 100% { background-position: 0 0, 0 0, 130% 0; }
  50% { background-position: 0 0, 0 0, -30% 0; }
}

@keyframes frBadgeSweep {
  0%, 42% { transform: translateX(-85%) rotate(18deg); opacity: 0; }
  52% { opacity: 1; }
  72%, 100% { transform: translateX(85%) rotate(18deg); opacity: 0; }
}

@keyframes frPremiumFlameBg {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes frPremiumPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.035); }
}

@keyframes frPremiumFire {
  0% { transform: translateY(1px) scaleX(.88) scaleY(.78); filter: blur(3px); }
  100% { transform: translateY(-2px) scaleX(1.08) scaleY(1.12); filter: blur(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .server-card.has-premium-boost::before,
  .server-card.has-promo-rank::before,
  .promo-badge::after,
  .premium-public-badge,
  .premium-public-badge::before,
  .premium-public-badge::after {
    animation: none !important;
  }
}

/* Keep pinned / premium cards rounded after animated layers */
.server-card.has-promo-rank,
.server-card.has-premium-boost {
  border-radius: 24px !important;
  overflow: hidden !important;
  background-clip: padding-box !important;
  clip-path: inset(0 round 24px);
}

.server-card.has-promo-rank .server-banner,
.server-card.has-premium-boost .server-banner {
  overflow: hidden !important;
  border-radius: 24px 24px 0 0 !important;
  background-clip: padding-box !important;
}

.server-card.has-promo-rank .server-banner img,
.server-card.has-premium-boost .server-banner img {
  border-radius: 24px 24px 0 0 !important;
  display: block !important;
}

.server-card.has-promo-rank::before,
.server-card.has-premium-boost::before {
  border-radius: 24px !important;
}

.server-card.has-promo-rank::after,
.server-card.has-premium-boost::after {
  border-radius: 18px !important;
}

@media (max-width: 560px) {
  .server-card.has-promo-rank,
  .server-card.has-premium-boost {
    border-radius: 20px !important;
    clip-path: inset(0 round 20px);
  }
  .server-card.has-promo-rank .server-banner,
  .server-card.has-premium-boost .server-banner,
  .server-card.has-promo-rank .server-banner img,
  .server-card.has-premium-boost .server-banner img {
    border-radius: 20px 20px 0 0 !important;
  }
  .server-card.has-promo-rank::before,
  .server-card.has-premium-boost::before {
    border-radius: 20px !important;
  }
}

/* Pin queue / hold state */
.pin-queue-mini {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #f4c56b;
  background: linear-gradient(135deg, rgba(255,248,219,.96), rgba(255,236,169,.74));
  color: #6b4500;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(221, 160, 35, .13);
}

.promotion-queue-warning {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px dashed #e4bc62;
  border-radius: 14px;
  background: rgba(255, 248, 219, .76);
  color: #74510d;
}

.pin-queue-cancel-form {
  display: flex;
  align-items: center;
  margin: 0;
}

/* Welcome modal with first-20 bonus */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(250, 250, 252, .62);
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  animation: welcomeOverlayIn .28s ease both;
}

.welcome-modal {
  position: relative;
  width: min(640px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 205, 82, .72);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 214, 94, .38), transparent 34%),
    radial-gradient(circle at 95% 5%, rgba(255, 135, 135, .22), transparent 32%),
    rgba(255, 255, 255, .92);
  box-shadow: 0 34px 110px rgba(15, 23, 42, .20), inset 0 1px 0 rgba(255,255,255,.9);
  padding: 30px;
  animation: welcomeCardIn .34s cubic-bezier(.16, 1, .3, 1) both;
}

.welcome-modal::before {
  content: '';
  position: absolute;
  inset: -45% -25% auto;
  height: 70%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  transform: rotate(8deg);
  animation: welcomeShine 4.8s ease-in-out infinite;
  pointer-events: none;
}

.welcome-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 190, 59, .75);
  border-radius: 999px;
  background: rgba(255, 248, 214, .88);
  color: #7a4a00;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(255, 190, 59, .16);
}

.welcome-modal h2 {
  position: relative;
  margin: 14px 0 10px;
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.02;
}

.welcome-modal p {
  position: relative;
  color: #3f4652;
  font-size: 16px;
  line-height: 1.55;
}

.welcome-choice-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.welcome-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: rgba(255,255,255,.76);
  color: #161a22;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.welcome-choice:hover {
  transform: translateY(-2px);
  border-color: #f2c04f;
  box-shadow: 0 18px 44px rgba(255, 190, 59, .15);
}

.welcome-terms {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  padding: 13px 14px;
  border: 1px dashed #e2d2a5;
  border-radius: 16px;
  background: rgba(255, 252, 239, .75);
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.welcome-terms input { margin-top: 3px; }

.welcome-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.welcome-actions form { margin: 0; }

.welcome-actions button[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
}

.welcome-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.welcome-confetti span {
  position: absolute;
  top: -28px;
  left: calc(var(--x, 50) * 1%);
  width: 10px;
  height: 16px;
  border-radius: 4px;
  background: hsl(var(--h, 42) 95% 58%);
  opacity: .92;
  animation: welcomeConfettiFall var(--d, 3.8s) linear infinite;
}
.welcome-confetti span:nth-child(1) { --x: 12; --h: 42; --d: 3.4s; }
.welcome-confetti span:nth-child(2) { --x: 29; --h: 4; --d: 4.2s; }
.welcome-confetti span:nth-child(3) { --x: 47; --h: 204; --d: 3.8s; }
.welcome-confetti span:nth-child(4) { --x: 64; --h: 138; --d: 4.6s; }
.welcome-confetti span:nth-child(5) { --x: 77; --h: 280; --d: 3.7s; }
.welcome-confetti span:nth-child(6) { --x: 91; --h: 24; --d: 4.4s; }

.welcome-voucher-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 16px 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 217, 102, .32), transparent 38%),
    #fff;
}

.welcome-voucher-card h2 { margin: 4px 0 6px; }
.welcome-voucher-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

@keyframes welcomeOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcomeCardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes welcomeShine { 0%, 38% { transform: translateX(-70%) rotate(8deg); } 60%, 100% { transform: translateX(70%) rotate(8deg); } }
@keyframes welcomeConfettiFall { 0% { transform: translateY(-20px) rotate(0deg); } 100% { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 680px) {
  .welcome-modal { padding: 22px; border-radius: 24px; }
  .welcome-choice-grid { grid-template-columns: 1fr; }
  .welcome-actions { display: grid; }
  .welcome-actions .button { width: 100%; }
  .welcome-voucher-card { display: grid; }
  .welcome-voucher-list { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-overlay,
  .welcome-modal,
  .welcome-modal::before,
  .welcome-confetti span {
    animation: none !important;
  }
}

.welcome-overlay.shake .welcome-modal {
  animation: welcomeShake .42s ease both;
}
@keyframes welcomeShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}


/* Welcome modal registration-bonus flow */
.welcome-modal {
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
}

.welcome-screen {
  position: relative;
  animation: welcomeScreenIn .22s ease both;
}

@keyframes welcomeScreenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-choice-grid form {
  margin: 0;
  display: flex;
}

.welcome-choice-grid form .welcome-choice,
button.welcome-choice {
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.welcome-choice.is-disabled {
  opacity: .58;
}

.welcome-terms.nice-checkbox {
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.welcome-terms.nice-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.welcome-terms .checkmark {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 2px solid #e0c36f;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 18px rgba(151, 112, 18, .10), inset 0 1px 0 rgba(255,255,255,.95);
  display: inline-grid;
  place-items: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.welcome-terms .checkmark::after {
  content: '';
  width: 7px;
  height: 12px;
  border: solid #111827;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(.2);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
  margin-top: -2px;
}

.welcome-terms input:checked + .checkmark {
  border-color: #f2c04f;
  background: linear-gradient(135deg, #fff6cc, #ffd96a);
  box-shadow: 0 12px 24px rgba(255, 190, 59, .24);
}

.welcome-terms input:checked + .checkmark::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.welcome-terms a {
  color: #8a5b00;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.legal-page .card {
  max-width: 900px;
  margin: 0 auto;
}

.legal-page p {
  color: #3f4652;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .welcome-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px !important;
  }

  .welcome-modal {
    width: min(100%, 420px) !important;
    max-height: calc(100vh - 28px) !important;
    padding: 20px !important;
    border-radius: 24px !important;
    margin: auto !important;
  }

  .welcome-modal h2 {
    font-size: clamp(25px, 8vw, 34px) !important;
    line-height: 1.08 !important;
  }

  .welcome-modal p {
    font-size: 14px !important;
  }

  .welcome-choice-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .welcome-choice {
    min-height: 52px !important;
    border-radius: 16px !important;
  }

  .welcome-terms.nice-checkbox {
    align-items: flex-start !important;
    padding: 12px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  .welcome-terms .checkmark {
    width: 22px !important;
    height: 22px !important;
    border-radius: 7px !important;
    margin-top: 1px;
  }

  .welcome-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .welcome-actions form,
  .welcome-actions .button {
    width: 100% !important;
  }
}

/* FIX 2026-06-03: Welcome modal must not create horizontal page scroll */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

.welcome-overlay {
  width: auto;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  contain: paint;
}

.welcome-modal {
  width: min(640px, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.welcome-screen,
.welcome-badge,
.welcome-modal h2,
.welcome-modal p,
.welcome-choice-grid,
.welcome-choice-grid form,
.welcome-actions,
.welcome-actions form,
.welcome-terms,
.welcome-terms > span,
.welcome-choice,
.welcome-actions .button {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.welcome-choice-grid form,
.welcome-choice-grid form .welcome-choice,
button.welcome-choice {
  width: 100%;
}

.welcome-choice,
.welcome-actions .button,
.welcome-terms > span,
.welcome-modal h2,
.welcome-modal p {
  overflow-wrap: anywhere;
  word-break: normal;
}

.welcome-confetti {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  contain: paint;
}

.welcome-confetti span {
  max-width: 10px;
}

.welcome-modal::before {
  max-width: 100%;
}



/* FIX 2026-06-03 v3: lock page behind welcome modal + polish card animation */
html.welcome-page-locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  scrollbar-gutter: stable;
}

body.welcome-page-locked {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

body.welcome-page-locked .welcome-overlay {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
}

.welcome-overlay {
  isolation: isolate;
}

.welcome-modal {
  max-height: min(760px, calc(100dvh - 44px));
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  transform-origin: center;
  will-change: transform, opacity;
  animation: welcomeCardPop .36s cubic-bezier(.2, .9, .22, 1) both !important;
}

/* Был бегущий блик внутри карточки — на ПК он выглядел как баг.
   Оставляем красивое мягкое свечение без постоянного движения. */
.welcome-modal::before {
  inset: -18% -12% auto auto !important;
  width: 260px;
  max-width: 46%;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 218, 101, .34), rgba(255, 255, 255, 0) 68%) !important;
  transform: none !important;
  animation: none !important;
  opacity: .9;
}

.welcome-modal::after {
  content: '';
  position: absolute;
  inset: auto auto -120px -120px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 135, 135, .15), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.welcome-screen.is-active {
  animation: welcomeScreenSoftIn .2s ease-out both !important;
}

.welcome-overlay.shake .welcome-modal {
  animation: welcomeSoftShake .32s ease both !important;
}

.welcome-confetti span {
  opacity: .72;
  will-change: transform;
}

@keyframes welcomeCardPop {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes welcomeScreenSoftIn {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes welcomeSoftShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-5px, 0, 0); }
  50% { transform: translate3d(5px, 0, 0); }
  75% { transform: translate3d(-3px, 0, 0); }
}

@media (max-width: 640px) {
  .welcome-modal {
    max-height: calc(100dvh - 28px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-modal,
  .welcome-screen.is-active,
  .welcome-overlay.shake .welcome-modal,
  .welcome-confetti span {
    animation: none !important;
  }
}

/* FIX 2026-06-03 v4: remove scrollbar from the welcome card itself */
body.welcome-page-locked .welcome-overlay {
  overflow: hidden !important;
  align-items: center !important;
  justify-items: center !important;
}

.welcome-modal {
  max-height: none !important;
  overflow: clip !important;
  scrollbar-width: none !important;
  padding: 24px !important;
}

.welcome-modal::-webkit-scrollbar {
  display: none !important;
}

.welcome-badge {
  min-height: 30px !important;
  padding: 6px 11px !important;
}

.welcome-modal h2 {
  margin: 12px 0 8px !important;
  font-size: clamp(26px, 3.2vw, 38px) !important;
  line-height: 1.05 !important;
}

.welcome-modal p {
  margin: 8px 0 !important;
  font-size: 15px !important;
  line-height: 1.46 !important;
}

.welcome-terms {
  margin: 12px 0 !important;
  padding: 11px 12px !important;
}

.welcome-choice-grid {
  margin: 14px 0 0 !important;
  gap: 10px !important;
}

.welcome-choice {
  min-height: 50px !important;
  padding: 11px 13px !important;
}

.welcome-actions {
  margin-top: 14px !important;
}

@media (max-height: 760px) and (min-width: 641px) {
  .welcome-modal {
    width: min(600px, 100%) !important;
    padding: 20px !important;
    border-radius: 26px !important;
  }

  .welcome-modal h2 {
    font-size: clamp(24px, 3vw, 32px) !important;
  }

  .welcome-modal p {
    font-size: 14px !important;
    line-height: 1.38 !important;
  }

  .welcome-terms {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .welcome-choice {
    min-height: 46px !important;
  }
}

@media (max-width: 640px) {
  body.welcome-page-locked .welcome-overlay {
    overflow: hidden !important;
  }

  .welcome-modal {
    max-height: none !important;
    overflow: clip !important;
    padding: 18px !important;
  }
}

/* Dashboard polish v5 — owner panel redesign */
.dashboard-page {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid #e8eaee;
  border-radius: 32px;
  background:
    radial-gradient(circle at 16% 14%, rgba(135, 255, 153, .34), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(218, 251, 223, .72), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #fbfffc 48%, #ffffff 100%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 14px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 26px;
}

.dashboard-hero-main,
.dashboard-wallet-card {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.dashboard-hero-main {
  display: grid;
  align-content: center;
  gap: 14px;
}

.dashboard-hero-main h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: .95;
  letter-spacing: -.055em;
  color: #111827;
}

.dashboard-hero-main p {
  max-width: 760px;
  margin: 0;
  color: #4b5563;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 650;
  line-height: 1.55;
}

.dashboard-hero-user {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-hero-user span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.dashboard-wallet-card {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(125, 210, 120, .46);
  border-radius: 26px;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 45px rgba(15, 23, 42, .075);
  backdrop-filter: blur(12px);
}

.dashboard-wallet-card strong {
  display: block;
  font-size: clamp(34px, 4vw, 52px);
  line-height: .95;
  letter-spacing: -.04em;
  color: #111827;
}

.dashboard-wallet-card .premium-mini {
  width: max-content;
  max-width: 100%;
}

.dashboard-wallet-card .hint {
  margin: 0;
  line-height: 1.45;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e8eaee;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fbfbfc);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .06);
}

.dashboard-stat-card::after {
  content: "";
  position: absolute;
  width: 82px;
  height: 82px;
  right: -26px;
  top: -30px;
  border-radius: 999px;
  background: rgba(218, 251, 223, .85);
  pointer-events: none;
}

.dashboard-stat-card span,
.dashboard-stat-card strong,
.dashboard-stat-card small {
  position: relative;
  z-index: 1;
}

.dashboard-stat-card span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.dashboard-stat-card strong {
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -.04em;
}

.dashboard-stat-card small {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-premium-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 20px;
  align-items: center;
  margin-bottom: 2px;
  border-color: #dcefe0;
  background:
    radial-gradient(circle at 0 0, rgba(135, 255, 153, .26), transparent 30%),
    linear-gradient(135deg, #ffffff, #f8fffa);
}

.dashboard-premium-panel .economy-balance strong {
  font-size: clamp(28px, 3.5vw, 42px);
}

.dashboard-premium-panel .economy-premium-box {
  display: grid;
  gap: 12px;
  justify-items: stretch;
  min-width: 0;
}

.dashboard-next-boost {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #cdebd1;
  border-radius: 999px;
  background: #f0fff3;
  color: #24532b;
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.dashboard-next-boost.muted {
  border-color: #e5e7eb;
  background: #f8f8f9;
  color: #6b7280;
}

.dashboard-premium-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.dashboard-premium-form select,
.dashboard-premium-form .button {
  min-height: 44px;
}

.dashboard-list-head {
  padding: 2px 2px 0;
}

.dashboard-table-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .07);
}

.dashboard-table {
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfbfc;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-table tbody tr {
  transition: background .18s ease, transform .18s ease;
}

.dashboard-table tbody tr:hover {
  background: #fbfffc;
}

.dashboard-table td {
  background: transparent;
}

.dashboard-server-cell strong {
  letter-spacing: -.025em;
}

.dashboard-online-cell {
  color: #1f2937;
}

.dashboard-votes-cell {
  font-size: 18px;
  letter-spacing: -.03em;
}

.dashboard-actions .button,
.dashboard-buy-box .button {
  border-radius: 12px;
}

.dashboard-commerce {
  padding-top: 2px;
}

.dashboard-buy-box {
  border-color: #e8eaee;
  background: linear-gradient(180deg, #ffffff, #fbfbfc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.dashboard-buy-box summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-buy-box summary::-webkit-details-marker {
  display: none;
}

.dashboard-buy-box summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-weight: 900;
}

.dashboard-buy-box[open] summary::after {
  content: "−";
}

.api-help {
  border-color: #e8eaee;
  background: linear-gradient(135deg, #ffffff, #fbfbfc);
}

.api-help code {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .dashboard-hero,
  .dashboard-premium-panel {
    grid-template-columns: 1fr;
  }
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-premium-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-page {
    gap: 14px;
  }
  .dashboard-hero {
    border-radius: 24px;
    padding: 20px;
  }
  .dashboard-hero::after {
    inset: 10px;
    border-radius: 20px;
  }
  .dashboard-hero-actions,
  .dashboard-hero-actions .button {
    width: 100%;
  }
  .dashboard-hero-actions .button {
    justify-content: center;
  }
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-stat-card {
    border-radius: 20px;
  }
  .dashboard-premium-panel {
    padding: 18px;
    border-radius: 22px;
  }
  .dashboard-wallet-card {
    padding: 18px;
    border-radius: 22px;
  }
}


/* Dashboard server cards v6 */
.dashboard-server-board {
  display: grid;
  gap: 16px;
}

.dashboard-server-tile {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #e8eaee;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(135,255,153,.14), transparent 34%),
    linear-gradient(135deg, #ffffff, #fbfbfc);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .07);
}

.dashboard-server-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #87ff99, rgba(125,210,120,.36), transparent);
  pointer-events: none;
}

.dashboard-server-topline,
.dashboard-server-footer {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-server-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.dashboard-server-avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid #e7eadf;
  border-radius: 18px;
  background: linear-gradient(135deg, #effff1, #ffffff);
  color: #234328;
  font-size: 22px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 28px rgba(15, 23, 42, .06);
}

.dashboard-server-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-server-titlebox {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.dashboard-server-titlebox > strong {
  display: block;
  max-width: 100%;
  color: #101114;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 950;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.dashboard-server-subline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-server-subline code {
  max-width: min(300px, 100%);
  padding: 7px 10px;
  border-color: #e6e8ec;
  border-radius: 999px;
  background: #fff;
  color: #24272e;
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-server-subline span,
.dashboard-vote-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid #e8eaee;
  border-radius: 999px;
  background: #f7f8fa;
  color: #4b5563;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-server-state {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-vote-pill {
  background: #fff;
  color: #111827;
}

.dashboard-server-metrics {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, .75fr) minmax(180px, .8fr) minmax(260px, 1.45fr);
  gap: 12px;
}

.dashboard-server-metric {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 13px;
  border: 1px solid #edf0f3;
  border-radius: 20px;
  background: rgba(255,255,255,.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}

.dashboard-server-metric > span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.dashboard-server-metric > strong {
  color: #111827;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dashboard-server-metric > small {
  color: #7b8493;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dashboard-server-metric .language-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-server-promo-state .dashboard-commerce {
  margin: 0;
}

.dashboard-server-footer {
  align-items: stretch;
  padding-top: 2px;
}

.dashboard-server-footer .dashboard-actions {
  align-content: flex-start;
}

.dashboard-server-footer .dashboard-actions .button {
  min-height: 38px;
  border-radius: 14px;
}

.dashboard-server-footer .dashboard-buy-box {
  flex: 1 1 420px;
  min-width: min(420px, 100%);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e7ebef;
  border-radius: 18px;
  background: #fff;
}

.dashboard-server-footer .dashboard-buy-box summary {
  min-height: 42px;
  padding: 10px 12px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 950;
}

.dashboard-server-footer .dashboard-buy-grid {
  margin: 0;
  padding: 12px;
  border-top: 1px solid #eef0f2;
  background: linear-gradient(180deg, #ffffff, #fbfbfc);
}

.dashboard-server-footer .dashboard-buy-grid form {
  padding: 12px;
  border: 1px solid #edf0f3;
  border-radius: 16px;
  background: #fff;
}

.dashboard-server-footer .dashboard-buy-grid label {
  flex: 1 1 260px;
}

.dashboard-server-footer .dashboard-buy-grid select {
  width: 100%;
  max-width: 100%;
}

.dashboard-empty-server-list {
  text-align: center;
}

@media (max-width: 1080px) {
  .dashboard-server-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-server-promo-state {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .dashboard-server-tile {
    padding: 15px;
    border-radius: 24px;
  }
  .dashboard-server-topline,
  .dashboard-server-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
  .dashboard-server-state {
    justify-content: flex-start;
  }
  .dashboard-server-metrics {
    grid-template-columns: 1fr;
  }
  .dashboard-server-promo-state {
    grid-column: auto;
  }
  .dashboard-server-footer .dashboard-buy-box {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .dashboard-server-identity {
    align-items: flex-start;
  }
  .dashboard-server-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 19px;
  }
  .dashboard-server-subline {
    align-items: stretch;
  }
  .dashboard-server-subline code,
  .dashboard-server-subline span,
  .dashboard-server-state .status,
  .dashboard-vote-pill {
    width: 100%;
    justify-content: center;
  }
  .dashboard-server-footer .dashboard-actions .button,
  .dashboard-server-footer .dashboard-buy-grid .button {
    width: 100%;
  }
}


/* Dashboard queue confirm modal v7 */
html.dashboard-confirm-open,
body.dashboard-confirm-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  scrollbar-gutter: stable;
}

.dashboard-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(250, 250, 252, .66);
  backdrop-filter: blur(16px) saturate(1.16);
  -webkit-backdrop-filter: blur(16px) saturate(1.16);
  animation: dashboardConfirmOverlayIn .22s ease both;
  overflow: hidden;
  box-sizing: border-box;
}

.dashboard-confirm-overlay.is-leaving {
  animation: dashboardConfirmOverlayOut .18s ease both;
}

.dashboard-confirm-modal {
  position: relative;
  width: min(570px, 100%);
  max-width: 100%;
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(255, 205, 82, .72);
  border-radius: 30px;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 220, 101, .34), transparent 34%),
    radial-gradient(circle at 92% 92%, rgba(255, 135, 135, .13), transparent 36%),
    rgba(255, 255, 255, .96);
  box-shadow: 0 30px 90px rgba(22, 24, 33, .18), 0 12px 34px rgba(255, 191, 62, .16);
  overflow: clip;
  box-sizing: border-box;
  transform-origin: center;
  animation: dashboardConfirmCardIn .3s cubic-bezier(.2, .9, .22, 1) both;
}

.dashboard-confirm-overlay.is-leaving .dashboard-confirm-modal {
  animation: dashboardConfirmCardOut .18s ease both;
}

.dashboard-confirm-modal::before,
.dashboard-confirm-modal::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  z-index: 0;
}

.dashboard-confirm-modal::before {
  top: -110px;
  right: -90px;
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(255, 214, 82, .33), rgba(255, 255, 255, 0) 68%);
}

.dashboard-confirm-modal::after {
  left: -120px;
  bottom: -130px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(94, 141, 255, .10), rgba(255, 255, 255, 0) 70%);
}

.dashboard-confirm-modal > * {
  position: relative;
  z-index: 1;
}

.dashboard-confirm-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 198, 76, .76);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 247, 218, .96), rgba(255, 236, 166, .82));
  color: #755006;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(221, 160, 35, .13);
}

.dashboard-confirm-modal h2 {
  margin: 14px 0 8px;
  color: #171923;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.06;
  letter-spacing: -.045em;
}

.dashboard-confirm-text,
.dashboard-confirm-hint {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.dashboard-confirm-hint {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px dashed rgba(228, 188, 98, .85);
  border-radius: 15px;
  background: rgba(255, 248, 219, .76);
  color: #74510d;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-confirm-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.dashboard-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(229, 231, 235, .86);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 20px rgba(17, 24, 39, .045);
}

.dashboard-confirm-row span {
  color: #8a93a3;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .045em;
  white-space: nowrap;
}

.dashboard-confirm-row strong {
  min-width: 0;
  color: #20232d;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.dashboard-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.dashboard-confirm-actions .button {
  min-height: 44px;
  border-radius: 15px;
  padding-inline: 18px;
}

.dashboard-confirm-accept {
  box-shadow: 0 14px 28px rgba(22, 24, 33, .14);
}

@keyframes dashboardConfirmOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dashboardConfirmOverlayOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes dashboardConfirmCardIn {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(.982);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes dashboardConfirmCardOut {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(.986);
  }
}

@media (max-width: 640px) {
  .dashboard-confirm-overlay {
    padding: 16px;
  }

  .dashboard-confirm-modal {
    padding: 19px;
    border-radius: 25px;
  }

  .dashboard-confirm-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .dashboard-confirm-row strong {
    text-align: left;
  }

  .dashboard-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-confirm-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-confirm-overlay,
  .dashboard-confirm-overlay.is-leaving,
  .dashboard-confirm-modal,
  .dashboard-confirm-overlay.is-leaving .dashboard-confirm-modal {
    animation: none !important;
  }
}


/* Profile + SMTP auth polish v8 */
.auth-section {
  padding-top: clamp(30px, 5vw, 66px);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, .58fr);
  gap: 22px;
  align-items: stretch;
}

.auth-visual,
.auth-card,
.profile-hero-card,
.profile-stat-card,
.profile-card {
  border: 1px solid rgba(229, 231, 235, .92);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 46px rgba(17, 24, 39, .07);
}

.auth-visual {
  position: relative;
  min-height: 380px;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 214, 82, .30), transparent 35%),
    radial-gradient(circle at 88% 80%, rgba(135, 255, 153, .22), transparent 34%),
    linear-gradient(135deg, #ffffff, #f7f9ff);
}

.auth-visual::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 250px;
  height: 250px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(83, 132, 255, .15), transparent 68%);
  pointer-events: none;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(83, 132, 255, .18);
  border-radius: 999px;
  background: #f4f8ff;
  color: #4264d7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em;
}

.auth-visual h1 {
  max-width: 620px;
  margin: 22px 0 12px;
  color: #111827;
  font-size: clamp(34px, 5vw, 58px);
  line-height: .96;
  letter-spacing: -.06em;
}

.auth-visual p {
  max-width: 600px;
  margin: 0;
  color: #6b7280;
  font-size: 16px;
  line-height: 1.65;
}

.auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.auth-feature-list span,
.profile-hero-tags span,
.profile-security-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.auth-card {
  align-self: center;
  border-radius: 30px;
}

.auth-card h2 {
  margin-bottom: 4px;
  color: #111827;
  font-size: 28px;
  letter-spacing: -.035em;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
}

.code-input {
  text-align: center;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 24px !important;
  font-weight: 900;
  letter-spacing: 7px;
}

.profile-page {
  overflow-x: clip;
}

.profile-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 214, 82, .30), transparent 32%),
    radial-gradient(circle at 92% 90%, rgba(135, 255, 153, .18), transparent 36%),
    rgba(255, 255, 255, .94);
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(72px, 10vw, 104px);
  height: clamp(72px, 10vw, 104px);
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #2b3555);
  color: #fff;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 950;
  box-shadow: 0 18px 36px rgba(17, 24, 39, .16);
}

.profile-hero-copy {
  min-width: 0;
}

.profile-hero-copy h1 {
  margin: 7px 0 4px;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.profile-hero-copy p {
  margin: 0;
  color: #6b7280;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.profile-stat-card {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.profile-stat-card span,
.profile-stat-card small {
  display: block;
  color: #7b8190;
  font-size: 13px;
  font-weight: 850;
}

.profile-stat-card strong {
  display: block;
  margin: 6px 0;
  color: #111827;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.profile-grid-modern {
  align-items: start;
}

.profile-card {
  border-radius: 28px;
  overflow: hidden;
}

.profile-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-card-head h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  letter-spacing: -.035em;
}

.profile-card-head p {
  margin: 3px 0 0;
  color: #7b8190;
  font-size: 13px;
  line-height: 1.45;
}

.profile-card-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: #f4f8ff;
  border: 1px solid #dbe7ff;
}

.profile-balance-value {
  margin: 8px 0 12px;
  color: #111827;
  font-size: clamp(36px, 6vw, 64px);
  line-height: .92;
  font-weight: 950;
  letter-spacing: -.07em;
}

.profile-security-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.profile-security-list span {
  justify-content: flex-start;
  border-radius: 16px;
}

.profile-history-card {
  grid-column: 1 / -1;
}

.profile-tx-list {
  display: grid;
  gap: 10px;
}

.profile-tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: 18px;
  background: #fff;
}

.profile-tx-row div {
  min-width: 0;
}

.profile-tx-row strong,
.profile-tx-row span,
.profile-tx-row small,
.profile-tx-row b {
  display: block;
  overflow-wrap: anywhere;
}

.profile-tx-row strong {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.profile-tx-row span,
.profile-tx-row small {
  color: #7b8190;
  font-size: 12px;
  line-height: 1.35;
}

.profile-tx-row b {
  color: #111827;
  text-align: right;
  font-size: 15px;
  font-weight: 950;
}

.profile-empty-mini {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, .65);
  border-radius: 20px;
  background: #f8fafc;
  color: #6b7280;
}

.profile-empty-mini strong {
  color: #111827;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
  }

  .profile-hero-card,
  .profile-hero-main {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .profile-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-section {
    padding-top: 18px;
  }

  .auth-shell {
    gap: 14px;
  }

  .auth-visual,
  .auth-card,
  .profile-hero-card,
  .profile-card,
  .profile-stat-card {
    border-radius: 22px;
  }

  .auth-visual,
  .auth-card,
  .profile-card {
    padding: 18px;
  }

  .auth-visual h1 {
    font-size: 36px;
  }

  .profile-avatar {
    width: 78px;
    height: 78px;
    border-radius: 23px;
  }

  .profile-hero-copy h1 {
    font-size: 34px;
  }

  .profile-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-card-head {
    gap: 10px;
  }

  .profile-tx-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-tx-row b,
  .profile-tx-row small {
    text-align: left;
  }

  .code-input {
    font-size: 21px !important;
    letter-spacing: 5px;
  }
}


/* Auth/footer copy polish v9 */
html,
body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: rgba(255, 255, 255, .96);
}

.footer-inner {
  min-height: 56px;
  padding: 14px 0;
  font-size: 13px;
}

.auth-section {
  display: flex;
  align-items: center;
  padding-top: clamp(22px, 4vw, 46px);
  padding-bottom: clamp(24px, 4vw, 52px);
}

.auth-shell {
  width: 100%;
}

.auth-visual {
  min-height: 320px;
}

.auth-visual h1 {
  max-width: 560px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1;
}

.auth-visual p {
  max-width: 560px;
  font-size: 15px;
}

.auth-feature-list {
  margin-top: 18px;
}

.auth-card {
  padding: clamp(20px, 3vw, 28px);
}

.auth-card h2 {
  font-size: clamp(24px, 3vw, 28px);
}

.auth-links a {
  color: #111827;
}

.auth-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .auth-section {
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .auth-section {
    padding-top: 14px;
    padding-bottom: 24px;
  }

  .auth-visual {
    padding: 20px;
  }

  .auth-visual h1 {
    margin-top: 16px;
    font-size: 31px;
    letter-spacing: -.045em;
  }

  .auth-feature-list span {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-inner {
    min-height: 48px;
    justify-content: center;
    gap: 4px;
    padding: 12px 0;
    text-align: center;
  }

  .footer-inner span {
    width: 100%;
  }
}


/* Auth footer real bottom fix v10 */
html {
  height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.auth-section {
  flex: 1 0 auto;
  align-items: flex-start;
}

.site-footer {
  margin-top: auto;
}

@media (max-width: 640px) {
  body {
    min-height: 100svh;
  }
}

/* Auth pages final polish v11 */
.auth-page-polished {
  position: relative;
  width: min(100% - 36px, 1180px);
  padding-top: clamp(34px, 5vw, 70px);
  padding-bottom: clamp(34px, 5vw, 70px);
}

.auth-page-polished::before {
  content: '';
  position: absolute;
  inset: 18px -18px auto;
  height: 220px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 214, 82, .18), rgba(135, 255, 153, .16), rgba(83, 132, 255, .12));
  filter: blur(34px);
  opacity: .8;
  pointer-events: none;
  z-index: -1;
}

.auth-page-polished .auth-shell {
  grid-template-columns: minmax(0, 1.05fr) minmax(370px, .66fr);
  gap: clamp(18px, 2.6vw, 30px);
  align-items: center;
}

.auth-page-polished .auth-visual,
.auth-page-polished .auth-card {
  position: relative;
  border-color: rgba(222, 226, 235, .95);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(17, 24, 39, .08);
}

.auth-page-polished .auth-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(330px, 37vw, 430px);
  padding: clamp(28px, 4.4vw, 52px);
  border-radius: 38px;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 214, 82, .36), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(135, 255, 153, .24), transparent 35%),
    radial-gradient(circle at 92% 14%, rgba(83, 132, 255, .13), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94));
}

.auth-page-polished .auth-visual::after {
  right: -96px;
  bottom: -104px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(17, 24, 39, .08), transparent 66%);
}

.auth-page-polished .auth-badge {
  width: fit-content;
  min-height: 34px;
  padding: 8px 13px;
  border-color: rgba(83, 132, 255, .20);
  background: rgba(244, 248, 255, .9);
  color: #3f60d3;
  font-size: 12px;
  letter-spacing: .08em;
}

.auth-page-polished .auth-visual h1 {
  max-width: 620px;
  margin: 20px 0 13px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: .96;
  letter-spacing: -.065em;
}

.auth-page-polished .auth-visual p {
  max-width: 570px;
  color: #596174;
  font-size: 16px;
  line-height: 1.62;
}

.auth-page-polished .auth-feature-list {
  gap: 9px;
  margin-top: 22px;
}

.auth-page-polished .auth-feature-list span {
  min-height: 34px;
  padding: 8px 12px;
  border-color: rgba(229, 231, 235, .95);
  background: rgba(255, 255, 255, .72);
  color: #374151;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .035);
}

.auth-page-polished .auth-card {
  overflow: hidden;
  align-self: center;
  padding: clamp(24px, 3.2vw, 34px);
  border-radius: 32px;
}

.auth-page-polished .auth-card::before {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #111827, #5384ff, #87ff99);
}

.auth-card-top {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 20px;
}

.auth-panel-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 17px;
  background: linear-gradient(135deg, #111827, #2b3555);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 14px 30px rgba(17, 24, 39, .15);
}

.auth-card-top h2 {
  margin: 1px 0 4px;
  color: #111827;
  font-size: clamp(25px, 3vw, 31px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.auth-card-top p {
  margin: 0;
  color: #747c8f;
  font-size: 13px;
  line-height: 1.45;
}

.auth-page-polished .auth-card label {
  gap: 8px;
  margin-bottom: 14px;
  color: #111827;
  font-weight: 900;
}

.auth-page-polished .auth-card input {
  min-height: 50px;
  border-radius: 16px;
  border-color: #d8dee9;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-page-polished .auth-card input:focus {
  border-color: rgba(83, 132, 255, .75);
  background: #fbfdff;
  box-shadow: 0 0 0 4px rgba(83, 132, 255, .12);
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 950;
}

.auth-page-polished .auth-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(229, 231, 235, .86);
}

.auth-links-single {
  justify-content: center;
}

.auth-card-note {
  margin: 13px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: 15px;
  background: #f8fafc;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.auth-page-polished .code-input {
  font-size: 25px !important;
  letter-spacing: 8px;
  text-align: center;
}

.auth-code-shell .auth-visual,
.auth-recovery-shell .auth-visual,
.auth-reset-shell .auth-visual {
  min-height: clamp(300px, 34vw, 390px);
}

.auth-register-shell .auth-visual {
  background:
    radial-gradient(circle at 10% 12%, rgba(135, 255, 153, .24), transparent 34%),
    radial-gradient(circle at 88% 86%, rgba(255, 214, 82, .25), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94));
}

.auth-recovery-shell .auth-visual,
.auth-reset-shell .auth-visual {
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 214, 82, .30), transparent 34%),
    radial-gradient(circle at 86% 86%, rgba(83, 132, 255, .14), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94));
}

@media (max-width: 900px) {
  .auth-page-polished {
    width: min(100% - 30px, 1180px);
    padding-top: 22px;
    padding-bottom: 34px;
  }

  .auth-page-polished .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-page-polished .auth-visual {
    min-height: auto;
    padding: 24px;
    border-radius: 28px;
  }

  .auth-page-polished .auth-visual h1 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .auth-page-polished .auth-card {
    border-radius: 26px;
  }
}

@media (max-width: 640px) {
  .auth-page-polished {
    width: min(100% - 22px, 1180px);
    padding-top: 14px;
    padding-bottom: 24px;
  }

  .auth-page-polished::before {
    inset: 8px -8px auto;
    height: 180px;
    filter: blur(28px);
  }

  .auth-page-polished .auth-shell {
    gap: 12px;
  }

  .auth-page-polished .auth-visual,
  .auth-page-polished .auth-card {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-page-polished .auth-badge {
    min-height: 30px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .auth-page-polished .auth-visual h1 {
    margin-top: 14px;
    font-size: 34px;
    line-height: .98;
  }

  .auth-page-polished .auth-visual p,
  .auth-card-top p {
    font-size: 13px;
  }

  .auth-page-polished .auth-feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 15px;
  }

  .auth-page-polished .auth-feature-list span {
    width: 100%;
    justify-content: flex-start;
  }

  .auth-card-top {
    gap: 11px;
    margin-bottom: 16px;
  }

  .auth-panel-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }

  .auth-card-top h2 {
    font-size: 24px;
  }

  .auth-page-polished .auth-card input,
  .auth-submit {
    min-height: 48px;
  }

  .auth-page-polished .code-input {
    font-size: 21px !important;
    letter-spacing: 5px;
  }

  .auth-page-polished .auth-links {
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

/* Auth image + particles polish v12 */
.auth-particle-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.auth-dust-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--dust-size, 6px);
  height: var(--dust-size, 6px);
  border-radius: 999px;
  background: rgba(17, 24, 39, var(--dust-alpha, .28));
  box-shadow: 0 0 10px rgba(17, 24, 39, .14);
  will-change: transform, opacity;
  transform: translate3d(var(--dust-x, 0px), var(--dust-y, 0px), 0) scale(.45);
  opacity: 0;
  animation: heroDustParticle var(--dust-duration, 6800ms) cubic-bezier(.22, .61, .36, 1) forwards;
}

.auth-page-polished {
  position: relative;
  z-index: 1;
}

.auth-page-polished .auth-shell {
  gap: clamp(18px, 2.5vw, 30px);
  align-items: stretch;
}

.auth-login-shell { --auth-panel-min-height: 396px; }
.auth-recovery-shell { --auth-panel-min-height: 396px; }
.auth-code-shell { --auth-panel-min-height: 412px; }
.auth-register-shell { --auth-panel-min-height: 458px; }
.auth-reset-shell { --auth-panel-min-height: 458px; }

.auth-page-polished .auth-visual,
.auth-page-polished .auth-card {
  min-height: var(--auth-panel-min-height, 412px);
}

.auth-page-polished .auth-visual {
  isolation: isolate;
  overflow: hidden;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, .12);
  background: #0f172a;
  box-shadow: 0 26px 80px rgba(15, 23, 42, .16);
}

.auth-page-polished .auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(128deg, rgba(10, 15, 25, .84) 6%, rgba(10, 15, 25, .58) 44%, rgba(10, 15, 25, .28) 100%),
    radial-gradient(circle at 12% 12%, rgba(255, 210, 92, .30), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(114, 188, 255, .20), transparent 26%),
    radial-gradient(circle at 80% 84%, rgba(134, 255, 153, .18), transparent 26%),
    url('../site/auth_skyblock_hero.webp') center center / cover no-repeat;
  transform: scale(1.035);
  filter: saturate(1.06) brightness(.92);
  z-index: -2;
}

.auth-page-polished .auth-visual::after {
  content: '';
  position: absolute;
  inset: auto -72px -88px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));
  filter: blur(10px);
  z-index: -1;
}

.auth-page-polished .auth-visual > * {
  position: relative;
  z-index: 1;
}

.auth-page-polished .auth-badge {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.auth-page-polished .auth-visual h1 {
  max-width: 520px;
  color: #ffffff;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

.auth-page-polished .auth-visual p {
  max-width: 520px;
  color: rgba(241, 245, 249, .92);
}

.auth-page-polished .auth-feature-list {
  gap: 10px;
  margin-top: 24px;
}

.auth-page-polished .auth-feature-list span {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.auth-page-polished .auth-card {
  display: grid;
  align-content: start;
  gap: 0;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 60px rgba(17, 24, 39, .10);
}

.auth-page-polished .auth-card::before {
  left: 18px;
  right: 18px;
  height: 5px;
}

.auth-page-polished .auth-card input {
  min-height: 52px;
  border-radius: 16px;
}

.auth-page-polished .auth-card label {
  margin-bottom: 13px;
}

.auth-page-polished .auth-card .button.auth-submit {
  margin-top: 6px;
}

.auth-page-polished .auth-links,
.auth-page-polished .auth-card-note {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .auth-particle-field {
    opacity: .88;
  }

  .auth-login-shell,
  .auth-recovery-shell,
  .auth-code-shell,
  .auth-register-shell,
  .auth-reset-shell {
    --auth-panel-min-height: auto;
  }

  .auth-page-polished .auth-visual,
  .auth-page-polished .auth-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .auth-particle-field {
    inset: 64px 0 0 0;
  }

  .auth-page-polished .auth-shell {
    gap: 14px;
  }

  .auth-page-polished .auth-visual,
  .auth-page-polished .auth-card {
    padding: 18px;
    border-radius: 24px;
  }

  .auth-page-polished .auth-visual h1 {
    max-width: 100%;
    font-size: clamp(30px, 8.6vw, 38px);
  }

  .auth-page-polished .auth-visual p {
    max-width: 100%;
  }

  .auth-page-polished .auth-card input,
  .auth-page-polished .auth-submit {
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-dust-particle {
    display: none;
  }
}

/* Auth split-card + Google OAuth v13 */
.auth-page-polished {
  width: min(100% - 34px, 1120px);
  min-height: calc(100dvh - 132px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: clamp(24px, 4vw, 54px);
  padding-bottom: clamp(24px, 4vw, 54px);
}

.auth-page-polished::before {
  inset: 16px -22px auto;
  height: 260px;
  opacity: .55;
}

.auth-page-polished .auth-shell {
  width: 100%;
  max-width: 1060px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: 34px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 34px 90px rgba(17, 24, 39, .13);
  transform: translateY(0) scale(1);
  opacity: 1;
  transition: opacity .18s ease, transform .18s ease;
}

html.auth-transition-out .auth-page-polished .auth-shell {
  opacity: 0;
  transform: translateY(8px) scale(.992);
}

.auth-login-shell { --auth-panel-min-height: 560px; }
.auth-recovery-shell { --auth-panel-min-height: 560px; }
.auth-code-shell { --auth-panel-min-height: 590px; }
.auth-register-shell { --auth-panel-min-height: 620px; }
.auth-reset-shell { --auth-panel-min-height: 650px; }

.auth-page-polished .auth-visual,
.auth-page-polished .auth-card {
  min-height: var(--auth-panel-min-height, 590px);
}

.auth-page-polished .auth-visual {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(32px, 4.2vw, 54px);
  justify-content: flex-end;
}

.auth-page-polished .auth-visual::before {
  background:
    linear-gradient(180deg, rgba(6, 10, 18, .10) 0%, rgba(6, 10, 18, .30) 43%, rgba(6, 10, 18, .78) 100%),
    radial-gradient(circle at 14% 10%, rgba(255, 225, 124, .26), transparent 26%),
    url('../site/auth_skyblock_hero.webp') center center / cover no-repeat;
  transform: scale(1.025);
  filter: saturate(1.08) brightness(.96);
}

.auth-page-polished .auth-visual::after {
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(8, 12, 20, .12), rgba(8, 12, 20, .02) 44%, rgba(8, 12, 20, .20));
  filter: none;
}

.auth-page-polished .auth-badge {
  min-height: 32px;
  padding: 7px 12px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 11px;
  letter-spacing: .11em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
}

.auth-page-polished .auth-visual h1 {
  max-width: 560px;
  margin-top: 18px;
  font-size: clamp(36px, 4.8vw, 58px);
  line-height: .96;
  letter-spacing: -.065em;
}

.auth-page-polished .auth-visual p {
  max-width: 530px;
  margin-top: 12px;
  color: rgba(255, 255, 255, .88);
  font-size: 15px;
  line-height: 1.55;
}

.auth-page-polished .auth-feature-list {
  margin-top: 20px;
}

.auth-page-polished .auth-feature-list span {
  min-height: 32px;
  padding: 7px 11px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.auth-page-polished .auth-card {
  border: 0;
  border-left: 1px solid rgba(226, 232, 240, .86);
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: clamp(30px, 3.2vw, 44px);
  align-content: center;
}

.auth-page-polished .auth-card::before {
  display: none;
}

.auth-card-top {
  align-items: center;
  margin-bottom: 22px;
}

.auth-panel-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, #111827, #334155);
}

.auth-card-top h2 {
  font-size: clamp(25px, 2.8vw, 30px);
  letter-spacing: -.045em;
}

.auth-card-top p {
  max-width: 295px;
  color: #6b7280;
}

.auth-page-polished .auth-card label {
  color: #111827;
  font-size: 13px;
  letter-spacing: -.01em;
  margin-bottom: 13px;
}

.auth-page-polished .auth-card input {
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0 14px;
  color: #111827;
}

.auth-page-polished .auth-card input::placeholder {
  color: #a0a8b5;
}

.auth-page-polished .auth-card input:focus {
  background: #fff;
  border-color: rgba(83, 132, 255, .82);
  box-shadow: 0 0 0 4px rgba(83, 132, 255, .12);
}

.auth-submit {
  min-height: 48px;
  border-radius: 12px;
  background: #111827;
  box-shadow: 0 14px 30px rgba(17, 24, 39, .18);
}

.auth-submit:hover {
  transform: translateY(-1px);
}

.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 800;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: #e5e7eb;
}

.google-auth-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.google-auth-button:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  background: #fbfdff;
  box-shadow: 0 14px 30px rgba(17, 24, 39, .08);
}

.google-auth-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .65);
}

.auth-page-polished .auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
  color: #64748b;
  font-size: 12px;
}

.auth-page-polished .auth-links a {
  color: #2563eb;
  font-weight: 900;
}

.auth-page-polished .auth-card-note {
  border-radius: 12px;
  background: #f8fafc;
}

.auth-page-polished .code-input {
  letter-spacing: 7px;
}

@media (max-width: 980px) {
  .auth-page-polished {
    width: min(100% - 24px, 1120px);
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .auth-page-polished .auth-shell {
    grid-template-columns: 1fr;
    max-width: 560px;
    border-radius: 30px;
  }

  .auth-login-shell,
  .auth-recovery-shell,
  .auth-code-shell,
  .auth-register-shell,
  .auth-reset-shell {
    --auth-panel-min-height: auto;
  }

  .auth-page-polished .auth-visual {
    min-height: 280px;
    padding: 24px;
  }

  .auth-page-polished .auth-card {
    min-height: 0;
    border-left: 0;
    border-top: 1px solid rgba(226, 232, 240, .86);
    padding: 24px;
  }

  .auth-page-polished .auth-visual h1 {
    font-size: clamp(32px, 7.6vw, 44px);
  }
}

@media (max-width: 560px) {
  .auth-page-polished {
    width: min(100% - 18px, 1120px);
    padding-top: 14px;
    padding-bottom: 18px;
  }

  .auth-page-polished .auth-shell {
    border-radius: 24px;
  }

  .auth-page-polished .auth-visual {
    min-height: 230px;
    padding: 18px;
  }

  .auth-page-polished .auth-visual h1 {
    margin-top: 13px;
    font-size: 31px;
  }

  .auth-page-polished .auth-visual p {
    font-size: 13px;
  }

  .auth-page-polished .auth-feature-list {
    display: none;
  }

  .auth-page-polished .auth-card {
    padding: 18px;
  }

  .auth-card-top {
    margin-bottom: 18px;
  }

  .auth-panel-icon {
    width: 40px;
    height: 40px;
  }

  .auth-card-top h2 {
    font-size: 23px;
  }

  .auth-card-top p {
    font-size: 12px;
  }

  .auth-page-polished .auth-card input,
  .auth-submit,
  .google-auth-button {
    min-height: 46px;
  }

  .auth-page-polished .auth-links {
    flex-direction: column;
    gap: 7px;
  }
}

/* Auth in-card JS switching v13 */
.auth-unified-card {
  position: relative;
  min-width: 0;
}

.auth-panel {
  display: none;
  gap: 0;
  opacity: 0;
  transform: translateY(8px);
}

.auth-panel.is-active {
  display: grid;
  opacity: 1;
  transform: translateY(0);
  animation: authPanelIn .22s ease both;
}

@keyframes authPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-visual-copy {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

.auth-visual-copy.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: authPanelIn .22s ease both;
}

.auth-page-polished .auth-links button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.auth-page-polished .auth-links button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* Auth stable proportions v14
   Keeps login / registration / recovery / code screens visually the same size on desktop. */
@media (min-width: 981px) {
  .auth-login-shell,
  .auth-register-shell,
  .auth-recovery-shell,
  .auth-code-shell,
  .auth-reset-shell {
    --auth-panel-min-height: 650px;
  }

  .auth-page-polished .auth-shell {
    min-height: var(--auth-panel-min-height, 650px);
  }

  .auth-page-polished .auth-visual,
  .auth-page-polished .auth-card {
    min-height: var(--auth-panel-min-height, 650px);
  }

  .auth-unified-card {
    display: grid;
    align-content: center;
  }

  .auth-panel.is-active {
    min-height: 520px;
    align-content: center;
  }

  .auth-panel[data-auth-panel="login"].is-active,
  .auth-panel[data-auth-panel="recovery"].is-active {
    min-height: 520px;
  }

  .auth-panel[data-auth-panel="register"].is-active {
    min-height: 540px;
  }

  .auth-visual-copy.is-active {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .auth-code-shell .auth-card,
  .auth-reset-shell .auth-card {
    align-content: center;
  }
}

@media (max-width: 980px) {
  .auth-unified-card,
  .auth-page-polished .auth-card {
    align-content: start;
  }

  .auth-panel.is-active {
    min-height: 0;
  }
}


/* Auth password tools v15 */
.password-field {
  position: relative;
  min-width: 0;
}

.password-field > input {
  width: 100%;
  padding-right: 52px !important;
}

.password-eye {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: rgba(17, 24, 39, .055);
  color: #111827;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.password-eye:hover {
  background: rgba(17, 24, 39, .10);
  box-shadow: 0 8px 18px rgba(17, 24, 39, .08);
}

.password-eye:active {
  transform: translateY(-50%) scale(.96);
}

.password-eye-icon {
  position: relative;
  width: 20px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 999px 999px / 75% 75% 75% 75%;
  opacity: .82;
}

.password-eye-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.password-eye-icon::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%) rotate(-34deg) scaleX(0);
  transform-origin: center;
  transition: transform .16s ease;
}

.password-field.is-visible .password-eye-icon::after {
  transform: translateY(-50%) rotate(-34deg) scaleX(1);
}

.password-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -6px 0 12px;
  opacity: .82;
  transition: opacity .16s ease, transform .16s ease;
}

.password-meta.is-active {
  opacity: 1;
}

.password-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.password-caps.is-on {
  border-color: rgba(217, 48, 37, .20);
  background: #fff7f6;
  color: #b42318;
}

.password-field.caps-on > input {
  border-color: rgba(217, 48, 37, .45) !important;
  box-shadow: 0 0 0 4px rgba(217, 48, 37, .08) !important;
}

.auth-page-polished .auth-card label:has(.password-field) {
  margin-bottom: 8px;
}

@supports not selector(:has(*)) {
  .password-meta {
    margin-top: -4px;
  }
}

@media (max-width: 560px) {
  .password-eye {
    right: 7px;
    width: 34px;
    height: 34px;
  }

  .password-field > input {
    padding-right: 48px !important;
  }

  .password-meta {
    gap: 6px;
  }

  .password-meta span {
    font-size: 10px;
    min-height: 23px;
    padding: 4px 7px;
  }
}


/* Login email-code security v16 */
.profile-switch {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px !important;
  margin: 4px 0 12px !important;
  padding: 13px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f8fafc;
  cursor: pointer;
}

.profile-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-switch-ui {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #dbe3ef;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
  transition: background .18s ease, box-shadow .18s ease;
}

.profile-switch-ui::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .16);
  transition: transform .18s ease;
}

.profile-switch input:checked + .profile-switch-ui {
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}

.profile-switch input:checked + .profile-switch-ui::before {
  transform: translateX(22px);
}

.profile-switch b {
  display: block;
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}

.profile-switch small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.profile-security-card .button + .button,
.profile-security-card .button + a.button {
  margin-top: 8px;
}

@media (max-width: 560px) {
  .profile-switch {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
  }

  .profile-switch-ui {
    width: 48px;
    height: 28px;
  }

  .profile-switch-ui::before {
    width: 20px;
    height: 20px;
  }

  .profile-switch input:checked + .profile-switch-ui::before {
    transform: translateX(20px);
  }
}


/* Auth no-jump switching v17
   Fixes visible size changes between login/register/recovery panels. */
@media (min-width: 981px) {
  .auth-unified-page .auth-shell,
  .auth-unified-page .auth-visual,
  .auth-unified-page .auth-card,
  .auth-stable-shell {
    min-height: 660px !important;
    height: 660px !important;
  }

  .auth-unified-page .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 410px) !important;
  }

  .auth-unified-card {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  .auth-unified-card .auth-panel {
    position: absolute !important;
    inset: 42px 44px !important;
    display: grid !important;
    align-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;
    min-height: 0 !important;
    height: auto !important;
    transition: opacity .06s linear !important;
    animation: none !important;
  }

  .auth-unified-card .auth-panel.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    animation: none !important;
  }

  .auth-visual-copy {
    position: absolute !important;
    inset: 54px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;
    min-height: 0 !important;
    transition: opacity .06s linear !important;
    animation: none !important;
  }

  .auth-visual-copy.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    animation: none !important;
  }

  .auth-page-polished .auth-visual {
    position: relative !important;
    display: block !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .auth-page-polished .auth-card input,
  .auth-page-polished .auth-submit,
  .google-auth-button {
    min-height: 48px !important;
  }

  .auth-page-polished .auth-links {
    min-height: 18px;
  }

  .auth-separator {
    margin: 15px 0 !important;
  }
}

html.auth-transition-out .auth-page-polished .auth-shell {
  opacity: 1 !important;
  transform: none !important;
}

.auth-panel,
.auth-panel.is-active,
.auth-visual-copy,
.auth-visual-copy.is-active {
  animation-duration: .01ms !important;
}

@media (max-width: 980px) {
  .auth-unified-card .auth-panel,
  .auth-unified-card .auth-panel.is-active,
  .auth-visual-copy,
  .auth-visual-copy.is-active {
    transform: none !important;
    animation: none !important;
  }
}


/* Auth no browser autofill/suggestions v18 */
.auth-page-polished input:-webkit-autofill,
.auth-page-polished input:-webkit-autofill:hover,
.auth-page-polished input:-webkit-autofill:focus,
.profile-page input:-webkit-autofill,
.profile-page input:-webkit-autofill:hover,
.profile-page input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827;
  box-shadow: 0 0 0 1000px #f8fafc inset !important;
  transition: background-color 999999s ease-out 0s;
}


/* Login-code page polish v19 */
@media (min-width: 981px) {
  .auth-login-code-shell .auth-visual-copy,
  .auth-login-code-shell .auth-visual {
    overflow: hidden;
  }

  .auth-login-code-shell .auth-visual h1,
  .auth-code-shell .auth-visual h1 {
    max-width: 520px;
    font-size: clamp(34px, 4.2vw, 52px);
    line-height: .98;
    letter-spacing: -.055em;
  }

  .auth-login-code-card {
    justify-content: center;
  }
}

.auth-readonly-input[readonly] {
  cursor: default;
  color: #334155 !important;
  background: #eef4ff !important;
  border-color: #d9e5f7 !important;
  box-shadow: none !important;
  user-select: text;
}

.auth-readonly-input[readonly]:focus {
  border-color: #d9e5f7 !important;
  box-shadow: none !important;
}

.auth-login-code-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.auth-login-code-actions a,
.auth-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.auth-login-code-actions a:hover,
.auth-link-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-login-code-card .auth-card-note {
  text-align: center;
}

@media (max-width: 560px) {
  .auth-login-code-actions {
    flex-direction: column;
    gap: 8px;
  }

  .auth-login-code-shell .auth-visual h1,
  .auth-code-shell .auth-visual h1 {
    font-size: 30px;
  }
}


/* Login/register/recovery code visual text fix v20 */
@media (min-width: 981px) {
  .auth-page-polished:not(.auth-unified-page) .auth-visual {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: clamp(34px, 4vw, 54px) !important;
    overflow: hidden !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual > * {
    position: relative;
    z-index: 2;
    max-width: 520px;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual .auth-badge {
    margin: 0 0 18px 0 !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual h1 {
    max-width: 520px !important;
    margin: 0 0 14px 0 !important;
    font-size: clamp(36px, 4.3vw, 54px) !important;
    line-height: .98 !important;
    letter-spacing: -.055em !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual p {
    max-width: 500px !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-feature-list {
    max-width: 540px !important;
    margin-top: 22px !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-feature-list span {
    white-space: nowrap;
  }

  .auth-login-code-shell .auth-visual {
    justify-content: flex-start !important;
  }

  .auth-login-code-shell .auth-visual::before {
    background:
      linear-gradient(90deg, rgba(6, 10, 18, .72) 0%, rgba(6, 10, 18, .46) 46%, rgba(6, 10, 18, .22) 100%),
      linear-gradient(180deg, rgba(6, 10, 18, .05) 0%, rgba(6, 10, 18, .54) 100%),
      radial-gradient(circle at 14% 10%, rgba(255, 225, 124, .22), transparent 27%),
      url('../site/auth_skyblock_hero.webp') center center / cover no-repeat !important;
  }
}

@media (max-width: 980px) {
  .auth-page-polished:not(.auth-unified-page) .auth-visual {
    padding: 24px !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual h1 {
    margin-top: 14px !important;
  }
}

@media (max-width: 560px) {
  .auth-page-polished:not(.auth-unified-page) .auth-visual {
    padding: 18px !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual h1 {
    font-size: 30px !important;
    line-height: 1 !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-feature-list {
    display: none !important;
  }
}


/* v22 correct fix:
   Revert wrong v21 idea. Login/register/recovery stay unchanged.
   Only code pages use the same bottom-left text position as login/register. */
@media (min-width: 981px) {
  .auth-page-polished:not(.auth-unified-page) .auth-visual {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    padding: clamp(34px, 4.2vw, 54px) !important;
    overflow: hidden !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual > * {
    position: relative;
    z-index: 2;
    max-width: 560px;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual .auth-badge {
    margin: 0 0 18px 0 !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual h1 {
    max-width: 560px !important;
    margin: 0 0 12px 0 !important;
    font-size: clamp(36px, 4.8vw, 58px) !important;
    line-height: .96 !important;
    letter-spacing: -.065em !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual p {
    max-width: 530px !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, .88) !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-feature-list {
    max-width: 560px !important;
    margin-top: 20px !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-feature-list span {
    white-space: nowrap;
  }

  .auth-login-code-shell .auth-visual::before,
  .auth-code-shell .auth-visual::before,
  .auth-reset-shell .auth-visual::before {
    background:
      linear-gradient(180deg, rgba(6, 10, 18, .10) 0%, rgba(6, 10, 18, .30) 43%, rgba(6, 10, 18, .78) 100%),
      radial-gradient(circle at 14% 10%, rgba(255, 225, 124, .26), transparent 26%),
      url('../site/auth_skyblock_hero.webp') center center / cover no-repeat !important;
  }
}

@media (max-width: 980px) {
  .auth-page-polished:not(.auth-unified-page) .auth-visual {
    justify-content: flex-end !important;
    padding: 24px !important;
  }
}

@media (max-width: 560px) {
  .auth-page-polished:not(.auth-unified-page) .auth-visual {
    padding: 18px !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-visual h1 {
    font-size: 31px !important;
    line-height: 1 !important;
  }

  .auth-page-polished:not(.auth-unified-page) .auth-feature-list {
    display: none !important;
  }
}


/* Admin polish + mobile cards v23 */
.admin-page {
  padding-top: clamp(28px, 4vw, 54px);
}

.admin-hero {
  position: relative;
  overflow: hidden;
  align-items: center;
  min-height: 190px;
  margin-bottom: 18px;
  padding: clamp(22px, 3.4vw, 34px);
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 34px;
  background:
    radial-gradient(circle at 9% 8%, rgba(255, 214, 82, .28), transparent 32%),
    radial-gradient(circle at 90% 20%, rgba(83, 132, 255, .12), transparent 28%),
    radial-gradient(circle at 82% 88%, rgba(135, 255, 153, .20), transparent 30%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 24px 70px rgba(17, 24, 39, .08);
}

.admin-hero::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(17, 24, 39, .08), transparent 66%);
  pointer-events: none;
}

.admin-hero > * {
  position: relative;
  z-index: 1;
}

.admin-hero h1 {
  margin-top: 10px;
  font-size: clamp(38px, 5vw, 64px);
}

.admin-hero p {
  max-width: 760px;
  margin-top: 12px;
  color: #5f687a;
  font-size: 16px;
}

.admin-stats-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-page .stat-card {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 16px 46px rgba(17, 24, 39, .06);
}

.admin-page .stat-card::after {
  content: '';
  position: absolute;
  right: -26px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: rgba(83, 132, 255, .08);
}

.admin-page .stat-card b {
  font-size: clamp(25px, 2.4vw, 34px);
}

.admin-page .stat-card .stat-text span {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7b8496;
  font-size: 11px;
}

.admin-block,
.admin-prices-block {
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(18px, 2.4vw, 24px);
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(17, 24, 39, .07);
}

.admin-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-block-head h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
}

.admin-block-head p {
  margin-top: 7px;
  color: #6b7280;
  font-size: 14px;
}

.admin-table-card {
  margin-top: 0;
  border-radius: 22px;
  background: #f8fafc;
}

.admin-table {
  min-width: 1180px;
  border-spacing: 0;
}

.admin-table th {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: #f8fafc;
}

.admin-table td {
  vertical-align: top;
}

.admin-table tbody tr {
  transition: background .16s ease, box-shadow .16s ease;
}

.admin-table tbody tr:hover {
  background: #fbfdff;
}

.admin-table code {
  display: inline-flex;
  max-width: 260px;
  padding: 5px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-table .hint {
  display: block;
  margin-top: 4px;
  color: #7b8496;
}

.inline-admin-form {
  min-width: 0;
}

.inline-admin-form.stack {
  max-width: 360px;
}

.inline-admin-form input,
.inline-admin-form select {
  min-width: 0;
}

.admin-table .actions,
.servers-admin-table .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: flex-start;
}

.admin-prices-block .two-cols {
  gap: 18px;
}

.admin-prices-block .small-table {
  border-radius: 18px;
}

.admin-prices-block .muted {
  max-width: 860px;
  margin: 0 0 18px;
}

/* Admin mobile: tables become cards, no horizontal scroll. */
@media (max-width: 1100px) {
  .admin-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-table {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .admin-page {
    padding-top: 18px;
  }

  .admin-hero {
    display: grid;
    gap: 16px;
    min-height: 0;
    border-radius: 26px;
    padding: 20px;
  }

  .admin-hero h1 {
    font-size: 36px;
  }

  .admin-hero p {
    font-size: 14px;
  }

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

  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-page .stat-card {
    min-height: 92px;
    border-radius: 20px;
    padding: 14px;
  }

  .admin-block,
  .admin-prices-block {
    padding: 14px;
    border-radius: 24px;
  }

  .admin-block-head {
    align-items: flex-start;
  }

  .admin-block-head h2 {
    font-size: 26px;
  }

  .admin-table-card {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-table,
  .admin-table thead,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody {
    display: grid;
    gap: 12px;
  }

  .admin-table tr {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border: 1px solid #e6eaf0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(17, 24, 39, .06);
  }

  .admin-table tr::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #111827, #5384ff, #87ff99);
  }

  .admin-table td {
    display: grid;
    grid-template-columns: minmax(90px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f6;
  }

  .admin-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .admin-table td::before {
    color: #7b8496;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .07em;
  }

  .users-admin-table td:nth-child(1)::before { content: 'ID'; }
  .users-admin-table td:nth-child(2)::before { content: 'Пользователь'; }
  .users-admin-table td:nth-child(3)::before { content: 'Роль'; }
  .users-admin-table td:nth-child(4)::before { content: 'Баланс'; }
  .users-admin-table td:nth-child(5)::before { content: 'Premium'; }
  .users-admin-table td:nth-child(6)::before { content: 'Баланс +/-'; }
  .users-admin-table td:nth-child(7)::before { content: 'Роль'; }

  .servers-admin-table td:nth-child(1)::before { content: 'ID'; }
  .servers-admin-table td:nth-child(2)::before { content: 'Сервер'; }
  .servers-admin-table td:nth-child(3)::before { content: 'Владелец'; }
  .servers-admin-table td:nth-child(4)::before { content: 'Статус'; }
  .servers-admin-table td:nth-child(5)::before { content: 'Закреп'; }
  .servers-admin-table td:nth-child(6)::before { content: 'Модерация'; }

  .inline-admin-form,
  .dashboard-buy-grid form {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .inline-admin-form.stack {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .inline-admin-form input,
  .inline-admin-form select,
  .inline-admin-form button,
  .admin-table .button,
  .servers-admin-table .actions form,
  .servers-admin-table .actions button {
    width: 100%;
  }

  .servers-admin-table .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .premium-mini,
  .pin-mini {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    text-align: left;
    line-height: 1.25;
  }

  .admin-table code {
    max-width: 100%;
  }

  .admin-prices-block .two-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-table td::before {
    margin-bottom: 2px;
  }

  .admin-hero h1 {
    font-size: 32px;
  }
}


/* Admin full card redesign v24 */
.admin-page-v24 {
  padding-top: clamp(22px, 4vw, 52px);
}

.admin-hero-v24 {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 36px;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 214, 82, .30), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(83, 132, 255, .14), transparent 30%),
    radial-gradient(circle at 84% 90%, rgba(135, 255, 153, .22), transparent 34%),
    linear-gradient(135deg, #fff, #f8fafc);
  box-shadow: 0 26px 76px rgba(17, 24, 39, .08);
}

.admin-hero-v24::after {
  content: '';
  position: absolute;
  right: -95px;
  bottom: -115px;
  width: 310px;
  height: 310px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(17, 24, 39, .08), transparent 65%);
  pointer-events: none;
}

.admin-hero-v24 > * {
  position: relative;
  z-index: 1;
}

.admin-hero-v24 h1 {
  margin: 10px 0 0;
  font-size: clamp(42px, 5.6vw, 72px);
}

.admin-hero-v24 p {
  max-width: 760px;
  margin-top: 12px;
  color: #5f687a;
  font-size: 16px;
}

.admin-hero-actions-v24 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-stat-board-v24 {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-stat-v24 {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 17px;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: 25px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  box-shadow: 0 16px 44px rgba(17, 24, 39, .055);
}

.admin-stat-v24::after {
  content: '';
  position: absolute;
  right: -28px;
  top: -34px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(83, 132, 255, .08);
}

.admin-stat-v24 span {
  color: #7b8496;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-stat-v24 strong {
  position: relative;
  z-index: 1;
  color: #111827;
  font-size: clamp(25px, 2.4vw, 36px);
  line-height: 1;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}

.admin-stat-v24 small {
  color: #8a94a6;
  font-size: 12px;
  font-weight: 800;
}

.admin-block-v24 {
  margin-bottom: 22px;
  padding: clamp(16px, 2.3vw, 24px);
  border-radius: 32px;
  border: 1px solid rgba(226, 232, 240, .96);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 70px rgba(17, 24, 39, .075);
}

.admin-block-head-v24 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-block-kicker {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-block-head-v24 h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3.4vw, 42px);
}

.admin-block-head-v24 p {
  margin-top: 7px;
  color: #6b7280;
}

.admin-count-pill {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 950;
}

.admin-user-grid-v24,
.admin-server-grid-v24 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-user-card-v24,
.admin-server-card-v24 {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e6eaf0;
  border-radius: 26px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 14px 38px rgba(17, 24, 39, .055);
}

.admin-card-main-v24 {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.admin-avatar-v24,
.admin-server-icon-v24 {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #111827, #334155);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(17, 24, 39, .16);
}

.admin-server-icon-v24 {
  background: linear-gradient(135deg, #111827, #2563eb);
}

.admin-card-title-v24 {
  min-width: 0;
}

.admin-card-title-row-v24 {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.admin-card-title-row-v24 h3 {
  min-width: 0;
  margin: 0;
  color: #111827;
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-card-title-v24 p,
.admin-card-title-v24 .hint {
  margin: 4px 0 0;
  color: #7b8496;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-card-title-v24 code {
  display: inline-flex;
  max-width: 100%;
  margin-top: 5px;
  padding: 5px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-mini-stats-v24 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-mini-stats-v24 div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #f8fafc;
}

.admin-mini-stats-v24 span {
  display: block;
  color: #8a94a6;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-mini-stats-v24 b {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-card-section-v24,
.admin-details-v24 {
  min-width: 0;
  padding: 12px;
  border: 1px solid #edf0f4;
  border-radius: 18px;
  background: #fbfdff;
}

.admin-section-title-v24 {
  margin-bottom: 9px;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-details-v24 summary {
  cursor: pointer;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
}

.admin-details-v24[open] summary {
  margin-bottom: 10px;
}

.admin-form-grid-v24 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.admin-form-grid-wide-v24 {
  grid-template-columns: minmax(0, 1fr) minmax(90px, .45fr) auto;
}

.admin-form-grid-promo-v24 {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-form-grid-v24 input,
.admin-form-grid-v24 select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: #111827;
  font-weight: 800;
}

.admin-moderation-v24 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-moderation-v24 .button,
.admin-moderation-v24 form {
  width: 100%;
}

.admin-price-grid-v24 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-price-panel-v24 {
  min-width: 0;
  padding: 16px;
  border: 1px solid #edf0f4;
  border-radius: 24px;
  background: #fbfdff;
}

.admin-price-panel-v24 h3 {
  margin-bottom: 12px;
}

.admin-price-list-v24 {
  display: grid;
  gap: 8px;
}

.admin-price-list-v24 div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #edf0f4;
  border-radius: 15px;
  background: #fff;
}

.admin-price-list-v24 span {
  font-weight: 900;
  color: #111827;
}

.admin-price-list-v24 b {
  color: #64748b;
  font-size: 12px;
}

.admin-price-list-v24 strong {
  color: #111827;
}

@media (max-width: 1180px) {
  .admin-stat-board-v24 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-user-grid-v24,
  .admin-server-grid-v24 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-page-v24 {
    padding-top: 16px;
  }

  .admin-hero-v24 {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 20px;
    border-radius: 26px;
  }

  .admin-hero-v24 h1 {
    font-size: 36px;
  }

  .admin-hero-v24 p {
    font-size: 14px;
  }

  .admin-hero-actions-v24 {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

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

  .admin-stat-board-v24 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-stat-v24 {
    min-height: 98px;
    padding: 14px;
    border-radius: 20px;
  }

  .admin-block-v24 {
    padding: 14px;
    border-radius: 24px;
  }

  .admin-block-head-v24 {
    display: grid;
    gap: 10px;
    align-items: start;
  }

  .admin-count-pill {
    width: fit-content;
  }

  .admin-card-main-v24 {
    grid-template-columns: 1fr;
  }

  .admin-avatar-v24,
  .admin-server-icon-v24 {
    width: 48px;
    height: 48px;
    border-radius: 17px;
  }

  .admin-card-title-row-v24 {
    align-items: flex-start;
  }

  .admin-mini-stats-v24 {
    grid-template-columns: 1fr;
  }

  .admin-form-grid-v24,
  .admin-form-grid-wide-v24,
  .admin-form-grid-promo-v24 {
    grid-template-columns: 1fr;
  }

  .admin-form-grid-v24 .button,
  .admin-form-grid-v24 input,
  .admin-form-grid-v24 select {
    width: 100%;
  }

  .admin-moderation-v24 {
    grid-template-columns: 1fr;
  }

  .admin-price-grid-v24 {
    grid-template-columns: 1fr;
  }

  .admin-price-list-v24 div {
    grid-template-columns: 1fr;
  }

  .premium-mini,
  .pin-mini {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 430px) {
  .admin-stat-board-v24 {
    grid-template-columns: 1fr;
  }

  .admin-card-title-row-v24 {
    display: grid;
    gap: 7px;
  }

  .admin-card-title-row-v24 .status {
    width: fit-content;
  }
}


/* Admin search + pagination v25 */
.admin-page-v25 .admin-block-head-v24 {
  margin-bottom: 14px;
}

.admin-filter-bar-v25 {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #e8edf4;
  border-radius: 20px;
  background: #f8fafc;
}

.admin-filter-bar-servers-v25 {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, .34fr) auto auto;
}

.admin-filter-bar-v25 label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-filter-bar-v25 label span {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-filter-bar-v25 input,
.admin-filter-bar-v25 select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  padding: 8px 11px;
  background: #fff;
  color: #111827;
  font-weight: 850;
}

.admin-filter-bar-v25 input:focus,
.admin-filter-bar-v25 select:focus {
  outline: none;
  border-color: rgba(83, 132, 255, .72);
  box-shadow: 0 0 0 4px rgba(83, 132, 255, .12);
}

.admin-pagination-v25 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #edf0f4;
  border-radius: 18px;
  background: #fbfdff;
}

.admin-pagination-v25 a,
.admin-pagination-v25 span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
}

.admin-pagination-v25 a {
  padding: 8px 13px;
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #111827;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.admin-pagination-v25 a:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.admin-pagination-v25 a.is-disabled {
  pointer-events: none;
  opacity: .45;
}

.admin-pagination-v25 span {
  padding: 8px 12px;
  color: #64748b;
  background: #f8fafc;
}

.admin-empty-v25 {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed #dbe3ef;
  border-radius: 20px;
  background: #f8fafc;
  text-align: center;
}

.admin-empty-v25 strong {
  color: #111827;
}

.admin-empty-v25 span {
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 760px) {
  .admin-filter-bar-v25,
  .admin-filter-bar-servers-v25 {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .admin-filter-bar-v25 .button,
  .admin-filter-bar-v25 a.button {
    width: 100%;
  }

  .admin-pagination-v25 {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .admin-pagination-v25 a,
  .admin-pagination-v25 span {
    width: 100%;
  }
}


/* Full i18n v26: allow longer translated labels */
html[lang="en"] .button,
html[lang="it"] .button,
html[lang="uk"] .button,
html[lang="en"] .status,
html[lang="it"] .status,
html[lang="uk"] .status {
  white-space: normal;
}

html[lang="it"] .auth-card-top h2,
html[lang="uk"] .auth-card-top h2,
html[lang="en"] .auth-card-top h2 {
  line-height: 1.05;
}

html[lang="it"] .admin-filter-bar-v25,
html[lang="uk"] .admin-filter-bar-v25,
html[lang="en"] .admin-filter-bar-v25 {
  align-items: end;
}


/* Full i18n deep v27 */
html[lang="it"] .filters .button,
html[lang="en"] .filters .button,
html[lang="uk"] .filters .button {
  min-width: fit-content;
}

html[lang="it"] .section-head p,
html[lang="en"] .section-head p,
html[lang="uk"] .section-head p {
  max-width: 820px;
}


/* I18N keep-page + deep fixes v28 */
.langs a {
  min-width: 38px;
}

.pagination a,
.admin-pagination-v25 a,
.tag-arrow {
  white-space: nowrap;
}

html[lang="it"] .monitoring-list-head,
html[lang="uk"] .monitoring-list-head,
html[lang="en"] .monitoring-list-head {
  gap: 8px;
}

html[lang="it"] .wizard-steps h2,
html[lang="uk"] .wizard-steps h2,
html[lang="en"] .wizard-steps h2 {
  line-height: 1.05;
}


/* Full i18n dashboard audit v29 */
html[lang="it"] .dashboard-hero h1,
html[lang="en"] .dashboard-hero h1,
html[lang="uk"] .dashboard-hero h1 {
  line-height: 1.03;
}

html[lang="it"] .dashboard-commerce,
html[lang="en"] .dashboard-commerce,
html[lang="uk"] .dashboard-commerce {
  align-items: flex-start;
}

html[lang="it"] .premium-mini,
html[lang="en"] .premium-mini,
html[lang="uk"] .premium-mini,
html[lang="it"] .pin-mini,
html[lang="en"] .pin-mini,
html[lang="uk"] .pin-mini {
  white-space: normal;
}


/* Stable i18n hotfix v31 */
html[lang="it"] .add-server-wizard .wizard-actions .button,
html[lang="uk"] .add-server-wizard .wizard-actions .button,
html[lang="en"] .add-server-wizard .wizard-actions .button {
  min-width: 130px;
}


/* I18N recovered v34 */
html[lang="it"] .server-rank-card,
html[lang="en"] .server-rank-card,
html[lang="uk"] .server-rank-card {
  min-width: 0;
}


/* I18N kostyl v36: no layout changes, only keep translated long labels readable */
html[lang="it"] .field-error-message,
html[lang="it"] .toast,
html[lang="it"] .server-rank-card {
  overflow-wrap: anywhere;
}


/* I18N kostyl v37: screenshots and latest-votes leftovers */
html[lang="it"] .server-screenshots,
html[lang="it"] .latest-votes,
html[lang="it"] .server-votes {
  overflow-wrap: anywhere;
}


/* Mobile header stability fix v38
   Fixes small sticky-header jumping on mobile browser scroll/address-bar changes. */
@media (max-width: 900px) {
  html {
    scroll-padding-top: 86px;
  }

  body {
    padding-top: 76px;
  }

  .site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout paint;
  }

  .header-inner {
    position: relative;
    min-height: 64px;
  }

  .header-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    width: 100%;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -6px, 0);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    max-height: calc(100svh - 86px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .header-menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  .mobile-menu-toggle,
  .mobile-menu-toggle span {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
}

@media (max-width: 560px) {
  html {
    scroll-padding-top: 80px;
  }

  body {
    padding-top: 72px;
  }

  .header-menu {
    max-height: calc(100svh - 80px);
  }
}


/* Mobile menu open fix v40
   v38 fixed header was stable, but contain: paint could clip the dropdown menu. */
@media (max-width: 900px) {
  .site-header {
    overflow: visible !important;
    contain: none !important;
  }

  .header-inner {
    overflow: visible !important;
    contain: none !important;
    z-index: 1001;
  }

  .header-menu {
    z-index: 1002;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .header-menu.is-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mobile-menu-toggle {
    position: relative;
    z-index: 1003;
    pointer-events: auto;
    touch-action: manipulation;
  }
}


/* Welcome modal language picker v41 */
.welcome-lang-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: -2px 0 16px;
}

.welcome-lang-picker a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #111827;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.welcome-lang-picker a.is-active,
.welcome-lang-picker a:hover {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

@media (max-width: 520px) {
  .welcome-lang-picker {
    gap: 6px;
    margin-bottom: 12px;
  }

  .welcome-lang-picker a {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
}


/* Welcome visitor text + desktop flag fallback v42 */
.welcome-flag-icon {
  width: 21px;
  height: 15px;
  flex: 0 0 auto;
  display: inline-block;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid rgba(17, 24, 39, .16);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
  background: #f8fafc;
}

.welcome-flag-emoji {
  display: none;
}

.welcome-flag-it {
  background: linear-gradient(90deg, #009246 0 33.333%, #fff 33.333% 66.666%, #ce2b37 66.666% 100%);
}

.welcome-flag-uk {
  background: linear-gradient(180deg, #0057b7 0 50%, #ffd700 50% 100%);
}

.welcome-flag-ru {
  background: linear-gradient(180deg, #fff 0 33.333%, #0039a6 33.333% 66.666%, #d52b1e 66.666% 100%);
}

.welcome-flag-en {
  background:
    linear-gradient(90deg, transparent 0 42%, #fff 42% 58%, transparent 58% 100%),
    linear-gradient(0deg, transparent 0 36%, #fff 36% 64%, transparent 64% 100%),
    linear-gradient(90deg, transparent 0 46%, #c8102e 46% 54%, transparent 54% 100%),
    linear-gradient(0deg, transparent 0 42%, #c8102e 42% 58%, transparent 58% 100%),
    linear-gradient(32deg, transparent 0 44%, #fff 44% 50%, #c8102e 50% 55%, #fff 55% 61%, transparent 61% 100%),
    linear-gradient(-32deg, transparent 0 44%, #fff 44% 50%, #c8102e 50% 55%, #fff 55% 61%, transparent 61% 100%),
    #012169;
}

@media (max-width: 520px) {
  .welcome-modal {
    padding-top: 36px;
  }

  .welcome-lang-picker {
    margin-top: 8px;
    margin-bottom: 14px;
  }

  .welcome-flag-icon {
    width: auto;
    height: auto;
    border: 0;
    box-shadow: none;
    background: transparent !important;
    border-radius: 0;
  }

  .welcome-flag-emoji {
    display: inline;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 16px;
    line-height: 1;
  }
}


/* I18N leftovers EN/UK/IT v44 */
html[lang="en"] .field-error-message,
html[lang="uk"] .field-error-message,
html[lang="it"] .field-error-message,
html[lang="en"] .toast,
html[lang="uk"] .toast,
html[lang="it"] .toast {
  overflow-wrap: anywhere;
}


/* I18N training phrase v45 */
html[lang="en"] .setup-important-note,
html[lang="uk"] .setup-important-note,
html[lang="it"] .setup-important-note {
  overflow-wrap: anywhere;
}


/* I18N promotion queue v48 */
html[lang="en"] .dashboard-confirm-modal,
html[lang="uk"] .dashboard-confirm-modal,
html[lang="it"] .dashboard-confirm-modal,
html[lang="en"] .promotion-queue-warning,
html[lang="uk"] .promotion-queue-warning,
html[lang="it"] .promotion-queue-warning {
  overflow-wrap: anywhere;
}


/* Premium boost submit fix v49 */
.premium-boost-form button[disabled] {
  cursor: not-allowed;
}


/* Premium boost clickable v50 */
.premium-boost-form .premium-boost-submit {
  cursor: pointer;
}


/* Dashboard full-card status colors + training highlight v53 */
.dashboard-server-tile {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.dashboard-server-tile-status-approved {
  border-color: #7dd278 !important;
  background:
    linear-gradient(180deg, rgba(218, 251, 223, .88), rgba(255, 255, 255, .94)) !important;
  box-shadow: 0 18px 46px rgba(88, 247, 79, .16) !important;
}

.dashboard-server-tile-not-approved,
.dashboard-server-tile-status-pending,
.dashboard-server-tile-status-review,
.dashboard-server-tile-status-moderation,
.dashboard-server-tile-status-awaiting {
  border-color: #f4b84f !important;
  background:
    linear-gradient(180deg, rgba(255, 241, 214, .94), rgba(255, 255, 255, .95)) !important;
  box-shadow: 0 18px 46px rgba(245, 158, 11, .18) !important;
}

.dashboard-server-tile-status-rejected,
.dashboard-server-tile-status-declined {
  border-color: #ff8787 !important;
  background:
    linear-gradient(180deg, rgba(255, 231, 231, .94), rgba(255, 255, 255, .95)) !important;
  box-shadow: 0 18px 46px rgba(247, 79, 79, .16) !important;
}

.dashboard-server-tile .status.approved {
  background: #dafbdf !important;
  color: #2a2a2a !important;
  border-color: #7dd278 !important;
}

.dashboard-server-tile .status.pending,
.dashboard-server-tile .status.review,
.dashboard-server-tile .status.moderation,
.dashboard-server-tile .status.awaiting {
  background: #fff1d6 !important;
  color: #7a4a00 !important;
  border-color: #f4b84f !important;
}

.dashboard-server-tile .status.rejected,
.dashboard-server-tile .status.declined {
  background: #ffe7e7 !important;
  color: #7a1010 !important;
  border-color: #ff8787 !important;
}

.dashboard-training-required-button {
  position: relative;
  overflow: hidden;
  border-color: #f4b84f !important;
  background: linear-gradient(135deg, #fff1d6, #ffe0a6) !important;
  color: #5f3b00 !important;
  box-shadow: 0 12px 28px rgba(245, 158, 11, .25) !important;
  animation: trainingPulseV53 1.75s ease-in-out infinite;
}

.dashboard-training-required-button span {
  position: relative;
  z-index: 1;
  display: block;
  font-weight: 950;
}

.dashboard-training-required-button small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.05;
  opacity: .82;
}

.dashboard-training-required-button::after {
  content: "";
  position: absolute;
  inset: -45% -25%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: translateX(-70%) rotate(12deg);
  animation: trainingShineV53 2.6s ease-in-out infinite;
}

@keyframes trainingPulseV53 {
  0%, 100% { transform: translateY(0); box-shadow: 0 12px 28px rgba(245, 158, 11, .20); }
  50% { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(245, 158, 11, .30); }
}

@keyframes trainingShineV53 {
  0%, 35% { transform: translateX(-75%) rotate(12deg); }
  65%, 100% { transform: translateX(75%) rotate(12deg); }
}

@media (max-width: 640px) {
  .dashboard-training-required-button small {
    font-size: 9px;
  }
}
