html { min-height: 100%; }
body { display: flex; min-height: 100vh; flex-direction: column; }
body > main { flex: 1 0 auto; }
.site-footer { width: 100%; max-width: 1180px; margin-top: auto; margin-right: auto; margin-left: auto; }
.site-header nav { align-items: center; }
.site-header a[aria-current="page"] { color: #fff; }
.site-header .account-link { padding: 7px 10px; border: 1px solid #ffffff1c; border-radius: 999px; }
.site-header .account-link:hover { border-color: #f4c95d66; }
.site-menu-toggle { display: none; }
.page-shell { flex: 1 0 auto; }
.dialog-close { position: absolute; top: 12px; right: 14px; z-index: 4; display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid #ffffff1d; border-radius: 50%; background: #090a0edb; color: #fff; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.dialog-close:hover { border-color: #f4c95d80; }
.celebration-close { position: absolute; top: 18px; right: 18px; z-index: 8; }
.app-message-dialog { width: min(500px, calc(100% - 28px)); padding: 28px; border: 1px solid #ffffff25; border-radius: 24px; background: linear-gradient(145deg, #151821, #0b0c11); color: #fff; box-shadow: 0 30px 100px #000d; }
.app-message-dialog::backdrop { background: #020307d9; backdrop-filter: blur(5px); }
.app-message-dialog[open] { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 17px; }
.app-message-icon { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #f4c95d55; border-radius: 17px; background: #f4c95d12; color: #f4c95d; font-size: 1.55rem; font-weight: 950; }
.app-message-dialog[data-tone="error"] .app-message-icon { border-color: #ff647066; background: #ff30451a; color: #ff8791; }
.app-message-dialog[data-tone="success"] .app-message-icon { border-color: #5ee5a066; background: #1dc77c18; color: #6ce9aa; }
.app-message-copy { min-width: 0; padding-right: 24px; }
.app-message-copy h2 { margin: 4px 0 8px; font-size: 1.35rem; }
.app-message-text { margin: 0; color: #b8bdc8; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-message-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; margin-top: 7px; }
.app-message-actions .primary { width: auto; margin: 0; }
.player-radar { display: grid; gap: 12px; margin-top: 18px; }
.player-radar svg { display: block; width: min(100%, 520px); height: auto; margin-inline: auto; overflow: visible; }
.radar-grid { fill: none; stroke: #ffffff22; stroke-width: 1; }
.radar-axis { stroke: #ffffff19; stroke-width: 1; }
.radar-label { fill: #bec3ce; font-size: 11px; font-weight: 700; text-anchor: middle; }
.radar-shape-a { fill: #f4c95d38; stroke: #f4c95d; stroke-width: 2; }
.radar-shape-b { fill: #5ab4ef30; stroke: #5ab4ef; stroke-width: 2; }
.radar-point { stroke: #08090c; stroke-width: 2; }
.radar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; color: #c9cdd6; font-size: .78rem; }
.radar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.radar-legend i { width: 9px; height: 9px; border-radius: 50%; background: #f4c95d; }
.radar-legend span:nth-child(2) i { background: #5ab4ef; }
.profile-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 18px; }
.profile-compare input { min-width: 0; }
.profile-close { float: right; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; }
.account-key { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.account-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 9px; margin-top: 16px; }
.account-actions > * { min-width: 0; width: 100%; margin: 0; box-sizing: border-box; }
.account-player-list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.account-player { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: center; gap: 14px; min-width: 0; padding: 15px; overflow: hidden; border: 1px solid #ffffff14; border-radius: 15px; background: #ffffff07; }
.account-player > div:first-child { min-width: 0; }
.account-player strong, .account-player small { display: block; overflow-wrap: anywhere; }
.account-player small { margin-top: 4px; color: #969ca8; }
.account-player-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: min(100%, 15rem); min-width: 0; }
.account-player-actions > * { display: inline-flex; align-items: center; justify-content: center; min-width: 0; width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; text-align: center; overflow-wrap: anywhere; }
.account-empty { padding: 24px; color: #969ca8; text-align: center; }

@media (max-width: 820px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-player { grid-template-columns: 1fr; align-items: stretch; }
  .account-player-actions { width: 100%; }
}

@media (max-width: 700px) {
  .site-header { position: sticky; flex-wrap: nowrap; }
  .site-header .brand { font-size: .82rem; }
  .site-menu-toggle { display: grid; width: 42px; height: 42px; padding: 10px; place-items: center; border: 1px solid #ffffff24; border-radius: 12px; background: #ffffff0a; cursor: pointer; }
  .site-menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 999px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
  .site-menu-toggle span + span { margin-top: 4px; }
  .site-header[data-menu-open="true"] .site-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-header[data-menu-open="true"] .site-menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header[data-menu-open="true"] .site-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-header .site-navigation { position: absolute; top: calc(100% + 1px); right: 12px; left: 12px; display: none !important; grid-template-columns: 1fr; align-items: stretch !important; gap: 5px !important; padding: 12px; border: 1px solid #ffffff1c; border-radius: 0 0 18px 18px; background: #0c0e14f7; box-shadow: 0 24px 60px #000b; backdrop-filter: blur(18px); }
  .site-header[data-menu-open="true"] .site-navigation { display: grid !important; }
  .site-header .site-navigation a { display: block !important; width: 100%; padding: 12px 14px; border-radius: 10px; box-sizing: border-box; font-size: .9rem; }
  .site-header .site-navigation a:hover, .site-header .site-navigation a[aria-current="page"] { background: #ffffff0c; }
  .site-header .site-navigation .account-link { border-radius: 10px; }
  .profile-compare { grid-template-columns: 1fr; }
  .profile-compare button { width: 100%; }
  .app-message-dialog[open] { grid-template-columns: 1fr; }
  .app-message-icon { width: 46px; height: 46px; }
  .app-message-actions { grid-column: 1; }
  .app-message-actions button { flex: 1; }
}

@media (max-width: 390px) {
  .account-actions, .account-player-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu-toggle span { transition: none; }
}
