:root {
    --bg: #08050a;
    --panel: rgba(19, 8, 21, 0.58);
    --line: rgba(255, 255, 255, 0.075);
    --text: #f8fafc;
    --muted: #8b94a6;
    --soft: #d1d5db;
    --orange: #f97316;
    --orange-soft: #fb923c;
    --cyan: #22d3ee;
    --magma-gradient: linear-gradient(90deg, #f97316 0%, #ef4444 48%, #a855f7 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.32);
    --hover-line: rgba(249, 115, 22, 0.36);
    --avatar-line: rgba(255, 255, 255, 0.14);
    --avatar-glow: rgba(249, 115, 22, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: "Noto Sans KR", system-ui, sans-serif; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); overflow-x: hidden; }
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 2, 6, 0.40), rgba(19, 8, 21, 0.46) 46%, rgba(5, 2, 6, 0.86)),
        url("/static/images/nearoutpost_bg-1920.jpg") center/cover no-repeat;
    filter: saturate(0.96) brightness(0.9);
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}
@supports (background-image: image-set(url("/static/images/nearoutpost_bg-1920.webp") type("image/webp"))) {
    body::before {
        background:
            linear-gradient(180deg, rgba(5, 2, 6, 0.40), rgba(19, 8, 21, 0.46) 46%, rgba(5, 2, 6, 0.86)),
            image-set(
                url("/static/images/nearoutpost_bg-1920.webp") type("image/webp"),
                url("/static/images/nearoutpost_bg-1920.jpg") type("image/jpeg")
            ) center/cover no-repeat;
    }
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.038), rgba(0, 255, 0, 0.012), rgba(0, 0, 255, 0.038));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.shell { position: relative; z-index: 1; width: min(1180px, calc(100vw - 32px)); margin: 0 auto; padding: 20px 0 56px; }
.topbar {
    position: sticky;
    top: 76px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin: -20px calc(50% - 50vw) 42px;
    padding: 14px max(16px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(249, 115, 22, 0.09), rgba(168, 85, 247, 0.07)),
        rgba(12, 5, 14, 0.84);
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: var(--soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
}
.nav a::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 4px;
    height: 2px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s;
}
.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); }
.auth-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.account-menu {
    position: relative;
    min-width: 0;
}
.account-menu summary {
    list-style: none;
}
.account-menu summary::-webkit-details-marker {
    display: none;
}
.auth-form { margin: 0; }
.auth-pill {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 190px;
    padding: 5px 11px 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 2, 6, 0.56);
    color: var(--soft);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.45;
    border-radius: 4px;
    cursor: pointer;
    overflow: visible;
}
.auth-pill:hover {
    border-color: rgba(249, 115, 22, 0.42);
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
}
.auth-actions > .auth-pill:not(.verified) {
    border: 0;
    background: linear-gradient(90deg, #ea580c, var(--orange));
    color: #050206;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.28);
}
.auth-actions > .auth-pill:not(.verified):hover {
    color: #050206;
    background: linear-gradient(90deg, #fb923c, #f97316);
    transform: translateY(-1px);
}
.auth-pill.verified {
    color: #fff;
    border-color: rgba(34, 211, 238, 0.2);
}
.auth-pill .auth-name {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
    padding: 1px 0 2px;
}
.auth-caret {
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1;
}
.account-menu[open] .auth-pill {
    border-color: rgba(249, 115, 22, 0.42);
    background: rgba(255, 255, 255, 0.06);
}
.account-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    display: grid;
    gap: 4px;
    width: min(220px, calc(100vw - 24px));
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(13, 6, 15, 0.96);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(20px);
}
.account-menu-panel::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 10px;
    height: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(13, 6, 15, 0.96);
    transform: rotate(45deg);
}
.account-menu-item {
    position: relative;
    min-height: 38px;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--soft);
    border-radius: 6px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}
.account-menu-item:hover,
.account-menu-item:focus-visible {
    background: rgba(249, 115, 22, 0.1);
    color: #fff;
    outline: none;
}
.account-menu-item.danger {
    color: #fecdd3;
}
.account-menu-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 7px;
}
.account-menu-tab {
    min-height: 30px;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 5px;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}
.account-menu-tab.is-active {
    background: rgba(249, 115, 22, 0.13);
    color: #fff;
}
.account-tab-panel {
    display: grid;
    gap: 4px;
}
.account-tab-panel[hidden] {
    display: none;
}
.account-settings-panel {
    gap: 7px;
}
.account-language-form {
    display: grid;
    gap: 7px;
    padding: 4px 3px 3px;
}
.account-language-form label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.account-language-form select {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(249, 115, 22, 0.28);
    background: rgba(5, 2, 6, 0.82);
    color: var(--text);
    padding: 0 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
}
.verified-mark {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.14);
    color: #67e8f9;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
}
.verified-mark.inline {
    margin-left: 8px;
    vertical-align: middle;
}
.staff-mark,
.supporter-mark {
    --staff-color: #22d3ee;
    --staff-bg: rgba(34, 211, 238, 0.09);
    --staff-line: rgba(34, 211, 238, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--staff-line);
    background: var(--staff-bg);
    color: var(--staff-color);
    border-radius: 999px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}
.staff-mark::before,
.supporter-mark::before {
    content: "";
    width: 8px;
    height: 10px;
    flex: 0 0 8px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 22%, 88% 76%, 50% 100%, 12% 76%, 0 22%);
}
.supporter-mark {
    --staff-color: #22c55e;
    --staff-bg: rgba(34, 197, 94, 0.1);
    --staff-line: rgba(34, 197, 94, 0.34);
}
.staff-mark.is-owner {
    --staff-color: #fbbf24;
    --staff-bg: rgba(249, 115, 22, 0.1);
    --staff-line: rgba(251, 191, 36, 0.34);
}
.staff-mark.compact,
.supporter-mark.compact {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 0.62rem;
}
.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 640px);
    justify-content: center;
}
.auth-panel { display: grid; gap: 18px; }
.auth-login-form {
    display: grid;
    gap: 9px;
}
.auth-login-form label {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}
.auth-input-row input {
    height: 44px;
    min-width: 0;
    border: 1px solid var(--line);
    background: rgba(5, 2, 6, 0.78);
    color: var(--text);
    padding: 0 12px;
    border-radius: 4px;
    font: inherit;
    font-weight: 800;
}
.auth-input-row button {
    height: 44px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #ea580c, var(--orange));
    color: #050206;
    padding: 0 16px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.auth-input-row button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: saturate(0.5);
}
.notice {
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    color: var(--soft);
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.55;
}
.notice.success {
    border-color: rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.07);
    color: #cffafe;
}
.notice.error {
    border-color: rgba(251, 113, 133, 0.24);
    background: rgba(251, 113, 133, 0.08);
    color: #ffe4e6;
}
.device-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 16px;
    align-items: start;
}
.qr-panel,
.session-list {
    display: grid;
    gap: 14px;
}
.qr-code-box {
    min-height: 244px;
    display: grid;
    place-items: center;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(5, 2, 6, 0.64);
    border-radius: 8px;
}
.qr-code-box svg {
    width: min(220px, 100%);
    height: auto;
    display: block;
    border-radius: 6px;
}
.qr-placeholder {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}
.qr-warning {
    padding: 10px 11px;
    border: 1px solid rgba(251, 113, 133, 0.26);
    background: rgba(251, 113, 133, 0.08);
    color: #ffe4e6;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.5;
}
.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.qr-status,
.session-meta {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}
.session-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 8px;
}
.session-card.is-current {
    border-color: rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.055);
}
.session-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.session-title {
    min-width: 0;
}
.session-title strong {
    display: block;
    color: #fff;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.session-title span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}
.session-badge {
    flex: 0 0 auto;
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: rgba(34, 211, 238, 0.08);
    color: #a5f3fc;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}
.session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.action-button,
.session-actions button,
.qr-actions button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.1);
    color: #fff;
    border-radius: 6px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}
.session-actions button.danger {
    border-color: rgba(251, 113, 133, 0.3);
    background: rgba(251, 113, 133, 0.09);
    color: #ffe4e6;
}
.qr-confirm-card {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}
.qr-confirm-player {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin: 18px 0;
}
.qr-confirm-player strong {
    color: #fff;
    font-family: Orbitron, sans-serif;
    font-size: 1.5rem;
    overflow-wrap: anywhere;
}

.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 24px; align-items: end; margin-bottom: 28px; }
.eyebrow { color: var(--orange); font-family: "JetBrains Mono", monospace; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px; }
h1, h2, h3 { margin: 0; }
h1 {
    font-family: Orbitron, sans-serif;
    font-size: clamp(2.3rem, 6vw, 5.7rem);
    line-height: 0.92;
    letter-spacing: 0;
    overflow-wrap: normal;
    text-shadow: 0 0 18px rgba(249, 115, 22, 0.16);
}
.hero-title span {
    display: block;
    max-width: 100%;
    overflow-wrap: normal;
}
h1::first-line { color: #fff; }
.profile-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}
h1 .staff-mark,
h1 .supporter-mark {
    margin-left: 8px;
    transform: translateY(-0.18em);
}
.profile-hero-badge {
    --badge-color: var(--cyan);
    --badge-glow: rgba(34, 211, 238, 0.32);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 148px;
    max-width: min(320px, 100%);
    min-height: 48px;
    padding: 8px 11px;
    border: 1px solid color-mix(in srgb, var(--badge-color) 48%, rgba(255, 255, 255, 0.12));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 13%, transparent), rgba(255, 255, 255, 0.045));
    border-radius: 8px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        0 10px 26px color-mix(in srgb, var(--badge-color) 14%, transparent);
}
.profile-hero-badge[href] {
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.profile-hero-badge[href]:hover {
    border-color: color-mix(in srgb, var(--badge-color) 68%, rgba(255, 255, 255, 0.12));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 18%, transparent), rgba(255, 255, 255, 0.06));
    transform: translateY(-1px);
}
.profile-hero-badge span {
    color: color-mix(in srgb, var(--badge-color) 72%, var(--muted));
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}
.profile-hero-badge strong {
    display: block;
    margin-top: 5px;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.hero-copy {
    color: var(--soft);
    font-size: 1.02rem;
    line-height: 1.78;
    max-width: 720px;
    margin: 18px 0 0;
}
.profile-copy-editor {
    display: grid;
    gap: 12px;
    max-width: 720px;
    margin-top: 18px;
}
.profile-copy-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: start;
    max-width: 720px;
}
.profile-copy-view[hidden],
.profile-copy-field[hidden] {
    display: none;
}
.profile-copy-view .hero-copy {
    max-width: none;
    margin: 0;
}
.profile-edit-button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(148, 163, 184, 0.1);
    color: #aeb7c7;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.18s;
}
.profile-edit-button:hover,
.profile-edit-button:focus-visible {
    border-color: rgba(249, 115, 22, 0.36);
    background: rgba(249, 115, 22, 0.11);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}
.profile-edit-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.profile-copy-field {
    display: grid;
    gap: 12px;
}
.profile-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.profile-field textarea,
.profile-field select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(8, 5, 10, 0.84);
    color: var(--text);
    border-radius: 6px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    outline: none;
}
.profile-field textarea {
    min-height: 82px;
    resize: vertical;
    padding: 10px 11px;
    line-height: 1.55;
}
.profile-field select {
    min-height: 40px;
    padding: 0 10px;
}
.profile-inline-select {
    max-width: 360px;
}
.profile-field textarea:focus,
.profile-field select:focus {
    border-color: rgba(249, 115, 22, 0.36);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}
.profile-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.profile-inline-actions button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.1);
    color: #fff;
    border-radius: 6px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}
.profile-inline-actions button.secondary {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    color: var(--soft);
}
.profile-inline-actions button:hover {
    border-color: rgba(249, 115, 22, 0.48);
    background: rgba(249, 115, 22, 0.16);
}
.profile-inline-actions button.secondary:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.075);
    color: #fff;
}
.section-title {
    font-family: Orbitron, sans-serif;
    font-size: clamp(1.8rem, 4vw, 3.4rem);
    line-height: 0.98;
    letter-spacing: 0;
    text-shadow: 0 0 16px rgba(249, 115, 22, 0.12);
}
.hero-panel, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    border-radius: 8px;
}
.hero-panel { padding: 22px; }
.panel { padding: 20px; }
.panel-title { font-family: Orbitron, sans-serif; font-size: 1rem; font-weight: 800; margin-bottom: 14px; color: #fff; }
.panel-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.panel-heading-row .panel-title {
    margin-bottom: 6px;
}
.panel-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric, .player-card, .rank-row {
    background: var(--panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    border-radius: 8px;
}
.metric {
    position: relative;
    overflow: hidden;
    padding: 16px;
    min-height: 96px;
}
.metric::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: var(--magma-gradient);
    opacity: 0.68;
}
.metric .label { color: var(--muted); font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.metric .value { margin-top: 10px; font-family: Orbitron, sans-serif; font-size: 1.55rem; font-weight: 900; color: #fff; overflow-wrap: anywhere; }
.metric .sub { margin-top: 6px; color: var(--muted); font-size: 0.82rem; }
.back-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 0 13px;
    border: 1px solid var(--line);
    background: rgba(19, 8, 21, 0.7);
    color: var(--soft);
    font-size: 0.86rem;
    font-weight: 900;
    border-radius: 8px;
    backdrop-filter: blur(20px);
}
.back-link:hover {
    border-color: rgba(249, 115, 22, 0.56);
    color: var(--text);
}
.back-link .arrow {
    font-size: 1.16rem;
    line-height: 1;
}

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.toolbar input, .toolbar select {
    height: 42px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(5, 2, 6, 0.78);
    padding: 0 12px;
    font: inherit;
    border-radius: 4px;
}
.toolbar input { flex: 1 1 240px; }
.toolbar button {
    height: 42px;
    border: 0;
    color: #080808;
    background: linear-gradient(90deg, #ea580c, var(--orange));
    padding: 0 18px;
    font-weight: 900;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.18);
}
.toolbar button:hover { transform: translateY(-1px); }

.grid { display: grid; gap: 14px; }
.players-grid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.player-card {
    min-width: 0;
    overflow: hidden;
    padding: 18px;
    transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.player-card:hover { border-color: var(--hover-line); background: rgba(255, 255, 255, 0.045); transform: translateY(-2px); }
.player-name { min-width: 0; }
.player-name-row {
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    min-width: 0;
}
.player-name strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.08rem;
}
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 26px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
}
.badge.is-featured-summary {
    --badge-color: var(--orange);
    --badge-glow: rgba(249, 115, 22, 0.22);
    border-color: color-mix(in srgb, var(--badge-color) 52%, rgba(255, 255, 255, 0.12));
    color: #fff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 14%, transparent), rgba(255, 255, 255, 0.045));
    box-shadow: 0 8px 20px var(--badge-glow);
}
.rank-featured-badge {
    --rank-badge-color: var(--orange);
    color: color-mix(in srgb, var(--rank-badge-color) 62%, var(--muted));
}
.badge-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.badge-chip {
    --badge-color: var(--cyan);
    --badge-glow: rgba(34, 211, 238, 0.32);
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 132px;
    max-width: 100%;
    min-height: 56px;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--badge-color) 42%, rgba(255, 255, 255, 0.1));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 7%, transparent), rgba(255, 255, 255, 0.035));
    border-radius: 8px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 8px 20px rgba(0, 0, 0, 0.2);
}
.badge-chip.is-featured {
    border-color: color-mix(in srgb, var(--badge-color) 64%, rgba(249, 115, 22, 0.18));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 11%, transparent), rgba(249, 115, 22, 0.045));
}
.badge-chip.is-season-award {
    min-width: 172px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 12%, transparent), rgba(255, 255, 255, 0.04));
}
.badge-chip[href] {
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.badge-chip[href]:hover {
    border-color: color-mix(in srgb, var(--badge-color) 68%, rgba(255, 255, 255, 0.14));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 16%, transparent), rgba(255, 255, 255, 0.055));
    transform: translateY(-1px);
}
.badge-chip strong {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.badge-chip span {
    margin-top: 4px;
    color: color-mix(in srgb, var(--badge-color) 74%, var(--soft));
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.badge-chip small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.advancement-panel { display: grid; gap: 14px; }
.advancement-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.achievement-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    background: rgba(249, 115, 22, 0.07);
    color: var(--orange-soft);
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}
.achievement-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.achievement-filter {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: var(--soft);
    border-radius: 6px;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.achievement-filter:hover,
.achievement-filter[aria-pressed="true"] {
    border-color: rgba(249, 115, 22, 0.34);
    background: rgba(249, 115, 22, 0.1);
    color: #fff;
}
.achievement-board,
.achievement-group {
    display: grid;
    gap: 12px;
}
.achievement-group[hidden],
.achievement-empty[hidden] {
    display: none;
}
.achievement-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 24px;
}
.achievement-group-heading h3 {
    margin: 0;
    color: var(--soft);
    font-family: "Orbitron", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0;
}
.achievement-group-heading span {
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.74rem;
    font-weight: 900;
}
.achievement-list { display: grid; gap: 9px; }
.achievement-row {
    --badge-color: var(--cyan);
    --badge-glow: rgba(34, 211, 238, 0.28);
    position: relative;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid color-mix(in srgb, var(--badge-color) 24%, rgba(255, 255, 255, 0.08));
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--badge-color) 5%, transparent), rgba(255, 255, 255, 0.03));
    border-radius: 8px;
    outline: none;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.achievement-row[data-tooltip]:not([data-tooltip=""]) { cursor: help; }
.achievement-row:focus-visible {
    border-color: color-mix(in srgb, var(--badge-color) 46%, rgba(255, 255, 255, 0.16));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--badge-color) 22%, transparent);
}
.achievement-row[data-tooltip]:not([data-tooltip=""])::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 7px);
    left: 28px;
    right: 10px;
    z-index: 12;
    min-width: min(260px, calc(100vw - 64px));
    padding: 9px 10px;
    border: 1px solid color-mix(in srgb, var(--badge-color) 22%, rgba(255, 255, 255, 0.12));
    background: rgba(8, 5, 10, 0.96);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
    white-space: pre-line;
    border-radius: 6px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px);
    visibility: hidden;
    transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}
.achievement-row[data-tooltip]:not([data-tooltip=""]):hover::after,
.achievement-row[data-tooltip]:not([data-tooltip=""]):focus-visible::after,
.achievement-row[data-tooltip]:not([data-tooltip=""]).is-tooltip-open::after {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
.achievement-row.is-locked {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}
.achievement-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--badge-color);
    box-shadow: 0 0 8px color-mix(in srgb, var(--badge-color) 22%, transparent);
}
.achievement-row.is-locked .achievement-dot {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--badge-color) 56%, rgba(255, 255, 255, 0.2));
    box-shadow: none;
}
.achievement-name { min-width: 0; }
.achievement-name strong {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}
.achievement-name span {
    display: block;
    margin-top: 2px;
    color: color-mix(in srgb, var(--badge-color) 74%, var(--muted));
    font-size: 0.72rem;
    font-weight: 900;
}
.achievement-date {
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.74rem;
    text-align: right;
    white-space: nowrap;
}
.reveal-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    margin-top: 12px;
    border: 1px solid rgba(249, 115, 22, 0.26);
    background: rgba(249, 115, 22, 0.08);
    color: var(--orange-soft);
    border-radius: 6px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.reveal-toggle:hover {
    border-color: rgba(249, 115, 22, 0.44);
    background: rgba(249, 115, 22, 0.12);
    color: #fff;
}
.reveal-toggle[hidden] { display: none; }

[data-advancement-item][hidden],
[data-reveal-item][hidden] { display: none !important; }
.stat-list { display: grid; gap: 0; margin-top: 15px; }
.stat-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 32px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    color: var(--muted);
    font-size: 0.88rem;
}
.stat-line:last-child { border-bottom: 0; }
.stat-line b { color: var(--text); font-weight: 800; text-align: right; }
/* Secondary figure beside a headline stat (e.g. running total next to ranked SP). */
.stat-line b .stat-subvalue {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.85em;
    white-space: nowrap;
}
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.goal-panel,
.activity-panel {
    position: relative;
    overflow: hidden;
}
.goal-panel::before,
.activity-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.55), rgba(249, 115, 22, 0.24), transparent);
    opacity: 0.72;
}
.goal-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.goal-card {
    --goal-color: var(--cyan);
    --goal-accent: var(--orange);
    --goal-progress: 0%;
    min-width: 0;
    min-height: 132px;
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 13px;
    border: 1px solid color-mix(in srgb, var(--goal-color) 20%, rgba(255, 255, 255, 0.08));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--goal-color) 6%, transparent), rgba(255, 255, 255, 0.032)),
        rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}
.goal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.goal-top span {
    color: color-mix(in srgb, var(--goal-color) 76%, var(--soft));
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.goal-top b {
    color: var(--soft);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
}
.goal-card strong {
    min-height: 40px;
    color: #fff;
    font-size: 0.94rem;
    line-height: 1.34;
    overflow-wrap: anywhere;
}
.goal-progress {
    height: 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.055);
    border-radius: 999px;
}
.goal-progress span {
    display: block;
    width: var(--goal-progress);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--goal-color), var(--goal-accent));
}
.goal-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.goal-meta span {
    color: var(--soft);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.74rem;
    overflow-wrap: anywhere;
}
.goal-meta small {
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.activity-summary {
    flex: 0 0 auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.06);
    color: #a5f3fc;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}
.activity-calendar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding-top: 2px;
}
.activity-weekdays,
.activity-days {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    gap: 4px;
}
.activity-weekdays span {
    min-width: 18px;
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 12px;
    text-align: right;
}
.activity-days {
    grid-template-columns: repeat(12, minmax(10px, 1fr));
    grid-auto-flow: column;
}
.activity-cell {
    width: 100%;
    min-width: 10px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.045);
    background: rgba(255, 255, 255, 0.045);
    border-radius: 3px;
}
.activity-cell.is-active {
    border-color: rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.32);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.08);
}
.activity-cell.is-active.level-2 {
    border-color: rgba(34, 211, 238, 0.22);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.48), rgba(249, 115, 22, 0.22));
}
.activity-cell.is-active.level-3 {
    border-color: rgba(34, 211, 238, 0.28);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.68), rgba(249, 115, 22, 0.36));
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.11);
}
.activity-cell.is-active.level-4 {
    border-color: rgba(34, 211, 238, 0.32);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.82), rgba(249, 115, 22, 0.52));
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.14);
}
.activity-cell.is-outside {
    opacity: 0.32;
    background: rgba(255, 255, 255, 0.025);
}
.milestone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.milestone-card {
    position: relative;
    min-height: 104px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--ring-color) 18%, rgba(255, 255, 255, 0.08));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--ring-color) 6%, transparent), rgba(255, 255, 255, 0.03)),
        var(--panel);
    border-radius: 8px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 8px 22px rgba(0, 0, 0, 0.22);
    overflow: visible;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
}
.milestone-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ring-accent) 12%, transparent), transparent);
    opacity: 0.1;
}
.milestone-card:hover {
    z-index: 12;
    border-color: color-mix(in srgb, var(--ring-accent) 34%, rgba(255, 255, 255, 0.14));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--ring-color) 9%, transparent), rgba(255, 255, 255, 0.04)),
        var(--panel);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.26),
        inset 0 0 0 1px rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
}
.milestone-card:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(100% + 8px);
    z-index: 20;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 2, 6, 0.95);
    color: var(--text);
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
    border-radius: 6px;
    box-shadow: var(--shadow);
    pointer-events: none;
}
.progress-ring {
    width: 72px;
    aspect-ratio: 1;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(from 220deg, var(--ring-color) 0%, var(--ring-accent) var(--progress), rgba(255, 255, 255, 0.08) var(--progress), rgba(255, 255, 255, 0.08) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(0, 0, 0, 0.24);
}
.progress-ring::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 2, 6, 0.9);
}
.progress-ring span {
    position: relative;
    font-family: Orbitron, sans-serif;
    font-size: 0.84rem;
    font-weight: 900;
    color: #fff;
}
.milestone-copy { min-width: 0; }
.milestone-label {
    color: var(--ring-color);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.milestone-copy strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 1rem;
    overflow-wrap: anywhere;
}
.milestone-copy span {
    display: block;
    margin-top: 5px;
    color: var(--soft);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}
.milestone-copy small {
    display: inline-flex;
    margin-top: 7px;
    max-width: 100%;
    color: color-mix(in srgb, var(--ring-accent) 64%, var(--soft));
    font-size: 0.75rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.avatar-frame {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    padding: 4px;
    border: 1px solid var(--avatar-line);
    background:
        radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.13), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), var(--avatar-glow));
    overflow: hidden;
    border-radius: 8px;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.player-card:hover .avatar-frame,
.rank-row:hover .avatar-frame,
.profile-identity:hover .avatar-frame {
    border-color: rgba(249, 115, 22, 0.34);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}
.avatar-frame.small { width: 38px; height: 38px; flex-basis: 38px; padding: 3px; }
.avatar-frame.large { width: 96px; height: 96px; flex-basis: 96px; padding: 7px; }
.avatar-frame.staff-avatar {
    border-color: rgba(34, 211, 238, 0.34);
    background:
        radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(34, 211, 238, 0.14), var(--avatar-glow));
}
.avatar-frame.staff-avatar.is-owner {
    border-color: rgba(251, 191, 36, 0.42);
    background:
        radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(249, 115, 22, 0.18), var(--avatar-glow));
}
.head-shell {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    background: rgba(7, 8, 13, 0.72);
}
.player-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}
.player-card-top > .badge {
    justify-self: start;
}
.player-identity { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; }
.player-identity-text { width: 100%; min-width: 0; }
.profile-identity { display: flex; align-items: center; gap: 18px; }
.rank-row { display: grid; grid-template-columns: 42px 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 70px; padding: 12px; margin-bottom: 8px; transition: border-color 0.18s, background 0.18s; }
.rank-row:hover { border-color: var(--hover-line); background: rgba(255, 255, 255, 0.045); }
.rank-number { font-family: Orbitron, sans-serif; color: var(--orange); font-weight: 900; }
.rank-name { display: grid; gap: 4px; min-width: 0; }
.rank-name strong {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-player-line {
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    min-width: 0;
}
.rank-player-line strong {
    flex: 1 1 auto;
}
.rank-player-line .staff-mark,
.rank-player-line .supporter-mark,
.player-name-row .staff-mark,
.player-name-row .supporter-mark {
    flex: 0 0 auto;
}
.rank-name > span { display: block; min-width: 0; max-width: 100%; color: var(--muted); font-size: 0.78rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-name > span.rank-featured-badge { color: color-mix(in srgb, var(--rank-badge-color) 62%, var(--muted)); }
.rank-value { font-weight: 900; color: var(--text); text-align: right; white-space: nowrap; }
.empty { padding: 42px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); background: rgba(19, 8, 21, 0.55); border-radius: 8px; }
.section { margin-top: 18px; }
.muted { color: var(--muted); }

/* Records command center and player hall redesign.
   Keep these selectors page-scoped because this base also serves auth,
   QR, session, and legacy player-stat surfaces. */
.records-command-page,
.player-hall-page {
    --command-accent: var(--cyan);
    --command-rank: var(--orange);
    --command-surface: rgba(9, 15, 21, 0.9);
    --command-line: rgba(148, 163, 184, 0.2);
    color: var(--text);
}

main.shell:has(.records-command-page),
main.shell:has(.player-hall-page) {
    width: min(1390px, calc(100vw - 48px));
}

main.shell:has(.records-command-page) .topbar,
main.shell:has(.player-hall-page) .topbar {
    margin-bottom: 18px;
    padding-inline: max(24px, calc((100vw - 1390px) / 2));
}

.records-command-page :is(a, button, input, select):focus-visible,
.player-hall-page :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--command-accent);
    outline-offset: 3px;
}

.records-command-header {
    min-height: 0;
    margin-bottom: 12px;
    padding: 10px 0 0;
}

.records-command-heading {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 7px;
}

.records-command-heading .hero-title {
    margin: 0;
    font-size: clamp(2.5rem, 4.1vw, 3.65rem);
    line-height: 1;
    letter-spacing: 0.015em;
    white-space: nowrap;
}

.records-command-heading .hero-title span {
    display: inline;
}

.records-command-heading .hero-title span + span::before {
    content: " ";
}

.records-command-heading .hero-title span:last-child {
    color: #fff;
    background: none;
    filter: none;
    -webkit-text-fill-color: currentColor;
}

.records-command-heading .hero-copy {
    max-width: 720px;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.records-kpi-ribbon {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
    border: 1px solid var(--command-line);
    background: var(--command-surface);
    box-shadow: var(--shadow);
}

.records-kpi {
    min-width: 0;
    min-height: 62px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value"
        "icon sub";
    align-content: center;
    column-gap: 10px;
    padding: 9px 16px;
    border-right: 1px solid var(--command-line);
}

.records-kpi:last-child {
    border-right: 0;
}

.records-kpi > svg {
    grid-area: icon;
    width: 20px;
    height: 20px;
    color: var(--command-accent);
    align-self: center;
}

.records-kpi > span {
    grid-area: label;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.records-kpi > strong {
    grid-area: value;
    min-width: 0;
    color: #fff;
    font-family: Orbitron, sans-serif;
    font-size: 0.92rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.records-kpi > small {
    grid-area: sub;
    min-width: 0;
    color: var(--muted);
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.records-kpi.is-live > svg,
.records-kpi.is-live > strong {
    color: var(--command-accent);
}

.records-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 12px 0;
    border: 1px solid var(--command-line);
    background: var(--command-surface);
    box-shadow: var(--shadow);
}

.records-timeline-stop {
    position: relative;
    min-width: 0;
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 10px 18px;
    border-right: 1px solid var(--command-line);
    border-bottom: 3px solid transparent;
    text-align: center;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.records-timeline-stop:last-child {
    border-right: 0;
}

.records-timeline-stop:hover {
    background: rgba(34, 211, 238, 0.06);
}

.records-timeline-stop.is-active {
    border-bottom-color: var(--command-accent);
    background: rgba(34, 211, 238, 0.08);
}

.records-timeline-label {
    color: var(--soft);
    font-family: Orbitron, sans-serif;
    font-size: 0.88rem;
    font-weight: 900;
}

.records-timeline-stop.is-active .records-timeline-label {
    color: var(--command-accent);
}

.records-timeline-stop em {
    justify-self: center;
    padding: 2px 6px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    color: var(--command-accent);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.records-timeline-stop small {
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    line-height: 1.35;
}

.records-category-rail {
    display: flex;
    min-width: 0;
    margin: 12px 0;
    overflow-x: auto;
    border: 1px solid var(--command-line);
    background: var(--command-surface);
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.55) transparent;
}

.records-category-tab {
    min-width: max(142px, calc(100% / 8));
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border-right: 1px solid var(--command-line);
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.records-category-tab:last-child {
    border-right: 0;
}

.records-category-tab > svg {
    width: 19px;
    height: 19px;
}

.records-category-tab:hover,
.records-category-tab.is-active,
.records-category-tab[aria-selected="true"] {
    color: var(--command-accent);
    background: rgba(34, 211, 238, 0.08);
    border-bottom-color: var(--command-accent);
}

#leaderboards {
    scroll-margin-top: 164px;
}

.records-board-stack {
    display: grid;
    gap: 18px;
}

.records-board-panel {
    scroll-margin-top: 164px;
    padding: 14px;
    border: 1px solid var(--command-line);
    background: var(--command-surface);
    box-shadow: var(--shadow);
}

.records-board-panel[hidden] {
    display: none;
}

.records-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--command-line);
}

.records-command-page .records-board-stack.is-tabs-enhanced .records-board-header {
    display: none;
}

.records-board-header .panel-title {
    margin: 3px 0 0;
    font-size: 1.22rem;
}

.records-board-kicker,
.records-board-period {
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
}

.records-board-kicker {
    color: var(--command-accent);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.records-ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 14px;
    align-items: stretch;
}

.records-podium {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    padding: 12px 8px 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(5, 10, 15, 0.72);
}

.records-podium-entry {
    min-width: 0;
    min-height: 224px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 10px 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: 6px solid rgba(148, 163, 184, 0.36);
    background: rgba(15, 23, 32, 0.92);
    text-align: center;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.records-podium-entry:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(20, 31, 42, 0.96);
    transform: translateY(-2px);
}

.records-podium-entry.is-rank-1 {
    grid-column: 2;
    grid-row: 1;
    min-height: 292px;
    border-color: rgba(249, 115, 22, 0.5);
    border-bottom-color: var(--command-rank);
}

.records-podium-entry.is-rank-2 {
    grid-column: 1;
    grid-row: 1;
    min-height: 250px;
}

.records-podium-entry.is-rank-3 {
    grid-column: 3;
    grid-row: 1;
    min-height: 232px;
    border-bottom-color: rgba(194, 110, 72, 0.72);
}

.records-podium-rank {
    color: var(--command-rank);
    font-family: Orbitron, sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
}

.records-podium-entry.is-rank-1 .records-podium-rank {
    font-size: 2rem;
}

.records-podium-entry .avatar-frame {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-radius: 6px;
}

.records-podium-entry.is-rank-1 .avatar-frame {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
}

.records-podium-player {
    min-width: 0;
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 5px;
}

.records-podium-player .rank-player-line {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.records-podium-player .rank-player-line > strong {
    flex: 1 0 100%;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.records-podium-player > span {
    max-width: 100%;
    color: var(--muted);
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.records-podium-value {
    margin-top: 6px;
    color: #fff;
    font-family: Orbitron, sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1.18rem);
}

.records-podium-player > small {
    color: var(--muted);
    font-size: 0.72rem;
}

.records-rank-list {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 8px;
}

.records-command-page .records-rank-list .rank-row,
.records-command-page .player-card {
    margin: 0;
    background: rgba(12, 19, 27, 0.92);
    backdrop-filter: none;
}

.records-command-page .records-rank-list .rank-row {
    min-height: 66px;
    padding-block: 8px;
}

.records-command-page .records-rank-list .rank-number {
    color: var(--command-rank);
    font-size: 1.05rem;
}

#directory {
    margin-top: 28px;
    padding: 22px;
    scroll-margin-top: 164px;
    border: 1px solid var(--command-line);
    background: var(--command-surface);
    box-shadow: var(--shadow);
}

.records-command-page #directory > div:first-child .section-title {
    margin: 0;
    color: var(--command-accent);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.records-command-page #directory .toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 260px) auto;
    margin: 18px 0;
    padding: 14px 0;
    border-top: 1px solid var(--command-line);
    border-bottom: 1px solid var(--command-line);
}

.records-command-page #directory .toolbar input,
.records-command-page #directory .toolbar select {
    min-height: 46px;
    border-color: rgba(148, 163, 184, 0.34);
    color: #f8fafc;
    background: rgba(4, 13, 20, 0.94);
    box-shadow: none;
}

.records-command-page #directory .toolbar input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.records-command-page #directory .toolbar button {
    min-height: 46px;
    color: #061018;
    background: var(--command-accent);
    box-shadow: 0 10px 24px rgba(34, 211, 238, 0.16);
}

.records-command-page .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.records-command-page .player-card {
    padding: 14px;
    border-radius: 4px;
    box-shadow: none;
}

.records-command-page .player-card:hover {
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(18, 29, 40, 0.96);
}

.player-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -12px 0 18px;
    padding: 10px 14px;
    border: 1px solid var(--command-line);
    background: var(--command-surface);
    box-shadow: var(--shadow);
}

.player-context-bar .back-link {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.player-context-bar .back-link > svg {
    width: 19px;
    height: 19px;
}

.player-context-window {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
}

.player-context-window strong {
    color: var(--command-accent);
    font-family: Orbitron, sans-serif;
    font-size: 0.84rem;
}

.player-hall-plaque {
    min-height: 310px;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    align-items: center;
    margin-bottom: 14px;
    padding: 26px;
    border: 1px solid var(--command-line);
    background: rgba(7, 13, 19, 0.76);
    box-shadow: var(--shadow);
}

.player-plaque-identity {
    min-width: 0;
}

.player-hall-plaque .profile-identity {
    align-items: center;
}

.player-hall-plaque .avatar-frame.large {
    width: 124px;
    height: 124px;
    flex: 0 0 124px;
    border-radius: 7px;
}

.player-hall-plaque h1 {
    max-width: 100%;
    color: #fff;
    font-size: clamp(2.85rem, 6vw, 5.4rem);
    line-height: 0.95;
    overflow-wrap: anywhere;
}

.player-hall-plaque .eyebrow {
    color: var(--command-rank);
}

.player-hall-plaque .profile-title-row {
    align-items: center;
}

.player-hall-plaque .profile-hero-badge {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 40px;
    padding: 7px 10px;
}

.player-hall-plaque .hero-copy {
    max-width: 720px;
    margin-top: 14px;
}

.player-hall-plaque .player-snapshot-panel {
    margin: 0;
    padding: 20px;
    border-color: rgba(34, 211, 238, 0.26);
    background: rgba(10, 17, 24, 0.92);
}

.player-hall-plaque .player-snapshot-panel .panel-title {
    color: var(--command-accent);
}

.player-headline-ribbon {
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid var(--command-line);
    background: var(--command-surface);
    box-shadow: var(--shadow);
}

.player-headline-ribbon .metric {
    min-height: 116px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 0;
    border-right: 1px solid var(--command-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.player-headline-ribbon .metric:last-child {
    border-right: 0;
}

.player-headline-ribbon .metric::before {
    display: none;
}

.player-headline-ribbon .metric-icon {
    width: 30px;
    height: 30px;
    color: var(--command-accent);
}

.player-headline-ribbon .metric-copy {
    min-width: 0;
}

.player-headline-ribbon .metric .value {
    margin-top: 4px;
    font-size: clamp(1.2rem, 2vw, 1.75rem);
}

.player-hall-page .profile-layout {
    display: block;
}

.player-hall-page .profile-layout > .grid {
    margin-top: 14px;
}

.player-record-rank-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
}

.player-progress-trophy-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
}

.player-deep-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-deep-record-grid .activity-panel,
.player-deep-record-grid .advancement-panel {
    grid-column: 1 / -1;
}

.player-hall-page .panel {
    border-color: var(--command-line);
    background: var(--command-surface);
    box-shadow: var(--shadow);
}

.player-hall-page .panel > .panel-title,
.player-hall-page .panel-heading-row .panel-title,
.player-hall-page .advancement-heading .panel-title {
    color: var(--command-accent);
    letter-spacing: 0.05em;
}

.player-hall-page .rank-panel .stat-line b {
    color: var(--command-rank);
    font-family: Orbitron, sans-serif;
}

.player-hall-page .titles-badges-panel .badge-cloud {
    grid-template-columns: 1fr;
}

.player-hall-page .goal-card,
.player-hall-page .badge-chip,
.player-hall-page .milestone-card,
.player-hall-page .achievement-row {
    backdrop-filter: none;
}

@media (prefers-reduced-motion: reduce) {
    .records-command-page *,
    .player-hall-page * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 860px) {
    .shell { width: min(100vw - 22px, 720px); padding-top: 16px; }
    main.shell:has(.records-command-page),
    main.shell:has(.player-hall-page) {
        width: min(calc(100% - 22px), 720px);
    }
    .topbar { margin: -16px -11px 30px; padding: 12px 11px; }
    .hero { display: block; }
    .nav { justify-content: flex-end; gap: 10px; }
    .topbar-actions { gap: 10px; }
    .hero-panel { margin-top: 22px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-layout, .two-col { grid-template-columns: 1fr; }
    .device-layout { grid-template-columns: 1fr; }
    .goal-list { grid-template-columns: 1fr; }
    .records-command-heading {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 10px;
    }
    .records-kpi-ribbon {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .records-kpi:nth-child(2) {
        border-right: 0;
    }
    .records-kpi:nth-child(-n + 2) {
        border-bottom: 1px solid var(--command-line);
    }
    .records-timeline {
        display: flex;
        overflow-x: auto;
        padding-right: 28px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .records-timeline::-webkit-scrollbar,
    .records-category-rail::-webkit-scrollbar {
        display: none;
    }
    .records-timeline-stop {
        flex: 0 0 min(240px, 72vw);
        border-bottom-width: 3px;
        scroll-snap-align: start;
    }
    .records-category-tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
    .records-category-rail {
        padding-right: 24px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .records-ranking-layout {
        grid-template-columns: 1fr;
    }
    .records-podium {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 10px;
    }
    .records-podium-entry,
    .records-podium-entry.is-rank-1,
    .records-podium-entry.is-rank-2,
    .records-podium-entry.is-rank-3 {
        grid-column: 1;
        min-height: 0;
        display: grid;
        grid-template-columns: 48px 72px minmax(0, 1fr);
        align-items: center;
        justify-items: start;
        gap: 12px;
        padding: 12px;
        text-align: left;
    }
    .records-podium-entry.is-rank-1 { grid-row: 1; }
    .records-podium-entry.is-rank-2 { grid-row: 2; }
    .records-podium-entry.is-rank-3 { grid-row: 3; }
    .records-podium-entry.is-rank-1 .avatar-frame,
    .records-podium-entry .avatar-frame {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }
    .records-podium-player {
        justify-items: start;
        text-align: left;
    }
    .records-podium-player .rank-player-line {
        justify-content: flex-start;
    }
    .records-command-page #directory .toolbar {
        grid-template-columns: 1fr 1fr;
    }
    .records-command-page #directory .toolbar input {
        grid-column: 1 / -1;
    }
    .player-context-bar {
        align-items: flex-start;
    }
    .player-context-window {
        display: grid;
        justify-items: end;
        text-align: right;
    }
    .player-hall-plaque {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 20px;
    }
    .player-hall-plaque .player-snapshot-panel {
        margin-top: 18px;
    }
    .player-headline-ribbon {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .player-headline-ribbon .metric:nth-child(2) {
        border-right: 0;
    }
    .player-headline-ribbon .metric:nth-child(-n + 2) {
        border-bottom: 1px solid var(--command-line);
    }
    .player-record-rank-grid,
    .player-progress-trophy-grid,
    .player-deep-record-grid {
        grid-template-columns: 1fr;
    }
    .player-deep-record-grid .activity-panel,
    .player-deep-record-grid .advancement-panel {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    body::before {
        background:
            linear-gradient(180deg, rgba(5, 2, 6, 0.40), rgba(19, 8, 21, 0.46) 46%, rgba(5, 2, 6, 0.86)),
            url("/static/images/nearoutpost_bg-1280.jpg") center/cover no-repeat;
    }
    @supports (background-image: image-set(url("/static/images/nearoutpost_bg-1280.webp") type("image/webp"))) {
        body::before {
            background:
                linear-gradient(180deg, rgba(5, 2, 6, 0.40), rgba(19, 8, 21, 0.46) 46%, rgba(5, 2, 6, 0.86)),
                image-set(
                    url("/static/images/nearoutpost_bg-1280.webp") type("image/webp"),
                    url("/static/images/nearoutpost_bg-1280.jpg") type("image/jpeg")
                ) center/cover no-repeat;
        }
    }
    .metric-grid { grid-template-columns: 1fr; }
    .milestone-card { grid-template-columns: 64px minmax(0, 1fr); }
    .progress-ring { width: 64px; }
    .panel-heading-row {
        display: grid;
        gap: 10px;
    }
    .activity-summary {
        justify-self: start;
    }
    .activity-days {
        grid-template-columns: repeat(12, minmax(8px, 1fr));
        gap: 3px;
    }
    .activity-weekdays {
        gap: 3px;
    }
    .activity-cell {
        min-width: 8px;
        border-radius: 2px;
    }
    h1 { font-size: 2.35rem; }
    .topbar { flex-wrap: wrap; }
    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
    }
    .nav {
        width: auto;
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: clamp(8px, 4vw, 24px);
    }
    .nav a {
        min-width: 0;
        padding: 0 2px;
        font-size: 0.7rem;
        letter-spacing: 0.07em;
        white-space: nowrap;
    }
    .nav a::after {
        left: 2px;
        right: 2px;
    }
    .auth-actions {
        width: auto;
        justify-content: flex-end;
    }
    .auth-pill {
        max-width: min(38vw, 132px);
        padding-inline: 10px;
        white-space: nowrap;
    }
    .account-menu-panel {
        left: auto;
        right: 0;
        width: min(280px, calc(100vw - 22px));
    }
    .account-menu-panel::before {
        left: auto;
        right: 18px;
    }
    .player-card-top { align-items: flex-start; }
    .rank-row { grid-template-columns: 34px 34px minmax(0, 1fr); min-height: 72px; }
    .rank-value { grid-column: 3; text-align: left; margin-top: 2px; }
    .avatar-frame.small { width: 34px; height: 34px; flex-basis: 34px; }
    .auth-input-row { grid-template-columns: 1fr; }
    .records-command-header {
        padding-top: 12px;
    }
    .records-command-heading .hero-title {
        font-size: clamp(2.15rem, 13vw, 3.2rem);
        white-space: normal;
    }
    .records-command-heading .hero-title span {
        display: block;
    }
    .records-command-heading .hero-title span + span::before {
        content: none;
    }
    .records-kpi {
        min-height: 88px;
        grid-template-columns: 22px minmax(0, 1fr);
        column-gap: 8px;
        padding: 12px 10px;
    }
    .records-kpi > svg {
        width: 19px;
        height: 19px;
    }
    .records-kpi > strong {
        font-size: 0.84rem;
    }
    .records-kpi > small {
        display: none;
    }
    .records-board-panel,
    #directory {
        padding: 12px;
    }
    .records-board-header {
        align-items: flex-start;
    }
    .records-board-period {
        max-width: 42%;
        text-align: right;
    }
    .records-podium-entry,
    .records-podium-entry.is-rank-1,
    .records-podium-entry.is-rank-2,
    .records-podium-entry.is-rank-3 {
        grid-template-columns: 34px 54px minmax(0, 1fr);
        gap: 8px;
    }
    .records-podium-entry.is-rank-1 .avatar-frame,
    .records-podium-entry .avatar-frame {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }
    .records-podium-rank,
    .records-podium-entry.is-rank-1 .records-podium-rank {
        font-size: 1.2rem;
    }
    .records-podium-value {
        font-size: 0.9rem;
    }
    .records-command-page #directory .toolbar {
        grid-template-columns: 1fr;
    }
    .records-command-page #directory .toolbar input {
        grid-column: auto;
    }
    .records-command-page .players-grid {
        grid-template-columns: 1fr;
    }
    .player-context-bar {
        display: grid;
    }
    .player-context-window {
        justify-items: start;
        text-align: left;
    }
    .player-hall-plaque {
        padding: 16px;
    }
    .player-hall-plaque .profile-identity {
        align-items: flex-start;
        gap: 12px;
    }
    .player-hall-plaque .profile-identity > div:last-child {
        min-width: 0;
    }
    .player-hall-plaque .avatar-frame.large {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
    }
    .player-hall-plaque h1 {
        font-size: clamp(1.7rem, 8.5vw, 2.45rem);
    }
    .player-headline-ribbon {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .player-headline-ribbon .metric {
        min-height: 96px;
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 8px;
        padding: 12px 10px;
    }
    .player-headline-ribbon .metric-icon {
        width: 23px;
        height: 23px;
    }
    .player-headline-ribbon .metric .value {
        font-size: 1.05rem;
    }
    .player-headline-ribbon .metric .sub {
        display: none;
    }
    .player-hall-page .achievement-row {
        grid-template-columns: 10px minmax(0, 1fr);
    }
    .player-hall-page .achievement-date {
        grid-column: 2;
        text-align: left;
        white-space: normal;
    }
    .player-hall-page .achievement-row[data-tooltip]:not([data-tooltip=""])::after {
        left: 0;
        right: 0;
        min-width: 0;
        max-width: 100%;
    }
}

@media (hover: none) {
    .milestone-card:hover::after { content: none; }
    .achievement-row[data-tooltip]:not([data-tooltip=""]):hover::after {
        opacity: 0;
        transform: translateY(-3px);
        visibility: hidden;
    }
    .achievement-row[data-tooltip]:not([data-tooltip=""]).is-tooltip-open::after,
    .achievement-row[data-tooltip]:not([data-tooltip=""]):focus-visible::after {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
}

@media (max-width: 360px) {
    .player-hall-plaque .profile-identity {
        display: grid;
        grid-template-columns: 1fr;
    }
    .player-hall-plaque .avatar-frame.large {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }
    .player-hall-plaque h1 {
        font-size: clamp(1.45rem, 8vw, 2.1rem);
    }
}
