.profile-page-wrapper {
  position: relative;
  background-color: var(--bg-body);
}

.profile-page-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-body);
  background-image:
    linear-gradient(180deg, var(--ink-950-a70), var(--ink-950-a90)),
    var(--bunker-background-current);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.profile-page-wrapper > * {
  position: relative;
  z-index: 1;
}

.profile-page-wrapper > .main-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.profile-page {
  flex: 1;
  display: grid;
  align-items: start;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) 24px clamp(40px, 6vw, 72px);
}

.profile-card {
  position: relative;
  width: min(100%, 820px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--white-a10);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 8% 0%, var(--amber-500-a12), var(--transparent) 42%),
    var(--surface-panel-profile);
  box-shadow: 0 28px 80px var(--black-a45), 0 0 0 1px var(--white-a03);
}

.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--white-a08);
}

.profile-avatar-shell {
  width: clamp(80px, 11vw, 104px);
  height: clamp(80px, 11vw, 104px);
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid var(--amber-500-a55);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--amber-500-a30), var(--amber-500-a03));
  box-shadow: 0 0 28px var(--amber-500-a12);
}

.profile-avatar,
.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.profile-avatar[hidden],
.profile-avatar-fallback[hidden] {
  display: none;
}

.profile-avatar {
  object-fit: cover;
  background: var(--surface-avatar);
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--surface-avatar-fallback);
  color: var(--color-primary-light);
}

.profile-avatar-fallback svg {
  width: 44%;
  height: 44%;
}

.profile-hero-copy {
  min-width: 0;
  flex: 1;
}

.profile-eyebrow {
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.profile-hero h1 {
  margin: 6px 0 1px;
  color: var(--text-white);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  line-height: 1.2;
}

.profile-account-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 8px 0 12px;
  color: var(--text-muted);
  font-size: .76rem;
}
.profile-account-id[hidden] { display: none; }
.profile-account-id strong { font-variant-numeric: tabular-nums; letter-spacing: .08em; user-select: all; color: var(--text-primary); }
.profile-account-id button { border: 1px solid var(--border-subtle); border-radius: 6px; padding: 4px 8px; background: var(--transparent); color: var(--text-primary); font: inherit; cursor: pointer; }
.profile-account-id button:hover { border-color: var(--color-primary); }
@media (max-width: 700px) { .profile-account-id { justify-content: center; } }

.profile-player-name {
  max-width: 100%;
  margin: 0;
  color: var(--color-primary-light);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.profile-intro {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.profile-avatar-tools[hidden] {
  display: none;
}

.profile-avatar-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 12px;
  margin-top: 14px;
}

.profile-avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.profile-avatar-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--amber-500-a30);
  border-radius: 9px;
  background: var(--amber-500-a08);
  color: var(--color-primary-light);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.profile-avatar-button:hover:not(:disabled) {
  border-color: var(--amber-500-a65);
  background: var(--amber-500-a15);
}

.profile-avatar-button:focus-visible,
.profile-avatar-input:focus-visible + .profile-avatar-button {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
}

.profile-avatar-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.profile-avatar-button svg {
  width: 16px;
  height: 16px;
}

.profile-avatar-hint {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.profile-avatar-status {
  color: var(--green-300);
  font-size: 0.75rem;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 9px 12px;
  border: 1px solid var(--green-500-a20);
  border-radius: 999px;
  background: var(--green-500-a08);
  color: var(--green-300);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}

.profile-status > span:empty {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-400);
  box-shadow: 0 0 10px var(--green-400-a70);
}

.profile-content {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3.5vw, 28px) clamp(20px, 4vw, 40px) 0;
}

.profile-section,
.profile-providers {
  padding: clamp(16px, 2.5vw, 22px);
  border: 1px solid var(--white-a08);
  border-radius: 14px;
  background: var(--white-a03);
}

.profile-security[hidden] {
  display: none;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 16px clamp(20px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--white-a08);
}

.profile-tab {
  flex: 1;
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid var(--transparent);
  border-radius: 10px 10px 0 0;
  background: var(--transparent);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 700;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.profile-tab.is-active,
.profile-tab:hover {
  background: var(--amber-500-a12);
  color: var(--text-white);
}

.profile-tab.is-active {
  border-bottom-color: var(--color-primary);
}

.profile-content[hidden],
.profile-sessions[hidden] {
  display: none !important;
}

.profile-sessions {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3.5vw, 28px) clamp(20px, 4vw, 40px) 0;
}

.profile-sessions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.profile-session-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: min(380px, 48vh);
  margin: 0;
  padding: 2px 4px 2px 0;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
  scrollbar-color: var(--amber-500-a40) var(--white-a05);
  scrollbar-width: thin;
}

.profile-session-list::-webkit-scrollbar {
  width: 6px;
}

.profile-session-list::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--amber-500-a40);
}

.profile-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--white-a03);
}

.profile-session-item.is-current {
  border-color: var(--green-500-a35);
}

.profile-session-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-session-copy strong {
  color: var(--text-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-session-copy span,
.profile-session-copy small {
  color: var(--text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.profile-session-actions {
  flex-shrink: 0;
}

.profile-session-current {
  color: var(--green-300);
  font-size: 12px;
  font-weight: 700;
}

.profile-session-revoke {
  padding: 7px 10px;
  border: 1px solid var(--red-500-a35);
  border-radius: var(--radius-sm);
  background: var(--red-500-a08);
  color: var(--red-300);
  cursor: pointer;
}

.profile-session-status {
  color: var(--red-300);
  font-size: 13px;
}

.profile-2fa[hidden] {
  display: none !important;
}

.profile-section-icon--security {
  border-color: var(--red-400-a20);
  background: var(--red-400-a08);
  color: var(--red-300);
}

.profile-password-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-password-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.profile-password-field:first-child {
  grid-column: 1 / -1;
}

.profile-password-field input {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--white-a10);
  border-radius: 9px;
  background: var(--ink-900-a40);
  color: var(--text-primary);
  font-size: 0.88rem;
}

.profile-password-field input:focus {
  border-color: var(--amber-500-a65);
  outline: 2px solid var(--amber-500-a15);
}

.profile-password-submit {
  justify-self: start;
}

.profile-password-submit:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
}

.profile-password-status {
  min-height: 1.2em;
  margin-top: 10px;
  color: var(--green-300);
  font-size: 0.8rem;
}

.profile-password-status:empty {
  display: none;
}

.profile-2fa-copy {
  margin: 0 0 15px;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.profile-2fa-secret {
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px dashed var(--amber-500-a35);
  border-radius: 10px;
  background: var(--amber-500-a08);
  color: var(--amber-300);
  font: 700 0.82rem/1.5 monospace;
  overflow-wrap: anywhere;
}

.profile-2fa-qr {
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  margin: 16px 0 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--white);
}

.profile-2fa-qr[hidden],
.profile-2fa-qr-hint[hidden],
.profile-2fa-secret[hidden],
.profile-2fa-code-field[hidden],
#profileTwoFactorEnable[hidden],
#profileTwoFactorSetup[hidden],
#profileTwoFactorEnabled[hidden] {
  display: none !important;
}

.profile-2fa-qr img,
.profile-2fa-qr canvas {
  display: block;
  max-width: 190px;
  max-height: 190px;
}

.profile-2fa-qr-hint {
  margin: 0 0 13px;
  color: var(--text-dim);
  font-size: 0.76rem;
}

.profile-2fa-code-field {
  max-width: 260px;
  margin-bottom: 12px;
}

.profile-2fa-enabled {
  margin: 0 0 15px;
  color: var(--green-300);
  font-size: 0.84rem;
}

.profile-2fa-disable {
  margin-top: 12px;
}

.profile-2fa-codes {
  color: var(--amber-300);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.profile-section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.profile-section-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--amber-500-a20);
  border-radius: 12px;
  background: var(--amber-500-a08);
  color: var(--color-primary-light);
}

.profile-section-icon--links {
  border-color: var(--sky-400-a20);
  background: var(--sky-400-a08);
  color: var(--sky-300);
}

.profile-section-icon svg {
  width: 20px;
  height: 20px;
}

.profile-section-heading h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.profile-section-heading p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 0.76rem;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-detail-card {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--white-a05);
  border-radius: 11px;
  background: var(--ink-900-a30);
}

.profile-details dt {
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.profile-details dd {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  max-height: 140px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.profile-provider-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profile-provider-info {
  margin: 8px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--blue-400-a20);
  border-radius: 10px;
  background: var(--blue-400-a08);
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.55;
}

.profile-provider-link {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--border-auth);
  border-radius: var(--radius-md);
  background: var(--surface-auth-social);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.profile-provider-link:hover {
  transform: translateY(-1px);
  border-color: var(--border-auth-hover);
  background: var(--surface-auth-social-hover);
}

.profile-provider-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.profile-provider-link > svg,
.profile-telegram-label > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.profile-provider-link--discord > svg {
  color: var(--color-social-discord);
}

.profile-provider-link--tiktok > svg {
  filter: drop-shadow(1px 0 var(--color-social-tiktok-red)) drop-shadow(-1px 0 var(--color-social-tiktok-cyan));
}

.profile-provider-link--telegram {
  cursor: default;
}

.profile-telegram-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.profile-telegram-widget {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  opacity: 0.01;
}

.profile-telegram-widget iframe {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}

@media (max-width: 520px) {
  .profile-provider-actions {
    grid-template-columns: 1fr;
  }
}

.profile-provider-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--amber-500-a20);
  border-radius: 10px;
  background: var(--amber-500-a08);
  color: var(--amber-300);
  font-size: 0.82rem;
  font-weight: 650;
}

.profile-provider-list li > span:first-child {
  flex: 1;
}

.profile-provider-unlink {
  border: 0;
  background: var(--transparent);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-provider-unlink:hover:not(:disabled) {
  color: var(--color-danger-text-light);
}

.profile-provider-unlink:disabled {
  cursor: wait;
  opacity: 0.55;
}

.profile-provider-list li::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.profile-provider-list li[data-provider="google"] {
  border-color: var(--blue-400-a20);
  background: var(--blue-400-a08);
  color: var(--blue-300);
}

.profile-provider-list li[data-provider="discord"] {
  border-color: var(--indigo-400-a20);
  background: var(--indigo-400-a08);
  color: var(--indigo-300);
}

.profile-provider-list li[data-provider="tiktok"] {
  border-color: var(--cyan-400-a20);
  background: var(--cyan-400-a05);
  color: var(--cyan-200);
}

.profile-provider-list li[data-provider="telegram"] {
  border-color: var(--sky-400-a20);
  background: var(--sky-400-a08);
  color: var(--sky-300);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  padding: 20px clamp(20px, 4vw, 40px) clamp(20px, 3.5vw, 32px);
}

.profile-actions .btn {
  min-height: 44px;
}

.profile-actions .btn svg {
  width: 17px;
  height: 17px;
}

.profile-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px clamp(20px, 4vw, 40px) 0;
  padding: 12px 14px;
  border: 1px solid var(--red-500-a40);
  border-radius: 10px;
  background: var(--red-500-a12);
  color: var(--red-200);
  font-size: 0.88rem;
  line-height: 1.45;
}

.profile-feedback::before {
  content: "!";
  width: 21px;
  height: 21px;
  display: inline-grid;
  flex: 0 0 21px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.profile-feedback.is-success {
  border-color: var(--green-500-a40);
  background: var(--green-500-a12);
  color: var(--green-300);
}

.profile-feedback.is-success::before {
  content: "✓";
}

.profile-feedback[hidden] {
  display: none;
}

.profile-mobile-logout {
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .profile-page {
    padding: 24px 16px 36px;
  }

  .profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
  }

  .profile-status {
    grid-column: 2;
    justify-self: start;
    margin-left: 0;
  }

  .profile-session-list {
    max-height: min(320px, 42vh);
  }
}

@media (max-width: 560px) {
  .profile-tabs {
    gap: 4px;
    padding: 12px 14px 0;
  }

  .profile-tab {
    font-size: 0.82rem;
    padding: 9px 8px;
  }

  .profile-sessions {
    gap: 12px;
    padding: 16px 14px 0;
  }

  .profile-sessions-toolbar,
  .profile-session-item {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-session-actions {
    width: 100%;
  }

  .profile-session-revoke {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .profile-card {
    width: 100%;
    border-radius: 16px;
  }

  .profile-hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
    padding: 22px 16px 18px;
  }

  .profile-avatar-shell {
    width: 84px;
    height: 84px;
  }

  .profile-hero-copy {
    width: 100%;
    text-align: center;
  }

  .profile-player-name {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .profile-avatar-tools {
    justify-content: center;
  }

  .profile-avatar-hint,
  .profile-avatar-status {
    flex-basis: 100%;
    text-align: center;
  }

  .profile-status {
    grid-column: 1;
    justify-self: center;
    margin: 0;
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .profile-content {
    gap: 10px;
    padding: 14px 12px 0;
  }

  .profile-section,
  .profile-providers {
    padding: 14px 12px;
    border-radius: 12px;
  }

  .profile-details {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .profile-details dd {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .profile-password-form {
    grid-template-columns: 1fr;
  }

  .profile-password-field:first-child {
    grid-column: auto;
  }

  .profile-password-submit {
    width: 100%;
  }

  .profile-actions {
    flex-direction: column;
    gap: 9px;
    padding: 16px 12px;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .profile-feedback {
    margin-right: 12px;
    margin-left: 12px;
  }
}

.profile-page-wrapper::before {
  background-image:
    linear-gradient(180deg, var(--ink-950-a80), var(--ink-950-a95)),
    var(--bunker-background-current);
}

.profile-card {
  background:
    radial-gradient(ellipse at 8% 0%, var(--amber-500-a10), var(--transparent) 42%),
    var(--surface-panel-profile);
  box-shadow: var(--shadow-gloss), 0 28px 80px var(--black-a70);
}

.profile-section,
.profile-providers,
.profile-session-item,
.profile-detail-card,
.profile-password-field input {
  background-color: var(--surface-section);
}

.profile-avatar {
  background: var(--surface-avatar);
}

.profile-avatar-fallback {
  background: var(--surface-avatar-fallback);
}

.profile-card {
  border-color: var(--white-a12);
  background-color: var(--ink-850-a80);
}
.payment-transaction { display:block; margin-top:6px; font-family:ui-monospace,monospace; overflow-wrap:anywhere; user-select:text; }

.bunker-boot {
  --bb: clamp(72px, min(18vw, 18svh), 140px);

  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 100svh;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  overflow: hidden;
  background: var(--ink-950);
  background: var(--bg-body, var(--ink-950));
  opacity: 1;
  visibility: visible;
  touch-action: none;
  -webkit-tap-highlight-color: var(--transparent);
  transition: opacity .32s ease, visibility 0s linear .32s;
  animation: bunker-boot-failsafe .35s ease 2.5s forwards;
}

.bunker-boot::before,
.bunker-boot::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  animation: bunker-boot-in .5s ease .2s forwards;
}

.bunker-boot::before {
  background:
    radial-gradient(ellipse 58% 46% at 50% 46%, var(--tone-f59e0b-a17), var(--transparent) 72%),
    radial-gradient(ellipse 80% 40% at 50% 118%, var(--tone-b45309-a16), var(--transparent) 70%);
}

.bunker-boot::after {
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='27.71' height='48' viewBox='0 0 27.71 48'><g fill='none' stroke='%23f59e0b' stroke-opacity='.10' stroke-width='1'><polygon points='13.86,-8.00 13.86,8.00 0.00,16.00 -13.86,8.00 -13.86,-8.00 -0.00,-16.00'/><polygon points='41.57,-8.00 41.57,8.00 27.71,16.00 13.86,8.00 13.86,-8.00 27.71,-16.00'/><polygon points='13.86,40.00 13.86,56.00 0.00,64.00 -13.86,56.00 -13.86,40.00 -0.00,32.00'/><polygon points='41.57,40.00 41.57,56.00 27.71,64.00 13.86,56.00 13.86,40.00 27.71,32.00'/><polygon points='27.71,16.00 27.71,32.00 13.86,40.00 0.00,32.00 0.00,16.00 13.86,8.00'/></g></svg>") center / 27.71px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 46%, var(--black) 0, var(--transparent) 78%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 46%, var(--black) 0, var(--transparent) 78%);
}

.bunker-boot__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  opacity: 0;
  animation: bunker-boot-in .35s ease .2s forwards;
}

.bunker-boot__emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--bb);
  height: var(--bb);
}

.bunker-boot__emblem::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  border: 1px solid var(--amber-500-a20);
}

.bunker-boot__ring {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--transparent) 0 60%, var(--amber-400) 100%);
  -webkit-mask: radial-gradient(farthest-side, var(--transparent) calc(100% - 2.5px), var(--black) calc(100% - 2px));
  mask: radial-gradient(farthest-side, var(--transparent) calc(100% - 2.5px), var(--black) calc(100% - 2px));
  will-change: transform;
  animation: bunker-boot-spin 1.1s linear infinite;
}

.bunker-boot__emblem img {
  display: block;
  width: calc(var(--bb) * .54);
  height: calc(var(--bb) * .54);
  max-width: none;
  filter: drop-shadow(0 0 14px var(--amber-500-a55));
  animation: bunker-boot-pulse 2.2s ease-in-out infinite;
}

.bunker-boot__title {
  margin-top: calc(var(--bb) * .24);
  padding-left: .5em;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: max(16px, calc(var(--bb) * .19));
  line-height: 1;
  letter-spacing: .5em;
  text-align: center;
  white-space: nowrap;
  color: var(--amber-100);
}

.bunker-boot__subtitle {
  margin-top: calc(var(--bb) * .09);
  padding-left: .42em;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: max(10px, calc(var(--bb) * .1));
  line-height: 1;
  letter-spacing: .42em;
  text-align: center;
  white-space: nowrap;
  color: var(--amber-500-a85);
}

.bunker-boot__bar {
  position: relative;
  width: calc(var(--bb) * 1.2);
  height: 2px;
  margin-top: calc(var(--bb) * .26);
  overflow: hidden;
  border-radius: 2px;
  background: var(--white-a10);
}

.bunker-boot__bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  background: linear-gradient(90deg, var(--transparent), var(--amber-400), var(--transparent));
  animation: bunker-boot-bar 1.25s ease-in-out infinite;
}

html.is-ready .bunker-boot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

html.is-leaving .bunker-boot {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: none;
  transition: opacity .2s ease, visibility 0s linear 0s;
}

html.boot-continue .bunker-boot::before,
html.boot-continue .bunker-boot::after,
html.boot-continue .bunker-boot__inner {
  animation-duration: 0s;
  animation-delay: 0s;
  animation-fill-mode: both;
}

html.boot-continue .bunker-boot::before,
html.boot-continue .bunker-boot::after,
html.boot-continue .bunker-boot__inner {
  opacity: 1;
}


@keyframes bunker-boot-in { to { opacity: 1; } }
@keyframes bunker-boot-spin { to { transform: rotate(360deg); } }
@keyframes bunker-boot-pulse {
  0%, 100% { transform: scale(1); opacity: .92; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes bunker-boot-bar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}
@keyframes bunker-boot-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}


@media (max-width: 340px) {
  .bunker-boot__title { letter-spacing: .38em; padding-left: .38em; }
  .bunker-boot__subtitle { letter-spacing: .3em; padding-left: .3em; }
}

@media (max-height: 420px) {
  .bunker-boot { --bb: clamp(64px, 24svh, 110px); }
  .bunker-boot__title { margin-top: calc(var(--bb) * .16); }
  .bunker-boot__bar { margin-top: calc(var(--bb) * .16); }
}

@media (max-height: 280px) {
  .bunker-boot__title,
  .bunker-boot__subtitle { display: none; }
  .bunker-boot__bar { margin-top: calc(var(--bb) * .2); }
}

@media (min-width: 2200px), (min-height: 1300px) {
  .bunker-boot__bar { height: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .bunker-boot { transition: none; }
  .bunker-boot__ring,
  .bunker-boot__emblem img,
  .bunker-boot__bar span { animation: none; }
  .bunker-boot__bar span { width: 100%; opacity: .6; }
}

@media (forced-colors: active) {
  .bunker-boot { background: Canvas; }
  .bunker-boot::before,
  .bunker-boot::after { display: none; }
  .bunker-boot__title,
  .bunker-boot__subtitle { color: CanvasText; }
  .bunker-boot__ring { background: Highlight; }
  .bunker-boot__bar { background: GrayText; }
  .bunker-boot__bar span { background: Highlight; }
}

@media print {
  .bunker-boot { display: none !important; }
}

html {
  overflow-x: clip;
  overscroll-behavior-y: auto;
}

body,
body.game-page-body {
  overflow-x: clip;
}

html.nav-open {
  overflow: hidden;
}

body.nav-open,
body.game-page-body.nav-open {
  overflow: clip;
}

@media (max-width: 860px) {
  .mobile-nav-drawer {
    top: calc(var(--header-height) + var(--safe-area-top, 0px));
    max-height: calc(100svh - var(--header-height) - var(--safe-area-top, 0px));
    max-height: calc(100dvh - var(--header-height) - var(--safe-area-top, 0px));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-bottom: calc(24px + var(--safe-area-bottom, 0px));
  }
}

/* Decorative layers scroll with their page instead of staying on the viewport. */
body::before,
.profile-page-wrapper::before,
.page-scenic-bg,
.rooms-background,
.lobby-background,
.join-background,
.create-room-background,
.auth-background,
.auth-background-shade,
.not-found-background,
.banned-background,
.banned-background-layer {
  position: absolute;
}

.banned-body {
  overflow-y: auto;
}

.page-wrapper {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
}

.page-wrapper > .main-header,
.page-wrapper > .main-footer {
  flex-shrink: 0;
}

.page-wrapper > main {
  flex: 1 0 auto;
  min-width: 0;
}

.main-footer {
  width: 100%;
  margin-top: auto;
  padding-bottom: calc(24px + var(--safe-area-bottom, 0px));
}

.footer-content > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.main-footer .rules-footer-link {
  display: inline-block;
}

.rooms-list-viewport {
  overscroll-behavior-y: auto;
}

.lobby-chat-toggle {
  bottom: calc(22px + var(--floating-footer-offset, 0px) + var(--safe-area-bottom, 0px));
}

.game-return-link {
  box-sizing: border-box;
  position: fixed;
  left: calc(22px + var(--safe-area-left, 0px));
  bottom: calc(22px + var(--floating-footer-offset, 0px) + var(--safe-area-bottom, 0px));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: calc(100% - 44px - var(--safe-area-left, 0px) - var(--safe-area-right, 0px));
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--color-primary-border, var(--tone-a76c21));
  border-radius: var(--radius-md, 10px);
  background: var(--bg-body, var(--ink-800));
  color: var(--color-primary-light, var(--amber-400));
  box-shadow: 0 8px 24px var(--black-a45, var(--tone-000000-a45-098));
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.game-return-link > span:first-child { font-size: 22px; line-height: 1; }
.game-return-link:hover { border-color: var(--color-primary, var(--amber-500)); background: var(--surface-control, var(--tone-1c1c1c)); }
.game-return-link:focus-visible { outline: 2px solid var(--color-primary, var(--amber-500)); outline-offset: 3px; }

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    line-height: 1.8;
  }
}
