@font-face {
    font-family: "CTR Original";
    src:
        url("assets/fonts/ctr-original.woff2?v=2") format("woff2"),
        url("assets/fonts/ctr-original.ttf?v=2") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "CTR Small";
    src:
        url("assets/fonts/ctr-small-web.woff2?v=2") format("woff2"),
        url("assets/fonts/ctr-small-web.otf?v=2") format("opentype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --font-ctr: "CTR Original", "Trebuchet MS", "Arial Narrow", Arial, sans-serif;
    --font-ctr-small: "CTR Small", "CTR Original", "Trebuchet MS", "Arial Narrow", Arial, sans-serif;
    --bg: #030303;
    --panel: rgba(7, 9, 12, 0.88);
    --panel-soft: rgba(11, 13, 17, 0.86);
    --panel-line: rgba(255, 112, 0, 0.94);
    --panel-line-soft: rgba(255, 157, 0, 0.42);
    --text: #fff9eb;
    --muted: #d0c0ae;
    --dim: #948677;
    --orange: #ff7900;
    --orange-hot: #ff3c00;
    --yellow: #ffdc00;
    --gold: #fff06d;
    --green: #78e15a;
    --red: #ff5a42;
    --radius: 3px;
    --ui-radius: 3px;
    --ui-radius-tight: 2px;
    --shadow: 4px 4px 0 rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
    background: #050505;
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-ctr);
    font-synthesis: none;
    color: var(--text);
    background: #020202;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

.status-label,
.section-kicker,
.panel-overline,
.live-pill,
.records-table th,
.racer-id,
.record-date,
.footer-note {
    font-family: var(--font-ctr-small);
}

.flag-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #020202;
    pointer-events: none;
}

.flag-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.flag-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.08) 58%, rgba(0, 0, 0, 0.30)),
        radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.24) 100%);
}

.page-shell {
    position: relative;
    z-index: 2;
    width: min(2200px, calc(100% - 44px));
    min-height: 100vh;
    margin: 0 auto;
    isolation: isolate;
}

.hero {
    position: relative;
    min-height: 410px;
    display: grid;
    place-items: center;
    padding: 34px 74px 24px;
}

.hero-content {
    position: relative;
    width: 100%;
    display: grid;
    place-items: center;
}

.hero-logo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
}

.brand-logo-image {
    display: block;
    width: clamp(220px, 18vw, 300px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.58));
}

.hero h1 {
    margin: 13px 0 0;
    color: #ff9800;
    font-family: var(--font-ctr);
    font-size: clamp(2rem, 4.1vw, 3.4rem);
    font-weight: 500;
    letter-spacing: 0.055em;
    line-height: 1;
    text-transform: uppercase;
    -webkit-text-stroke: 1px rgba(75, 25, 0, 0.85);
    text-shadow: 0 3px 0 #7b2300, 3px 4px 0 rgba(0, 0, 0, 0.42);
}

.tagline {
    margin: 10px 0 0;
    color: #fff0da;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-actions {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    padding: 11px 15px;
    border: 1px solid #7cc6ff;
    border-radius: var(--ui-radius);
    background: linear-gradient(180deg, #309be3 0%, #1769ad 62%, #0d3f73 100%);
    color: #fff9e8;
    box-shadow:
        inset 0 2px 0 rgba(210, 239, 255, 0.32),
        inset 0 -2px 0 rgba(3, 31, 63, 0.76),
        3px 3px 0 rgba(0, 0, 0, 0.38);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.account-button:hover,
.account-button:focus-visible {
    transform: translate(-1px, -1px);
    border-color: #d5efff;
    box-shadow:
        inset 0 2px 0 rgba(230, 247, 255, 0.42),
        inset 0 -2px 0 rgba(3, 31, 63, 0.78),
        5px 5px 0 rgba(0, 0, 0, 0.40);
}

.refresh-button {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 126px;
    justify-content: center;
    padding: 11px 15px;
    border: 1px solid #ffb23e;
    border-radius: var(--ui-radius);
    background: linear-gradient(180deg, #ff8500 0%, #ee4d00 62%, #aa2800 100%);
    color: #fff9e8;
    box-shadow:
        inset 0 2px 0 rgba(255, 224, 166, 0.32),
        inset 0 -2px 0 rgba(91, 20, 0, 0.76),
        3px 3px 0 rgba(0, 0, 0, 0.38);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.refresh-button:hover,
.arrow-button:hover,
.error-state button:hover {
    transform: translate(-1px, -1px);
    border-color: var(--gold);
    box-shadow:
        inset 0 2px 0 rgba(255, 236, 189, 0.38),
        inset 0 -2px 0 rgba(91, 20, 0, 0.78),
        5px 5px 0 rgba(0, 0, 0, 0.40);
}

.refresh-button[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.refresh-icon {
    display: inline-block;
    font-size: 1.1rem;
}

.refreshing .refresh-icon {
    animation: spin 1s linear infinite;
}

main {
    padding-bottom: 52px;
}

.status-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 28px;
    padding: 0 10px;
}

.status-item,
.live-pill {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 126, 0, 0.66);
    border-radius: var(--ui-radius);
    background: rgba(15, 17, 21, 0.92);
    box-shadow:
        inset 0 2px 0 rgba(255, 190, 105, 0.08),
        inset 0 -2px 0 rgba(54, 17, 0, 0.62),
        2px 2px 0 rgba(0, 0, 0, 0.34);
}

.status-wide {
    min-width: 225px;
}

.status-label {
    color: #ffac3b;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-item strong {
    color: #fff7e7;
    font-family: var(--font-ctr);
    font-size: 0.8rem;
}

.status-wide strong {
    font-family: var(--font-ctr-small);
}

.live-pill {
    color: #a6ee8e;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(120, 225, 90, 0.75);
}

.live-pill.offline {
    color: #ffb2a4;
}

.live-pill.offline .live-dot {
    background: var(--red);
    box-shadow: 0 0 10px rgba(255, 90, 66, 0.6);
}

.track-browser,
.leaderboard-stage {
    margin: 0 auto;
}

.track-browser {
    padding: 22px 22px 26px;
    border: 1px solid rgba(255, 116, 0, 0.90);
    border-radius: var(--ui-radius);
    background:
        linear-gradient(180deg, rgba(16, 18, 22, 0.89), rgba(8, 10, 13, 0.88)),
        radial-gradient(circle at 50% -20%, rgba(255, 112, 0, 0.28), transparent 50%);
    box-shadow:
        inset 0 2px 0 rgba(255, 188, 84, 0.18),
        inset 0 -2px 0 rgba(80, 22, 0, 0.72),
        5px 5px 0 rgba(0, 0, 0, 0.42);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-kicker,
.panel-overline {
    margin: 0;
    color: var(--orange);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 4px 0 0;
    color: #fff9e9;
    font-family: var(--font-ctr);
    font-size: clamp(2.15rem, 3.2vw, 3.35rem);
    font-weight: 500;
    letter-spacing: 0.035em;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(112, 31, 0, 0.8), 3px 4px 0 rgba(0, 0, 0, 0.34);
}

.track-controls,
.track-arrows {
    display: flex;
    align-items: center;
    gap: 7px;
}

.leaderboard-view-tabs {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin: 0 auto 14px;
    padding: 6px;
    border: 1px solid rgba(255, 116, 0, 0.82);
    border-radius: var(--ui-radius);
    background: rgba(10, 11, 13, 0.88);
    box-shadow:
        inset 0 1px 0 rgba(255, 192, 102, 0.08),
        inset 0 -1px 0 rgba(77, 22, 0, 0.62),
        3px 3px 0 rgba(0, 0, 0, 0.32);
}

.leaderboard-view-tab {
    flex: 0 1 auto;
}

.leaderboard-view-tab {
    min-width: 190px;
    min-height: 40px;
    padding: 8px 16px 7px;
    border: 1px solid rgba(255, 154, 42, 0.38);
    border-radius: var(--ui-radius-tight);
    color: #a99a8d;
    background: linear-gradient(180deg, rgba(42, 38, 34, 0.96), rgba(16, 16, 17, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 221, 174, 0.05),
        inset 0 -1px 0 rgba(41, 18, 0, 0.72);
    font-family: var(--font-ctr);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    cursor: pointer;
}

.leaderboard-view-tab:hover,
.leaderboard-view-tab:focus-visible {
    border-color: #ffad42;
    color: #fff0d8;
}

.leaderboard-view-tab.active {
    border-color: #ffc03b;
    color: #fff36a;
    background: linear-gradient(180deg, rgba(132, 58, 7, 0.98), rgba(58, 27, 7, 0.98));
    box-shadow:
        inset 0 2px 0 rgba(255, 226, 146, 0.15),
        inset 0 -2px 0 rgba(64, 20, 0, 0.82),
        2px 2px 0 rgba(0, 0, 0, 0.28);
}

.track-index {
    padding: 8px 11px;
    border: 1px solid rgba(255, 170, 55, 0.92);
    border-radius: var(--ui-radius-tight);
    background: linear-gradient(180deg, rgba(255, 118, 0, 0.88), rgba(164, 43, 0, 0.92));
    color: #fff7df;
    font-family: var(--font-ctr);
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    box-shadow:
        inset 0 2px 0 rgba(255, 226, 164, 0.20),
        inset 0 -2px 0 rgba(92, 24, 0, 0.70),
        2px 2px 0 rgba(0, 0, 0, 0.34);
}

.recent-window {
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: stretch;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 116, 0, 0.90);
    border-radius: var(--ui-radius);
    background:
        linear-gradient(180deg, rgba(15, 17, 20, 0.92), rgba(8, 10, 13, 0.91)),
        radial-gradient(circle at 18% -30%, rgba(255, 112, 0, 0.20), transparent 46%);
    box-shadow:
        inset 0 2px 0 rgba(255, 188, 84, 0.12),
        inset 0 -2px 0 rgba(80, 22, 0, 0.68),
        5px 5px 0 rgba(0, 0, 0, 0.38);
}

.recent-window-heading {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0 9px 0 3px;
    border-right: 1px solid rgba(255, 126, 18, 0.28);
    text-transform: uppercase;
}

.recent-window-heading h2 {
    margin: 2px 0 0;
    color: #fff3df;
    font-family: var(--font-ctr);
    font-size: clamp(0.96rem, 1.35vw, 1.22rem);
    font-weight: 500;
    letter-spacing: 0.035em;
    line-height: 1;
    text-shadow: 0 2px 0 rgba(92, 29, 0, 0.74);
}

.recent-window-heading > strong {
    margin-top: 3px;
    color: #fff0d8;
    font-family: var(--font-ctr);
    font-size: 0.60rem;
    letter-spacing: 0.04em;
}

.recent-records-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 127, 21, 0.45) rgba(255, 255, 255, 0.04);
}

.recent-window > .empty-records {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding: 8px 12px;
}

.recent-record {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "context context"
        "racer racer"
        "result date";
    align-items: center;
    gap: 2px 6px;
    min-width: 0;
    min-height: 58px;
    padding: 5px 42px 5px 7px;
    border: 1px solid rgba(255, 126, 18, 0.34);
    border-radius: var(--ui-radius-tight);
    background:
        linear-gradient(90deg, rgba(84, 36, 8, 0.42), rgba(18, 18, 19, 0.89) 34%, rgba(11, 12, 14, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 220, 166, 0.06),
        2px 2px 0 rgba(0, 0, 0, 0.24);
}

.recent-platform-icon {
    position: absolute;
    top: 5px;
    right: 7px;
    height: 16px;
    max-width: 34px;
}

.recent-platform-icon.platform-icon-pc {
    max-width: 25px;
}

.recent-record:hover {
    border-color: rgba(255, 159, 55, 0.62);
    background:
        linear-gradient(90deg, rgba(100, 42, 7, 0.50), rgba(23, 21, 20, 0.92) 34%, rgba(13, 14, 16, 0.94));
}

.recent-context {
    grid-area: context;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.record-type-badge {
    display: inline-block;
    flex: 0 0 auto;
    margin: 0;
    padding: 2px 4px 1px;
    border: 1px solid currentColor;
    border-radius: var(--ui-radius-tight);
    font-family: var(--font-ctr-small);
    font-size: 0.44rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.05em;
}

.record-type-race {
    color: #ffad42;
}

.record-type-lap {
    color: #75cfff;
}

.record-type-relic {
    color: #f1d55d;
}

.recent-track-link,
.profile-track-link {
    display: block;
    max-width: 100%;
    padding: 0;
    border: 0;
    color: var(--track-accent, #fff2df);
    background: none;
    font-family: var(--font-ctr);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.recent-track-link:hover,
.profile-track-link:hover {
    color: #fff36a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.recent-racer {
    grid-area: racer;
    min-width: 0;
}

.recent-racer .racer-name {
    max-width: 100%;
    font-size: 0.64rem;
}

.recent-racer .racer-id {
    display: none;
}

.recent-result {
    grid-area: result;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    flex-wrap: wrap;
}

.recent-result .record-time {
    font-size: 0.67rem;
}

.recent-date {
    grid-area: date;
    text-align: right;
}

.record-date.recent-date {
    font-size: 0.43rem;
    line-height: 1.1;
    white-space: nowrap;
}

.recent-context .recent-track-link {
    display: inline-block;
    min-width: 0;
    font-size: 0.61rem;
}

.arrow-button,
.error-state button {
    border: 1px solid rgba(255, 177, 61, 0.92);
    background: linear-gradient(180deg, #ff7900, #c83a00);
    border-radius: var(--ui-radius-tight);
    box-shadow:
        inset 0 2px 0 rgba(255, 220, 160, 0.18),
        inset 0 -2px 0 rgba(89, 20, 0, 0.72),
        2px 2px 0 rgba(0, 0, 0, 0.34);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.arrow-button {
    width: 40px;
    height: 36px;
    font-size: 1.28rem;
    line-height: 1;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 10px;
}

.track-button {
    position: relative;
    min-height: 88px;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 10px 11px 10px 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 154, 42, 0.30);
    border-radius: var(--ui-radius);
    color: #f7e9d6;
    background: linear-gradient(180deg, rgba(37, 38, 43, 0.98), rgba(13, 14, 17, 0.99));
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.07),
        inset 0 -2px 0 rgba(0, 0, 0, 0.72),
        2px 2px 0 rgba(0, 0, 0, 0.34);
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.track-button::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--track-accent, var(--orange));
    opacity: 0.90;
}

.track-button::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--track-accent) 28%, transparent), transparent 70%);
    transition: opacity 0.15s ease;
}

.track-button:hover {
    transform: translate(-1px, -1px);
    border-color: rgba(255, 172, 65, 0.92);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.10),
        inset 0 -2px 0 rgba(0, 0, 0, 0.74),
        4px 4px 0 rgba(0, 0, 0, 0.36);
}

.track-button:hover::after,
.track-button.active::after {
    opacity: 1;
}

.track-button.active {
    color: #fff8ec;
    border-color: var(--track-accent, var(--orange));
    background: linear-gradient(180deg, rgba(112, 47, 9, 0.98), rgba(29, 18, 12, 0.99));
    box-shadow:
        inset 0 2px 0 rgba(255, 220, 142, 0.17),
        inset 0 -2px 0 rgba(60, 18, 0, 0.86),
        3px 3px 0 rgba(0, 0, 0, 0.42);
}

.track-button.active::before {
    width: 4px;
    opacity: 1;
}

.track-name {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 0.79rem;
    font-weight: 900;
    line-height: 1.12;
    font-family: var(--font-ctr);
    text-transform: uppercase;
    overflow-wrap: normal;
    word-break: normal;
}

.track-thumb {
    position: relative;
    z-index: 1;
    width: 76px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--track-accent) 72%, #ffd78f);
    border-radius: var(--ui-radius-tight);
    background: #08090b;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.12),
        inset 0 -2px 0 rgba(0, 0, 0, 0.66),
        2px 2px 0 rgba(0, 0, 0, 0.34);
    line-height: 0;
}

.track-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.12) contrast(1.05) brightness(1.05);
}

.track-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    align-self: stretch;
    flex-direction: column;
    justify-content: space-between;
    padding-block: 3px 1px;
}

.track-record-count {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin-top: 8px;
    color: #d8c4ae;
    font-family: var(--font-ctr);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.track-button.active .track-record-count {
    color: #fff06a;
}

.leaderboard-stage {
    min-height: 400px;
    margin-top: 24px;
}

.loading-state,
.error-state {
    min-height: 270px;
    display: grid;
    place-items: center;
    padding: 42px;
    border: 1px solid rgba(255, 112, 0, 0.82);
    border-radius: var(--ui-radius);
    background: rgba(13, 15, 18, 0.88);
    box-shadow:
        inset 0 2px 0 rgba(255, 188, 84, 0.10),
        inset 0 -2px 0 rgba(67, 18, 0, 0.72),
        var(--shadow);
    text-align: center;
}

.loading-state p,
.error-state p {
    color: var(--muted);
}

.loading-wheel {
    width: 48px;
    height: 48px;
    border: 5px dashed var(--orange);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.error-state strong {
    color: #ffd7ca;
    font-size: 1.15rem;
}

.error-state button {
    padding: 9px 16px;
    font-weight: 900;
}

.results-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.relic-panel {
    width: 100%;
}

.panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 112, 0, 0.96);
    border-radius: var(--ui-radius);
    background:
        linear-gradient(160deg, rgba(17, 19, 23, 0.92), rgba(8, 10, 13, 0.94)),
        radial-gradient(circle at 12% 0%, rgba(255, 103, 0, 0.22), transparent 36%);
    box-shadow:
        inset 0 2px 0 rgba(255, 187, 91, 0.10),
        inset 0 -2px 0 rgba(63, 17, 0, 0.78),
        5px 5px 0 rgba(0, 0, 0, 0.42);
}

.panel-header {
    min-height: 108px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px 15px;
    border-bottom: 1px solid rgba(255, 128, 0, 0.80);
    background:
        linear-gradient(90deg, rgba(109, 45, 9, 0.98), rgba(52, 27, 15, 0.96) 46%, rgba(19, 18, 19, 0.98) 74%),
        rgba(17, 18, 20, 0.96);
    box-shadow:
        inset 0 2px 0 rgba(255, 190, 88, 0.13),
        inset 0 -2px 0 rgba(75, 19, 0, 0.72);
}

.panel-header h2 {
    margin: 2px 0 2px;
    font-family: var(--font-ctr);
    font-size: clamp(1.9rem, 2.5vw, 2.55rem);
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.panel-header h3 {
    margin: 4px 0 0;
    color: #fff3df;
    font-family: var(--font-ctr);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-filter-group {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.panel-filter-button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 10px 5px;
    border: 1px solid rgba(255, 154, 42, 0.62);
    border-radius: var(--ui-radius-tight);
    color: #c9b8a4;
    background: linear-gradient(180deg, rgba(46, 39, 32, 0.98), rgba(17, 16, 15, 0.98));
    font-family: var(--font-ctr);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow:
        inset 0 2px 0 rgba(255, 204, 126, 0.08),
        inset 0 -2px 0 rgba(39, 18, 0, 0.74),
        2px 2px 0 rgba(0, 0, 0, 0.30);
    cursor: pointer;
}

.panel-filter-button:hover {
    border-color: #ffad42;
    color: #fff3de;
    transform: translate(-1px, -1px);
}

.panel-filter-button.active {
    border-color: #ffd13d;
    color: #fff36a;
    background: linear-gradient(180deg, rgba(111, 70, 5, 0.98), rgba(43, 30, 4, 0.98));
    box-shadow:
        inset 0 2px 0 rgba(255, 245, 151, 0.16),
        inset 0 -2px 0 rgba(57, 33, 0, 0.84),
        2px 2px 0 rgba(0, 0, 0, 0.34);
}

.panel-filter-button.fps-60.active {
    border-color: #75d85b;
    color: #9cf080;
    background: linear-gradient(180deg, rgba(36, 83, 24, 0.98), rgba(14, 37, 10, 0.98));
}

.panel-filter-button.fps-30.active {
    border-color: #e9ad39;
    color: #ffd05a;
    background: linear-gradient(180deg, rgba(100, 61, 10, 0.98), rgba(44, 27, 6, 0.98));
}

.table-wrap {
    width: 100%;
    max-height: 790px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 127, 21, 0.45) rgba(255, 255, 255, 0.04);
}

.records-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    table-layout: fixed;
}

.records-table thead {
    position: sticky;
    top: 0;
    z-index: 4;
}

.records-table th,
.records-table td {
    padding: 12px 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    vertical-align: middle;
}

.records-table th {
    color: #c6b6a5;
    background: rgba(15, 17, 20, 0.98);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.records-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.018);
}

.records-table tbody tr:hover {
    background: rgba(255, 126, 26, 0.055);
}

.records-table tbody tr:last-child td {
    border-bottom: 0;
}

.rank-col {
    width: 54px;
    text-align: center !important;
}

.character-col {
    width: 108px;
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.records-table th.character-col {
    overflow: visible;
    white-space: nowrap;
}

.time-col {
    width: 118px;
    text-align: right !important;
}

.platform-col {
    width: 96px;
    text-align: center !important;
}

.fps-col {
    width: 82px;
    text-align: center !important;
}

.date-col {
    width: 136px;
    text-align: right !important;
}

.rank-medal {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--ui-radius-tight);
    color: #b0a69c;
    background: linear-gradient(145deg, #282726, #151515);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.10),
        inset 0 -2px 0 rgba(0, 0, 0, 0.38),
        2px 2px 0 rgba(0, 0, 0, 0.24);
    font-size: 0.84rem;
    font-weight: 900;
}

tr[data-rank="1"] .rank-medal {
    color: #3e2600;
    background: linear-gradient(145deg, #fff19a, #e8a727);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 224, 0.48),
        inset 0 -2px 0 rgba(125, 78, 0, 0.46),
        2px 2px 0 rgba(0, 0, 0, 0.28);
}

tr[data-rank="2"] .rank-medal {
    color: #232323;
    background: linear-gradient(145deg, #f6f4ef, #aaa9a4);
}

tr[data-rank="3"] .rank-medal {
    color: #311706;
    background: linear-gradient(145deg, #efaa71, #9d5632);
}

.racer-name {
    display: block;
    max-width: 260px;
    overflow: hidden;
    color: #fff2df;
    font-family: var(--font-ctr);
    font-size: 0.93rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.racer-name-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.racer-name-row .racer-name {
    min-width: 0;
}

.country-flag {
    width: 24px;
    height: 18px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 239, 207, 0.72);
    border-radius: 1px;
    object-fit: cover;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.72);
}

.platform-icon {
    display: block;
    width: auto;
    height: 18px;
    max-width: 38px;
    flex: 0 0 auto;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.72));
}

.platform-icon-pc {
    max-width: 30px;
}

.platform-col .platform-icon {
    height: 22px;
    max-width: 44px;
    margin: 0 auto;
}

.platform-col .platform-icon-pc {
    max-width: 32px;
}

.profile-platform-icon {
    height: 20px;
    max-width: 40px;
    margin-left: 2px;
}

.profile-platform-icon.platform-icon-pc {
    max-width: 29px;
}

.racer-identity {
    display: block;
    min-width: 0;
}

.racer-link {
    text-decoration: none;
    cursor: pointer;
}

.racer-link:hover,
.racer-link:focus-visible {
    color: #fff36a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.racer-id {
    display: block;
    max-width: 260px;
    margin-top: 2px;
    overflow: hidden;
    color: #716a64;
    font-family: var(--font-ctr-small);
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.character-icon-frame {
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--char-color) 55%, #d9c7ae);
    border-radius: var(--ui-radius-tight);
    background: #111317;
    box-shadow:
        inset 0 2px 0 color-mix(in srgb, var(--char-color) 18%, rgba(255,255,255,.08)),
        inset 0 -2px 0 rgba(0, 0, 0, 0.74),
        2px 2px 0 rgba(0, 0, 0, 0.30);
}

.character-icon {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
    image-rendering: pixelated;
}

.character-icon-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--char-color);
    font-family: var(--font-ctr);
    font-size: 1.4rem;
}

.record-time {
    color: var(--yellow);
    font-family: var(--font-ctr);
    font-size: 0.98rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.fps-badge {
    display: inline-block;
    min-width: 58px;
    padding: 5px 6px 4px;
    border: 1px solid rgba(255, 183, 61, 0.72);
    border-radius: var(--ui-radius-tight);
    background: linear-gradient(180deg, rgba(56, 42, 15, 0.98), rgba(22, 18, 9, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 239, 178, 0.14),
        inset 0 -1px 0 rgba(51, 22, 0, 0.88),
        2px 2px 0 rgba(0, 0, 0, 0.34);
    font-family: var(--font-ctr-small);
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.fps-30 {
    color: #ffca4c;
}

.fps-60 {
    color: #8ee76f;
}

.record-date {
    display: inline-block;
    color: #92877d;
    font-family: var(--font-ctr-small);
    font-size: 0.65rem;
    line-height: 1.35;
    text-align: right;
    white-space: pre-line;
}

.empty-records {
    padding: 32px 20px;
    color: #8f8379;
    text-align: center;
    font-size: 0.78rem;
}

.rankings-content {
    width: 100%;
}

.rankings-panel {
    overflow: hidden;
}

.rankings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255, 128, 0, 0.80);
    background:
        linear-gradient(90deg, rgba(109, 45, 9, 0.98), rgba(52, 27, 15, 0.96) 46%, rgba(19, 18, 19, 0.98) 74%),
        rgba(17, 18, 20, 0.96);
    box-shadow:
        inset 0 2px 0 rgba(255, 190, 88, 0.13),
        inset 0 -2px 0 rgba(75, 19, 0, 0.72);
}

.rankings-header h2 {
    margin: 4px 0 2px;
    color: #fff6df;
    font-family: var(--font-ctr);
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(89, 28, 0, 0.74), 2px 3px 0 rgba(0, 0, 0, 0.28);
}

.rankings-header p {
    margin: 6px 0 0;
    color: #b7a18e;
    font-family: var(--font-ctr-small);
    font-size: 0.68rem;
}

.rankings-max-score {
    min-width: 120px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 166, 48, 0.58);
    border-radius: var(--ui-radius-tight);
    background: rgba(18, 17, 16, 0.78);
    text-align: center;
}

.rankings-max-score span {
    display: block;
    color: #ba9f87;
    font-family: var(--font-ctr-small);
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
}

.rankings-max-score strong {
    display: block;
    margin-top: 2px;
    color: #fff36a;
    font-family: var(--font-ctr);
    font-size: 1rem;
}

.rankings-table-wrap {
    max-height: none;
}

.rankings-table {
    min-width: 700px;
}

.ranking-score-col {
    width: 150px;
    text-align: right !important;
}

.ranking-count-col {
    width: 96px;
    text-align: center !important;
}

.ranking-score {
    color: var(--yellow);
    font-family: var(--font-ctr);
    font-size: 1rem;
    letter-spacing: 0.025em;
}

.profile-content {
    width: 100%;
}

.profile-panel {
    overflow: hidden;
}

.profile-toolbar {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 125, 14, 0.42);
    background: rgba(10, 11, 13, 0.90);
}

.profile-back-button {
    min-height: 32px;
    padding: 6px 10px 5px;
    border: 1px solid rgba(255, 164, 51, 0.68);
    border-radius: var(--ui-radius-tight);
    color: #f0c69a;
    background: linear-gradient(180deg, rgba(65, 43, 27, 0.98), rgba(24, 20, 17, 0.98));
    font-family: var(--font-ctr);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
}

.profile-back-button:hover {
    border-color: #ffbd4a;
    color: #fff36a;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255, 128, 0, 0.80);
    background:
        linear-gradient(90deg, rgba(109, 45, 9, 0.98), rgba(52, 27, 15, 0.96) 46%, rgba(19, 18, 19, 0.98) 74%),
        rgba(17, 18, 20, 0.96);
    box-shadow:
        inset 0 2px 0 rgba(255, 190, 88, 0.13),
        inset 0 -2px 0 rgba(75, 19, 0, 0.72);
}

.profile-header h2 {
    margin: 4px 0 2px;
    color: #fff6df;
    font-family: var(--font-ctr);
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(89, 28, 0, 0.74), 2px 3px 0 rgba(0, 0, 0, 0.28);
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-country-flag {
    width: 32px;
    height: 24px;
}

.profile-id {
    display: block;
    color: #a99684;
    font-family: var(--font-ctr-small);
    font-size: 0.72rem;
}

.profile-summary {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
}

.profile-stats {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-ranking {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    min-width: 276px;
    padding: 6px 10px;
    border-top: 1px solid rgba(255, 155, 43, 0.42);
    color: #ba9f87;
    font-family: var(--font-ctr-small);
    text-transform: uppercase;
}

.profile-ranking span {
    font-size: 0.58rem;
    font-weight: 900;
}

.profile-ranking strong {
    color: #fff36a;
    font-family: var(--font-ctr);
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.profile-stat {
    min-width: 84px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 155, 43, 0.54);
    border-radius: var(--ui-radius-tight);
    background: rgba(18, 17, 16, 0.76);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 218, 164, 0.06);
}

.profile-stat span {
    display: block;
    color: #ba9f87;
    font-family: var(--font-ctr-small);
    font-size: 0.56rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-stat strong {
    display: block;
    margin-top: 2px;
    color: #fff36a;
    font-family: var(--font-ctr);
    font-size: 1rem;
}

.profile-table-wrap {
    max-height: none;
}

.profile-records-table {
    min-width: 1020px;
}

.profile-records-table th,
.profile-records-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.profile-track-col {
    width: 260px;
}

.profile-track-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.profile-track-preview {
    flex: 0 0 auto;
    width: 52px;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--track-accent, #ff9b34) 55%, #d9c7ae);
    border-radius: var(--ui-radius-tight);
    background: #111317;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        2px 2px 0 rgba(0, 0, 0, 0.28);
}

.profile-track-link {
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.12;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.profile-result {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.profile-character {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
}

.profile-character .character-icon {
    width: 38px;
    height: 38px;
}

.profile-result-copy {
    min-width: 0;
}

.profile-result-time {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.profile-rank {
    display: inline-block;
    min-width: 30px;
    padding: 4px 5px 3px;
    border: 1px solid rgba(255, 184, 67, 0.58);
    border-radius: var(--ui-radius-tight);
    color: #e7b75e;
    background: rgba(45, 33, 16, 0.78);
    font-family: var(--font-ctr-small);
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.profile-rank-podium {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 38px;
    border-width: 1px;
    color: #fff;
    text-shadow:
        -1px 0 0 rgba(0, 0, 0, 0.82),
        1px 0 0 rgba(0, 0, 0, 0.82),
        0 -1px 0 rgba(0, 0, 0, 0.82),
        0 1px 0 rgba(0, 0, 0, 0.82);
    background-size: 220% 100%;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.34),
        inset 0 -2px 0 rgba(54, 27, 3, 0.42),
        2px 2px 0 rgba(0, 0, 0, 0.34);
    animation: profile-rank-metal-shift 2.8s linear infinite;
}

.profile-rank-podium::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -35%;
    bottom: -35%;
    left: -42%;
    width: 22%;
    transform: skewX(-18deg);
    background: rgba(255, 255, 255, 0.46);
    animation: profile-rank-shine 2.8s ease-in-out infinite;
}

.profile-rank-1 {
    border-color: #ffd75a;
    color: #fff8cf;
    background-image: linear-gradient(105deg, #9d5d05 0%, #e7a919 23%, #fff09a 45%, #e0a316 67%, #83500a 100%);
}

.profile-rank-2 {
    border-color: #e7e7e4;
    color: #ffffff;
    background-image: linear-gradient(105deg, #777977 0%, #bbbdbb 24%, #faf9f4 46%, #aaaead 68%, #626463 100%);
}

.profile-rank-3 {
    border-color: #d98a54;
    color: #ffe1ca;
    background-image: linear-gradient(105deg, #743716 0%, #b86431 24%, #f2b07b 46%, #a8542b 68%, #633017 100%);
}

@keyframes profile-rank-metal-shift {
    0% { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}

@keyframes profile-rank-shine {
    0%, 52% { left: -42%; opacity: 0; }
    58% { opacity: 0.78; }
    76% { left: 126%; opacity: 0; }
    100% { left: 126%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .profile-rank-podium,
    .profile-rank-podium::after {
        animation: none;
    }
}

.profile-result-date {
    margin-top: 3px;
    font-size: 0.58rem;
    text-align: left;
}

.profile-no-record {
    color: #5f5954;
    font-family: var(--font-ctr-small);
    font-size: 0.78rem;
}

.profile-empty-track {
    opacity: 0.48;
}

.profile-empty-track:hover {
    opacity: 0.72;
}

footer {
    padding: 20px 12px 30px;
    text-align: center;
    text-transform: uppercase;
}

.finish-line {
    width: min(540px, 82%);
    height: 5px;
    margin: 0 auto 14px;
    opacity: 0.5;
    background: repeating-linear-gradient(90deg, #b7b7b7 0 8px, #2b2b2b 8px 16px);
}

footer p {
    margin: 5px 0;
    color: #7d7772;
    font-size: 0.62rem;
    letter-spacing: 0.35em;
}

.footer-note {
    color: #595550;
    font-size: 0.54rem;
    letter-spacing: 0.12em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes flagBillow {
    from {
        transform: perspective(1400px) rotateX(3deg) rotateY(-3.5deg) rotateZ(-4.4deg) translate3d(-1.2%, -0.4%, 0) scale(1.16);
    }
    to {
        transform: perspective(1400px) rotateX(5.5deg) rotateY(1.2deg) rotateZ(-2.8deg) translate3d(1.2%, 0.5%, 0) scale(1.19);
    }
}

@keyframes flagFolds {
    from {
        background-position: -120px 0;
        opacity: 0.78;
    }
    to {
        background-position: 120px 0;
        opacity: 1;
    }
}

@keyframes flagGlowSweep {
    from {
        background-position: 150px 0;
        opacity: 0.50;
    }
    to {
        background-position: -150px 0;
        opacity: 0.80;
    }
}

@media (max-width: 1500px) {
    .track-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1380px) {
    .results-layout {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        max-height: 680px;
    }

    .records-table {
        min-width: 720px;
    }
}

@media (max-width: 1100px) {
    .track-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .records-table {
        min-width: 660px;
    }
}

@media (max-width: 1050px) {
    .table-wrap {
        max-height: 610px;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 18px, 1580px);
    }

    .hero {
        min-height: 215px;
        padding-inline: 18px;
    }

    .hero-actions {
        top: 4px;
        right: 4px;
        gap: 7px;
    }

    .refresh-button,
    .account-button {
        min-width: auto;
        padding: 8px 10px;
    }

    .refresh-button:not(.refreshing) .refresh-icon {
        margin: 0;
    }

    .status-wide {
        min-width: 0;
    }

    .leaderboard-view-tab {
        flex: 1 1 0;
        min-width: 0;
    }

    .track-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rankings-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rankings-max-score {
        min-width: 0;
        width: 140px;
    }

    .recent-window {
        grid-template-columns: 145px minmax(0, 1fr);
        gap: 6px;
    }

    .recent-window-heading {
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
        padding: 0 7px 0 2px;
        border-right: 1px solid rgba(255, 126, 18, 0.28);
        border-bottom: 0;
    }

    .recent-records-list {
        grid-template-columns: repeat(5, 180px);
    }

    .profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-summary {
        align-items: flex-start;
    }

    .profile-stats {
        justify-content: flex-start;
    }

    .profile-ranking {
        justify-content: flex-start;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .brand-logo-image {
        width: min(230px, 72vw);
    }

    .tagline {
        font-size: 0.66rem;
        letter-spacing: 0.08em;
    }

    .hero-actions {
        position: static;
        margin-top: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .refresh-button {
        margin-top: 0;
    }

    .status-strip {
        justify-content: stretch;
    }

    .status-item,
    .live-pill {
        flex: 1 1 45%;
        justify-content: center;
    }

    .status-wide {
        flex-basis: 100%;
    }

    .track-browser {
        padding: 14px 12px 16px;
    }

    .section-heading {
        align-items: center;
    }

    .track-controls {
        flex-direction: column;
        align-items: flex-end;
    }

    .leaderboard-view-tabs {
        gap: 4px;
        padding: 4px;
    }

    .leaderboard-view-tab {
        min-height: 36px;
        padding: 7px 8px 6px;
        font-size: 0.62rem;
    }

    .track-index {
        font-size: 0.6rem;
    }

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

    .recent-window {
        grid-template-columns: 125px minmax(0, 1fr);
        gap: 5px;
        padding: 7px 6px;
    }

    .recent-window-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        padding-right: 5px;
    }

    .recent-records-list {
        grid-template-columns: repeat(5, 170px);
    }

    .profile-header {
        padding: 18px 14px;
    }

    .rankings-header {
        padding: 18px 14px;
    }

    .profile-stat {
        min-width: 72px;
    }

    .profile-records-table {
        min-width: 900px;
    }

    .panel-header {
        padding-inline: 13px;
        align-items: flex-start;
        flex-direction: column;
    }

    .panel-filter-group {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .records-table {
        min-width: 610px;
    }

    footer p {
        letter-spacing: 0.22em;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .flag-grid {
        transform: perspective(1400px) rotateX(4deg) rotateY(-2deg) rotateZ(-4deg) scale(1.16);
    }
}
