:root {
  --bg-top: #f5f7f8;
  --bg-mid: #dde4e8;
  --bg-bottom: #e9eef1;
  --bg-grid: rgba(86, 103, 116, 0.05);
  --panel: rgba(248, 251, 253, 0.58);
  --panel-strong: rgba(245, 249, 252, 0.74);
  --panel-soft: rgba(255, 255, 255, 0.36);
  --line: rgba(76, 100, 118, 0.20);
  --line-strong: rgba(21, 169, 181, 0.28);
  --text: #213240;
  --text-soft: #4d6475;
  --text-faint: #7b8e9d;
  --accent: #17b7c7;
  --accent-strong: #0b98a8;
  --accent-soft: rgba(23, 183, 199, 0.12);
  --danger: #c95d63;
  --danger-soft: rgba(201, 93, 99, 0.10);
  --warn: #b88a2d;
  --warn-soft: rgba(184, 138, 45, 0.10);
  --ok: #1f9b8c;
  --ok-soft: rgba(31, 155, 140, 0.10);
  --shadow-soft: 0 20px 50px rgba(84, 100, 114, 0.14);
  --shadow-card: 0 26px 68px rgba(72, 86, 98, 0.16);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --wrap-wide: 1180px;
  --wrap-main: 1100px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body.page {
  min-height: 100vh;
  margin: 0;
  position: relative;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.18)),
    radial-gradient(920px 420px at 50% -4%, rgba(255,255,255,0.88), rgba(255,255,255,0) 72%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
  overflow-x: hidden;
}
body.page::before,
body.page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body.page::before {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.38) 14%, transparent 30%, transparent 70%, rgba(255,255,255,0.30) 86%, transparent 100%),
    repeating-linear-gradient(90deg, var(--bg-grid) 0 1px, transparent 1px 108px),
    repeating-linear-gradient(180deg, rgba(72, 90, 104, 0.04) 0 1px, transparent 1px 108px);
  opacity: .72;
}
body.page::after {
  background:
    radial-gradient(760px 320px at 50% 16%, rgba(255,255,255,0.76), transparent 72%),
    radial-gradient(420px 240px at 14% 18%, rgba(23, 183, 199, 0.10), transparent 76%),
    radial-gradient(460px 260px at 88% 12%, rgba(23, 183, 199, 0.08), transparent 78%),
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0));
  mix-blend-mode: screen;
}
body.page > * {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(100% - 28px, var(--wrap-main));
  margin: 0 auto;
  padding: 22px 0 56px;
}
.page-cabinet .wrap { width: min(100% - 28px, 1040px); }
.page-public .wrap { width: min(100% - 28px, var(--wrap-wide)); }
.page-staff .wrap { width: min(100% - 28px, 1280px); }

.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.54), rgba(238,244,248,0.30)),
    var(--panel-soft);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}
.page-public .site-top,
.page-cabinet .site-top,
.page-staff .site-top {
  position: sticky;
  top: 12px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #263644;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}
.brand-link:hover,
.brand-link:visited {
  color: inherit;
}
.brand-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(23,183,199,0.12);
  border-radius: 16px;
}
.brand span,
.brand div:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  border: 1px solid rgba(37, 60, 78, 0.12);
  background:
    radial-gradient(circle at 72% 28%, rgba(23,183,199,0.95), transparent 24%),
    linear-gradient(135deg, rgba(32, 46, 58, 0.92), rgba(71, 86, 102, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.26),
    0 14px 26px rgba(70, 85, 98, 0.20);
  position: relative;
  overflow: hidden;
}
.logo::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  opacity: .7;
}

.nav,
.actions,
.cta,
.metaRow,
.inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav {
  justify-content: flex-end;
  min-width: 0;
}

.cta .btn,
.metaRow .pill {
  max-width: 100%;
}

.btn,
button.btn,
input[type="submit"].btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(236,242,246,0.26)),
    rgba(255,255,255,0.16);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70);
  transition: border-color .15s ease, background-color .15s ease, transform .08s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover,
button.btn:hover,
input[type="submit"].btn:hover {
  border-color: rgba(11, 152, 168, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 0 0 3px rgba(23, 183, 199, 0.08);
}
.btn:active,
button.btn:active,
input[type="submit"].btn:active {
  transform: translateY(1px);
}
.btn.primary {
  border-color: rgba(11, 152, 168, 0.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.64), rgba(226,245,247,0.46)),
    var(--accent-soft);
  color: #164754;
}
.btn.ghost {
  background: rgba(255,255,255,0.12);
}
.btn.danger {
  border-color: rgba(201, 93, 99, 0.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(247,233,234,0.42)),
    var(--danger-soft);
  color: #8a3d42;
}
.btn.warn {
  border-color: rgba(184, 138, 45, 0.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(249,240,224,0.44)),
    var(--warn-soft);
  color: #7e6220;
}
.btn[disabled],
button.btn[disabled],
input[type="submit"].btn[disabled] {
  opacity: .58;
  cursor: not-allowed;
  box-shadow: none;
}

.card,
.hero-panel,
.surface,
.panel,
.section-box {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(243,248,251,0.42)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}
.card {
  margin-top: 18px;
  padding: 18px;
}
.card.inset,
.surface.inset {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.52), rgba(240,245,249,0.30)),
    rgba(255,255,255,0.24);
}
.hero-panel {
  padding: 24px;
}
.hero-panel--accent {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(23,183,199,0.06);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: rgba(11, 152, 168, 0.40);
}

h1, h2, h3 {
  margin: 0;
  color: #1d2e3a;
  line-height: 1.12;
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -.03em;
}
.page-cabinet h1,
.page-staff h1 {
  font-size: clamp(24px, 3vw, 34px);
}
h2 { font-size: clamp(18px, 2vw, 24px); }
h3 { font-size: 16px; }
.lead,
.muted,
.small,
.section-lead,
.text-muted {
  color: var(--text-soft);
  line-height: 1.6;
}
.lead {
  margin: 14px 0 0;
  max-width: 66ch;
  font-size: 16px;
}
.muted { font-size: 14px; }
.small { font-size: 12px; }
.who { color: var(--text-faint); font-size: 13px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .92fr);
  gap: 18px;
  margin-top: 20px;
  align-items: start;
}
.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero-ambient {
  position: relative;
  overflow: hidden;
}
.hero-ambient::before {
  content: "";
  position: absolute;
  inset: -120px -60px auto;
  height: 220px;
  background:
    radial-gradient(360px 180px at 24% 36%, rgba(23,183,199,0.16), transparent 74%),
    radial-gradient(420px 180px at 82% 32%, rgba(255,255,255,0.56), transparent 72%);
  pointer-events: none;
}
.hero-ambient > * { position: relative; }

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: rgba(255,255,255,0.24);
  font-size: 13px;
}
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.danger { color: var(--danger); }

.stats-grid,
.feature-grid,
.news-grid,
.cards-grid {
  display: grid;
  gap: 16px;
}
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.feature-card,
.info-card,
.download-card,
.news-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.52), rgba(240,245,249,0.28)),
    rgba(255,255,255,0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.38);
}
.feature-card,
.info-card,
.download-card,
.stat-card {
  padding: 16px;
}

.download-card .cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.download-card .cta .btn {
  width: 100%;
}
.feature-card p,
.info-card p,
.download-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 14px;
}
.stat-card .value {
  font-size: 24px;
  font-weight: 800;
  color: #19303c;
}
.stat-card .label {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 12px;
}

.news-card {
  overflow: hidden;
  padding: 0;
}
.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.news-card-body {
  padding: 16px;
}
.news-meta {
  color: var(--text-faint);
  font-size: 12px;
  margin-bottom: 8px;
}
.news-title {
  margin: 0 0 8px;
  font-size: 20px;
}
.news-excerpt {
  margin: 0 0 14px;
  color: var(--text-soft);
  line-height: 1.58;
  font-size: 14px;
}
.news-cover,
.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid var(--line);
}
.article-cover {
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.article-body {
  padding: 22px;
}
.article-text {
  color: var(--text);
  line-height: 1.74;
  font-size: 16px;
}
.article-text p,
.article-text div,
.article-text ul,
.article-text ol {
  margin: 0 0 14px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.section-head p {
  margin: 8px 0 0;
}

.media-box,
.empty-box,
.note-box {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
  color: var(--text-soft);
  background: rgba(255,255,255,0.20);
}
.note-box.warn {
  border-style: solid;
  border-color: rgba(184,138,45,0.26);
  background: linear-gradient(180deg, rgba(255,255,255,0.52), rgba(249,240,224,0.32)), var(--warn-soft);
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin: 10px 0 6px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.44);
  color: var(--text);
  outline: none;
  font: inherit;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(23,183,199,0.55);
  box-shadow: 0 0 0 3px rgba(23,183,199,0.12);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { color: var(--text-soft); font-weight: 600; }

table.compact td:first-child {
  width: 180px;
  color: var(--text-soft);
}

.err,
.ok,
.warn {
  padding: 10px 12px;
  border-radius: 14px;
  margin: 10px 0;
}
.err {
  border: 1px solid rgba(201,93,99,.32);
  background: rgba(201,93,99,.08);
  color: #7f3940;
}
.ok {
  border: 1px solid rgba(23,183,199,.28);
  background: rgba(23,183,199,.08);
  color: #16525d;
}
.warn {
  border: 1px solid rgba(184,138,45,.32);
  background: rgba(184,138,45,.08);
  color: #6f551d;
}

.footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 12px;
}

.site-top .menu-toggle,
.site-top .menu-toggle.mobile-only {
  display: none !important;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  flex: 0 0 auto;
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #263644;
  transition: transform .18s ease, opacity .18s ease;
}
.menu-toggle-bars {
  position: relative;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.site-top.menu-open .menu-toggle-bars { background: transparent; }
.site-top.menu-open .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-top.menu-open .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1024px) {
  .feature-grid,
  .news-grid,
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .wrap { width: min(100% - 18px, var(--wrap-main)); padding-top: 14px; }
  .page-public .site-top,
  .page-cabinet .site-top,
  .page-staff .site-top { top: 8px; }
  .site-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }
  .site-top .menu-toggle,
  .site-top .menu-toggle.mobile-only {
    display: inline-flex !important;
  }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(76,100,118,0.14);
    grid-column: 1 / -1;
  }
  .site-top.menu-open .nav {
    display: flex;
  }
  .nav .btn,
  .nav a.btn {
    width: 100%;
  }
  .feature-grid,
  .news-grid,
  .cards-grid,
  .stats-grid,
  .row { grid-template-columns: 1fr; }
  .hero-panel,
  .card,
  .article-body { padding: 18px; }
  .site-top {
    padding: 12px;
  }
  .brand span {
    font-size: 15px;
  }
  h1 { font-size: clamp(26px, 8vw, 36px); }
  .lead { font-size: 15px; }
}

@media (hover:none) {
  .btn,
  .menu-toggle { min-height: 44px; }
}

.mobile-only {
  display: none !important;
}

.game-profile-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.profile-hero-card {
  overflow: hidden;
}

.profile-hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: stretch;
}

.profile-agent-card,
.profile-command-card,
.profile-wallet-item,
.profile-status-item,
.profile-stat-card,
.profile-modifier-item,
.profile-clan-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.56), rgba(241,247,250,0.28)),
    rgba(255,255,255,0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.44);
}

.profile-agent-card,
.profile-command-card,
.profile-status-card,
.profile-wallet-card,
.profile-modifiers-card,
.profile-clan-card,
.profile-frame-card {
  padding: 18px;
}

.profile-agent-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-avatar-wrap {
  width: 116px;
  height: 116px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(25, 136, 149, 0.28);
  background:
    radial-gradient(circle at 72% 26%, rgba(23,183,199,0.22), transparent 26%),
    linear-gradient(145deg, rgba(38,54,68,0.96), rgba(88,103,118,0.72));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 20px 44px rgba(76, 92, 106, 0.18);
}

.profile-avatar-image,
.profile-avatar-fallback {
  width: 100%;
  height: 100%;
}

.profile-avatar-image {
  object-fit: cover;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  color: #eef7fa;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: .04em;
}

.profile-agent-meta h1 {
  margin-top: 0;
}

.profile-agent-pills {
  gap: 8px;
}

.profile-command-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: rgba(23,183,199,0.56);
}

.profile-main-actions {
  gap: 10px;
}

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

.profile-summary-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(76,100,118,0.16);
  background: rgba(255,255,255,0.22);
}

.profile-summary-icon,
.profile-status-icon,
.profile-wallet-icon,
.profile-stat-icon {
  display: grid;
  place-items: center;
  color: #197c8a;
}

.profile-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(23,183,199,0.10);
  border: 1px solid rgba(23,183,199,0.16);
}

.profile-summary-icon svg,
.profile-status-icon svg,
.profile-wallet-icon svg,
.profile-stat-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.profile-summary-value,
.profile-wallet-value,
.profile-stat-value,
.profile-modifier-value,
.profile-clan-name {
  color: #1c2f3b;
  font-weight: 800;
}

.profile-summary-value { font-size: 20px; }
.profile-summary-label {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 12px;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.profile-status-list {
  display: grid;
  gap: 12px;
}

.profile-status-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.profile-status-item.is-primary {
  border-color: rgba(23,183,199,0.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.60), rgba(229,245,247,0.38)),
    rgba(23,183,199,0.08);
}

.profile-status-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(23,183,199,0.10);
  border: 1px solid rgba(23,183,199,0.14);
}

.profile-status-label,
.profile-wallet-label,
.profile-stat-meta,
.profile-modifier-label,
.profile-clan-tag {
  color: var(--text-faint);
  font-size: 12px;
}

.profile-status-value {
  margin-top: 4px;
  color: #213240;
  font-size: 18px;
  font-weight: 700;
}

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

.profile-wallet-item {
  padding: 16px;
  text-align: left;
}

.profile-wallet-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(23,183,199,0.08);
  border: 1px solid rgba(23,183,199,0.14);
}

.profile-wallet-value {
  font-size: 30px;
  line-height: 1;
}

.profile-wallet-label {
  margin-top: 8px;
  font-size: 13px;
}

.profile-stats-section {
  padding-bottom: 20px;
}

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

.profile-stat-card {
  padding: 16px;
}

.profile-stat-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: rgba(23,183,199,0.08);
  border: 1px solid rgba(23,183,199,0.14);
}

.profile-stat-name {
  color: #1f3340;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
}

.profile-stat-value {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 36px);
  line-height: 1;
}

.profile-stat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.profile-boost-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(23,183,199,0.16);
  background: rgba(23,183,199,0.08);
  color: #16606c;
  font-size: 12px;
  font-weight: 700;
}

.profile-stat-desc {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 14px;
}

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

.profile-modifier-item {
  padding: 14px;
}

.profile-modifier-value {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
}

.profile-clan-box {
  padding: 16px;
}

.profile-clan-tag {
  margin-top: 6px;
}

.profile-clan-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.profile-frame-card {
  display: grid;
  gap: 14px;
}

.profile-frame-shell {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.profile-frame-visual,
.profile-frame-bonus-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.56), rgba(241,247,250,0.28)),
    rgba(255,255,255,0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.44);
}

.profile-frame-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 190px;
  padding: 18px;
  background:
    radial-gradient(circle at 72% 24%, rgba(23,183,199,0.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(236,244,247,0.34)),
    rgba(255,255,255,0.22);
}

.profile-frame-glyph {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  color: #197c8a;
  background: rgba(23,183,199,0.10);
  border: 1px solid rgba(23,183,199,0.16);
}

.profile-frame-glyph svg {
  width: 38px;
  height: 38px;
  display: block;
}

.profile-frame-code {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
}

.profile-frame-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-frame-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-frame-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(23,183,199,0.16);
  background: rgba(23,183,199,0.08);
  color: #16606c;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-frame-desc {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 14px;
}

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

.profile-frame-bonus-item {
  padding: 14px;
}

.profile-frame-bonus-label {
  color: var(--text-faint);
  font-size: 12px;
}

.profile-frame-bonus-value {
  margin-top: 8px;
  color: #1c2f3b;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.note-box {
  padding: 14px 16px;
  border: 1px dashed rgba(76,100,118,0.20);
  border-radius: 18px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.18);
}

@media (max-width: 1100px) {
  .profile-hero-grid,
  .profile-overview-grid,
  .profile-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 900px) {
  .profile-overview-grid,
  .profile-wallet-grid,
  .profile-stats-grid,
  .profile-frame-shell,
  .profile-frame-bonus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .mobile-only {
    display: inline-flex !important;
  }

  .profile-agent-card,
  .profile-command-card,
  .profile-status-card,
  .profile-wallet-card,
  .profile-modifiers-card,
  .profile-clan-card,
  .profile-frame-card,
  .profile-stat-card {
    padding: 16px;
  }

  .profile-summary-grid,
  .profile-modifier-grid {
    grid-template-columns: 1fr;
  }

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

  .profile-main-actions .btn {
    width: 100%;
  }
}


.payments-shell {
  display: grid;
  gap: 16px;
}

.payments-hero-card,
.payments-packages-card,
.payments-history-card,
.payments-referral-card,
.payments-status-card,
.payments-redirect-card,
.profile-referral-card {
  overflow: hidden;
}

.payments-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: stretch;
}

.payments-info-card {
  margin-top: 0;
}

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

.pay-package-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(21, 169, 181, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.64), rgba(245,249,252,0.42)),
    rgba(255,255,255,0.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.42);
}

.pay-package-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pay-package-title {
  font-size: 20px;
  font-weight: 700;
}

.pay-package-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-strong);
  white-space: nowrap;
}

.pay-package-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pay-mini-stat,
.profile-referral-item,
.pay-ref-rule {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 169, 181, 0.14);
  background: rgba(255,255,255,0.54);
}

.pay-mini-label,
.profile-referral-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.pay-mini-value,
.profile-referral-value {
  font-size: 20px;
  font-weight: 700;
}

.pay-package-desc {
  margin: 0;
}

.pay-form {
  display: grid;
  gap: 12px;
}

.pay-method-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pay-method-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.68);
  color: var(--text-soft);
  cursor: pointer;
}

.pay-method-option input {
  margin: 0;
}

.payments-bottom-grid {
  align-items: stretch;
}

.payments-history-table-wrap {
  overflow-x: auto;
}

.payments-history-table th,
.payments-history-table td {
  white-space: nowrap;
}

.payments-ref-rules,
.profile-referral-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.pay-ref-rule {
  display: grid;
  gap: 6px;
}

.pay-ref-rule b {
  font-size: 28px;
  color: var(--accent-strong);
}

.pay-ref-rule span,
.profile-referral-link {
  color: var(--text-soft);
  word-break: break-word;
}

.profile-wallet-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.payments-redirect-actions {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .payments-hero-grid,
  .payments-grid,
  .payments-ref-rules,
  .profile-referral-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .pay-package-head {
    flex-direction: column;
  }

  .pay-package-values {
    grid-template-columns: 1fr;
  }

  .pay-form .btn,
  .payments-redirect-actions .btn,
  .profile-wallet-actions .btn {
    width: 100%;
  }
}

.payments-custom-card {
  overflow: hidden;
}

.payments-custom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: start;
}

.payments-custom-form,
.payments-package-form {
  display: grid;
  gap: 12px;
}

.payments-custom-summary {
  display: grid;
  gap: 12px;
}

.payments-packages-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payments-package-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(21, 169, 181, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.64), rgba(245,249,252,0.42)),
    rgba(255,255,255,0.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.42);
}

.payments-package-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.payments-package-top h3 {
  margin: 0;
  font-size: 20px;
}

.payments-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-strong);
  white-space: nowrap;
}

.payments-package-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payments-package-value {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 169, 181, 0.14);
  background: rgba(255,255,255,0.54);
}

.payments-package-value span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.payments-package-value b {
  font-size: 20px;
}

.pay-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.68);
  color: var(--text-soft);
  cursor: pointer;
}

.pay-method input {
  margin: 0;
  width: auto;
}

@media (max-width: 1100px) {
  .payments-custom-grid,
  .payments-packages-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .payments-package-top {
    flex-direction: column;
  }

  .payments-package-values {
    grid-template-columns: 1fr;
  }

  .payments-custom-form .btn,
  .payments-package-form .btn {
    width: 100%;
  }
}


/* Referral program */
.referral-shell .profile-referral-link {
  word-break: break-all;
}

.referral-shell .payments-history-table td,
.referral-shell .payments-history-table th {
  vertical-align: top;
}
