.btn-steam[data-steam-sign-in][hidden],
[data-mobile-account][hidden],
.header .account-tools[hidden] { display: none; }

.header .account-tools {
  --account-control-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-shadow: none;
}
.header:has(.account-tools:not([hidden])) .header-inner { gap: 14px; }
.header:has(.account-tools:not([hidden])) .header-actions { gap: 7px; }
.header:has(.account-tools:not([hidden])) .desktop-nav { gap: clamp(10px, 1.3vw, 22px); }
.header-label { display: inline-grid; white-space: nowrap; }
.header-label::before, .header-label > span { grid-area: 1 / 1; }
.header-label::before { content: attr(data-label-width); visibility: hidden; }
@media (max-width: 650px) { .btn-steam .header-label { display: none; } }
.account-tools :is(.account-language, .account-header-balance, .account-profile-link, .account-top-up) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: var(--account-control-height);
  min-height: var(--account-control-height);
  border-radius: var(--radius-button);
  gap: 7px;
  font-size: .83rem;
  font-weight: 700;
}
.account-language,
.account-header-balance,
.account-profile-link {
  background: var(--color-action);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.account-language { padding-inline: 9px; }
.account-language .icon,
.account-header-balance .icon { width: 17px; height: 17px; color: var(--color-accent); }
.account-header-balance { color: var(--color-accent); padding-inline: 11px; font-variant-numeric: tabular-nums; }
.account-profile-link { padding: 4px 10px 4px 4px; }
.account-menu summary:hover,
.account-menu[open] summary { border-color: var(--color-accent); background: var(--color-action-hover); }
.account-menu {
  --account-menu-background: #101010;
  --account-menu-active: #1c1c1c;
  position: relative;
}
.account-menu summary { cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu-panel {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 5;
  min-inline-size: 210px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--account-menu-background);
  box-shadow: 0 16px 32px #0007;
}
.account-language-menu .account-menu-panel { inset-inline: 0 auto; min-inline-size: 128px; }
.account-theme-menu .account-menu-panel { inset-inline: 0 auto; min-inline-size: 150px; }
.theme-swatch {
  display: block;
  inline-size: 18px;
  block-size: 18px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(to right, var(--swatch-bg) 50%, var(--swatch-accent) 50%);
}
.account-menu-panel button[aria-pressed="true"] { color: var(--color-accent); background: var(--account-menu-active); }
.account-menu summary:focus-visible { outline-width: 1px; outline-offset: -2px; }
@media (prefers-reduced-motion: no-preference) {
  .account-menu[open] .account-menu-panel { animation: account-menu-in .15s ease-out; }
  @keyframes account-menu-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
.account-menu-player { display: grid; gap: 3px; padding: 10px 9px; border-bottom: 1px solid var(--color-divider); }
.account-menu-player strong { max-inline-size: 210px; overflow: hidden; text-overflow: ellipsis; }
.account-menu-player span { color: var(--color-muted); font-size: .78rem; }
.account-menu-panel :is(a, button) {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  border-radius: 6px;
  background: transparent;
  font-size: .9rem;
}
.account-menu-panel :is(a, button):hover { background: var(--account-menu-active); }
.account-menu-panel .icon { width: 16px; height: 16px; flex: none; color: var(--color-accent); }
.account-menu-panel .account-menu-logout { color: #ff9a96; }
.account-menu-panel .account-menu-logout .icon { color: inherit; }
.header .account-tools .account-top-up { padding: 0 12px; }
.account-avatar {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 32px;
  aspect-ratio: 1;
  overflow: hidden;
  flex: none;
  border-radius: 6px;
  background: var(--neutral-950);
  color: var(--color-accent);
}
.account-avatar .icon { width: 58%; height: 58%; }
.account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.profile-section { padding-block: var(--page-top-gap) clamp(24px, 4vw, 46px); min-height: 64vh; }
.profile-card {
  --profile-frame-border: 1px;
  overflow: hidden;
  border: var(--profile-frame-border) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: clamp(14px, 2.1vh, 19px) clamp(16px, 3.5vw, 36px);
  border-bottom: 1px solid var(--color-divider);
}
.profile-identity .account-avatar {
  inline-size: clamp(55px, 8vw, 70px);
  border: 2px solid var(--color-accent);
  border-radius: 12px;
}
.profile-identity-text { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.profile-name-row { display: flex; align-items: center; min-inline-size: 0; }
.profile-copy-feedback { flex: none; }
.profile-copy-feedback:not(:empty) { margin-inline-start: 10px; }
.profile-identity h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-steam-id { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--color-muted); }
.profile-steam-id span { font-variant-numeric: tabular-nums; }
.profile-content {
  display: grid;
  grid-template-columns: minmax(220px, .78fr) minmax(0, 1.6fr);
  gap: var(--profile-panel-gap);
}
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px clamp(16px, 3.5vw, 36px);
  border-bottom: 1px solid var(--color-divider);
}
.profile-tabs a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding-inline: 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  color: var(--color-muted);
  font-weight: 700;
}
.profile-tabs a:hover { color: var(--color-text); background: var(--color-action); }
.profile-tabs a[aria-current] { background: var(--color-action-hover); border-color: var(--color-border); color: var(--color-accent); }
.profile-body {
  --profile-panel-gap: clamp(14px, 2vw, 24px);
  padding: clamp(14px, 2.7vh, 24px) clamp(14px, 3.5vw, 36px);
  padding-block-end: calc(var(--profile-panel-gap) - var(--profile-frame-border));
}
.profile-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: clamp(14px, 1.8vh, 18px) clamp(16px, 3vw, 26px);
  background: var(--neutral-950);
}
.profile-panel-wide { grid-column: 1 / -1; }
:is(.profile-panel, .profile-history-section) h2 { margin: 0 0 13px; font-size: 1.3rem; }
.profile-note { color: var(--color-muted); font-size: .88rem; margin-block: 7px 10px; }
.profile-wallet {
  background: var(--panel-gold-gradient), var(--neutral-950);
}
.profile-content--wallet { grid-auto-rows: 1fr; }
.account-top-up.btn-primary,
.profile-transfer .btn-primary { color: #fff; }
.profile-balance {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.profile-balance .icon { width: .75em; height: .75em; flex: none; }
.profile-wallet .account-top-up { margin-top: 18px; }
.profile-copy {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 28px;
  block-size: 24px;
  color: var(--color-accent);
  background: transparent;
  border-radius: 6px;
}
.profile-copy .icon { width: 16px; height: 16px; }
.profile-copy:hover { background: var(--color-action-hover); }
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
  gap: 8px;
  margin: 0;
}
.profile-stat-grid div { padding: 12px; border-radius: 8px; background: var(--color-action); }
.profile-stat-grid dt { color: var(--color-muted); font-size: .8rem; }
.profile-stat-grid dd { margin: 5px 0 0; color: var(--color-accent); font-size: clamp(1.2rem, 2.5vw, 1.9rem); font-weight: 700; }
.profile-game-stats .profile-stat-grid dt { color: var(--color-text); font-weight: 700; }
.profile-economy {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
}
.profile-economy h2 { align-self: start; }
.profile-economy .profile-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-economy .profile-stat-grid > div {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: 5px;
  overflow-wrap: anywhere;
}
.profile-economy .profile-stat-grid dd { margin: 0; }
.profile-activity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(6px, 1vw, 12px); }
.profile-activity .profile-panel {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: 5px;
  overflow-wrap: anywhere;
}
.profile-activity h2 { margin: 0; font-size: clamp(.88rem, 2.2vw, 1.2rem); line-height: 1.15; }
.profile-activity-game { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; }
.profile-activity time, .profile-activity-server { font-size: clamp(.75rem, 1.8vw, .88rem); font-weight: 650; }
.profile-social, .profile-history { padding: 0; margin: 0; list-style: none; }
.profile-social li, .profile-history li {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--color-divider);
  padding-block: 10px;
  font-size: .88rem;
}
.profile-social-name { display: flex; align-items: center; flex: 1; gap: 8px; }
.profile-social li { padding-block: 8px; }
.profile-social-name .icon { width: 18px; height: 18px; flex: none; fill: var(--color-accent); stroke: none; }
.profile-social .btn, .profile-link-status { min-height: 34px; min-width: 6.25rem; padding: 4px 9px; }
.profile-social .btn:disabled { opacity: .64; }
.profile-link-status { display: inline-flex; align-items: center; justify-content: center; color: var(--color-muted); }
.profile-link-status.is-linked, .profile-history .is-credit, .transfer-feedback.is-success { color: #a9dc96; }
.profile-history li { justify-content: space-between; overflow-wrap: anywhere; }
.profile-history li > :last-child { text-align: end; flex-shrink: 0; }
.profile-history small { display: block; color: var(--color-muted); margin-top: 3px; }
.purchase-history-item { align-items: flex-start; }
.purchase-server-form { display: flex; align-items: end; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.server-field { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.server-field > legend { margin-block-end: 4px; padding: 0; font-size: .75rem; color: var(--color-text); }
.server-options { display: flex; flex-wrap: wrap; gap: 6px; }
.server-option { position: relative; min-inline-size: 0; max-inline-size: 100%; }
.server-option input {
  position: absolute;
  inset: 50% auto auto 50%;
  inline-size: 1px;
  block-size: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.server-option span {
  display: grid;
  place-items: center;
  min-block-size: 36px;
  padding: 5px 8px;
  border: 1px solid var(--color-decoration);
  border-radius: 8px;
  background: var(--neutral-950);
  color: var(--color-text);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.server-option input:checked + span { background: var(--color-action-hover); border-color: var(--color-accent); color: var(--color-accent); }
.server-option input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.server-option input:disabled + span { cursor: default; opacity: .7; }
@media (hover: hover) {
  .server-option:hover input:enabled + span { border-color: var(--color-accent); }
}
@media (forced-colors: active) {
  .server-option input:checked + span { border-color: Highlight; }
}
.purchase-server-form .btn { min-height: 40px; padding: 4px 8px; }
.profile-store-link { margin-top: 14px; }
.profile-transfer { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 11px; }
.profile-transfer label { display: grid; gap: 5px; font-size: .82rem; font-weight: 650; }
.profile-transfer input {
  min-height: 44px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  color: var(--color-text);
  background: var(--color-action);
  padding-inline: 10px;
  font: inherit;
  font-size: 1rem;
}
.profile-transfer .btn { grid-column: 1 / -1; justify-self: start; }
.profile-transfer .btn:disabled { opacity: .64; }
.profile-promo { grid-template-columns: minmax(0, 1fr); }
.profile-promo input { text-transform: uppercase; letter-spacing: .06em; }
.transfer-feedback { grid-column: 1 / -1; color: #ffada5; font-size: .85rem; }
.transfer-feedback:empty { display: none; }
.profile-guest p { margin-bottom: 22px; color: var(--color-muted); }
.wallet-dialog .profile-balance { margin-block: 6px 16px; }
.wallet-top-up-form { display: grid; gap: 12px; }
.wallet-top-up-form label { display: grid; gap: 5px; color: var(--color-text); }
.wallet-top-up-form input { inline-size: 100%; min-inline-size: 0; padding: 10px 12px; border-radius: var(--radius-button); }
.wallet-top-up-form input:focus-visible { outline: 1px solid var(--color-accent); outline-offset: -1px; }
.wallet-top-up-form p { margin: 0; color: var(--color-muted); }
.wallet-top-up-form .wallet-top-up-docs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.wallet-top-up-form p a { color: var(--color-text); text-decoration: underline; text-underline-offset: .18em; }
.wallet-top-up-form .btn-primary { color: #fff; }
.social-link-code {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-block: 15px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.social-link-code strong { font-size: 1.42rem; letter-spacing: .09em; color: var(--color-accent); }
.social-link-copy {
  position: relative;
  margin-inline-start: auto;
}
.social-link-copy-feedback {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  text-align: center;
}
.social-link-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}
.social-link-actions .btn {
  min-inline-size: 0;
  min-block-size: 54px;
  margin: 0;
  padding-inline: 10px;
}
.social-link-actions .btn:has(+ [hidden]) { grid-column: 1 / -1; }
.social-link-actions [hidden] { display: none; }

@media (max-width: 1140px) {
  .header .account-tools :is(.account-profile-label, .account-profile-link .help-menu-chevron, .account-top-up > span) { display: none; }
  .header .account-tools :is(.account-profile-link, .account-top-up) { padding-inline: 6px; min-inline-size: 42px; }
}
@media (max-width: 720px) {
  .profile-content { grid-template-columns: minmax(0, 1fr); }
  .profile-identity { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .profile-identity .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 540px) {
  .header .account-tools { gap: 5px; }
  .header .account-language { padding-inline: 7px; gap: 5px; }
  .header .account-language .icon { display: none; }
  .header .account-header-balance { padding-inline: 5px; gap: 3px; }
  .header:has(.account-tools:not([hidden])) .header-inner,
  .header:has(.account-tools:not([hidden])) .header-actions { gap: 3px; }
  .profile-activity .profile-panel { padding: 9px 6px; }
  .profile-tabs { gap: 4px; }
  .profile-tabs a { padding-inline: 7px; font-size: .82rem; }
  .profile-transfer { grid-template-columns: minmax(0, 1fr); }
}
