:root {
    --bg: #06070f;
    --panel: rgba(17, 19, 39, .88);
    --panel-strong: rgba(23, 24, 49, .96);
    --line: rgba(206, 211, 255, .11);
    --line-strong: rgba(153, 132, 255, .32);
    --text: #f7f7ff;
    --muted: #9a9db9;
    --muted-strong: #bcc0d8;
    --purple: #8d73ff;
    --purple-bright: #ad9aff;
    --blue: #4ba8ff;
    --cyan: #55d7e8;
    --green: #63e6b4;
    --gold: #f2c66d;
    --danger: #ff718d;
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, .2);
    --shadow-md: 0 22px 70px rgba(0, 0, 0, .3);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
html {
    min-width: 320px;
    background: var(--bg);
    scrollbar-gutter: stable;
}
body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% -5%, rgba(112, 79, 255, .2), transparent 31rem),
        radial-gradient(circle at 92% 7%, rgba(52, 139, 255, .12), transparent 34rem),
        linear-gradient(180deg, #080916 0%, var(--bg) 58%, #070711 100%);
    color: var(--text);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: .2;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}
::selection {
    color: #fff;
    background: rgba(141, 115, 255, .55);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(141, 115, 255, .55) rgba(255, 255, 255, .04);
}
button,
input,
select {
    font: inherit;
}
a,
button,
input,
select {
    -webkit-tap-highlight-color: transparent;
}
.landing,
.portal-shell {
    position: relative;
    z-index: 1;
}
.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    background: #2a2454;
    box-shadow: var(--shadow-sm);
    transform: translateY(-160%);
}
.skip-link:focus {
    transform: translateY(0);
}
h1,
h2,
h3 {
    color: var(--text);
    letter-spacing: -.025em;
}
p {
    line-height: 1.65;
}
.eyebrow,
.status {
    margin-bottom: 10px;
    color: var(--purple-bright);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .19em;
    text-transform: uppercase;
}
.muted {
    color: var(--muted);
}
.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 17px;
    border: 1px solid rgba(157, 137, 255, .45);
    border-radius: var(--radius-sm);
    color: #fff;
    background: linear-gradient(135deg, #8064f5, #397fe7);
    box-shadow: 0 10px 28px rgba(72, 73, 221, .2), inset 0 1px rgba(255, 255, 255, .16);
    font-weight: 800;
    letter-spacing: -.01em;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}
.button:hover {
    border-color: rgba(190, 179, 255, .82);
    box-shadow: 0 14px 36px rgba(72, 73, 221, .3), inset 0 1px rgba(255, 255, 255, .2);
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.button:active {
    transform: translateY(0);
}
.button.secondary {
    border-color: var(--line);
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .045);
    box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}
.button.secondary:hover {
    border-color: var(--line-strong);
    color: #fff;
    background: rgba(141, 115, 255, .1);
}
.landing {
    isolation: isolate;
    min-height: 100svh;
    padding: 48px 24px;
}
.landing::before,
.landing::after {
    position: fixed;
    z-index: -1;
    width: min(42vw, 620px);
    aspect-ratio: 1;
    border-radius: 50%;
    content: "";
    filter: blur(100px);
    pointer-events: none;
}
.landing::before {
    top: -24%;
    left: -12%;
    background: rgba(117, 83, 255, .22);
}
.landing::after {
    right: -18%;
    bottom: -36%;
    background: rgba(54, 141, 255, .14);
}
.login-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: min(660px, 100%);
    padding: clamp(32px, 7vw, 64px);
    border: 1px solid rgba(156, 134, 255, .32);
    border-radius: 32px;
    background:
        radial-gradient(circle at 100% 0, rgba(78, 144, 255, .14), transparent 38%),
        linear-gradient(145deg, rgba(24, 22, 53, .96), rgba(10, 11, 27, .96));
    box-shadow: 0 40px 120px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .08);
    backdrop-filter: blur(22px);
}
.login-card::before {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 12%;
    width: 76%;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(195, 183, 255, .8), transparent);
}
.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
    color: var(--muted-strong);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
}
.sigil {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 22px;
    place-items: center;
    border: 1px solid rgba(181, 162, 255, .42);
    border-radius: 18px;
    color: #d2c8ff;
    background: linear-gradient(145deg, rgba(137, 102, 255, .35), rgba(57, 126, 229, .24));
    box-shadow: 0 18px 50px rgba(87, 65, 198, .28), inset 0 1px rgba(255, 255, 255, .14);
    font-size: 1.75rem;
}
.login-card h1 {
    margin-bottom: 14px;
    font-size: clamp(2.35rem, 7vw, 4.2rem);
    line-height: .98;
    letter-spacing: -.055em;
}
.login-card > .muted,
.login-card > p:not(.eyebrow, .status, .landing-note) {
    max-width: 500px;
    margin-right: auto;
    margin-bottom: 26px;
    margin-left: auto;
    color: var(--muted-strong);
    font-size: 1.02rem;
}
.landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin: 30px 0;
    text-align: left;
}
.landing-features span {
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 13px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .032);
    font-size: .75rem;
    line-height: 1.35;
}
.landing-features b {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: .78rem;
}
.landing-note {
    margin: 18px 0 0;
    color: #777b99;
    font-size: .7rem;
}
.login-card.state-card {
    max-width: 560px;
}
.portal-shell {
    grid-template-columns: 258px minmax(0, 1fr);
}
.sidebar {
    z-index: 20;
    width: 258px;
    padding: 25px 17px;
    border-color: rgba(255, 255, 255, .075);
    background:
        radial-gradient(circle at 10% 0, rgba(127, 89, 255, .17), transparent 18rem),
        linear-gradient(180deg, rgba(12, 12, 28, .98), rgba(8, 9, 20, .98));
    box-shadow: 20px 0 70px rgba(0, 0, 0, .16);
}
.brand {
    position: relative;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    margin: 0 8px 34px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
}
.brand span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(170, 150, 255, .38);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(135, 98, 255, .32), rgba(55, 128, 226, .2));
    box-shadow: 0 12px 35px rgba(70, 54, 165, .24);
    font-size: 1.1rem;
}
.brand strong {
    font-size: 1.08rem;
    letter-spacing: -.02em;
}
.brand small {
    color: #8588a5;
}
.sidebar nav {
    display: grid;
    gap: 3px;
}
.nav-link {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 12px 14px 12px 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #9295b0;
    font-size: .86rem;
    font-weight: 650;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.nav-link::before {
    position: absolute;
    top: 50%;
    left: 7px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    content: "";
    background: transparent;
    transform: translateY(-50%);
}
.nav-link:hover {
    color: #e3e4f4;
    background: rgba(255, 255, 255, .035);
    transform: translateX(2px);
}
.nav-link.active {
    border-color: rgba(147, 124, 255, .2);
    color: #fff;
    background: linear-gradient(90deg, rgba(122, 91, 246, .2), rgba(55, 126, 228, .07));
    box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}
.nav-link.active::before {
    background: var(--purple-bright);
    box-shadow: 0 0 10px var(--purple);
}
.sidebar-foot {
    right: 24px;
    bottom: 23px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777b96;
}
.sidebar-foot::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    content: "";
    background: var(--green);
    box-shadow: 0 0 10px rgba(99, 230, 180, .7);
}
.workspace {
    position: relative;
}
.topbar {
    z-index: 15;
    height: 76px;
    padding: 0 clamp(18px, 3vw, 38px);
    border-color: rgba(255, 255, 255, .075);
    background: rgba(7, 8, 18, .76);
    box-shadow: 0 10px 36px rgba(0, 0, 0, .14);
    backdrop-filter: blur(22px) saturate(1.25);
}
.topbar-context {
    display: flex !important;
    align-items: center;
    gap: 12px;
}
.topbar-context strong {
    font-size: .9rem;
    letter-spacing: -.01em;
}
.division-switcher {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    gap: 3px;
    padding: 4px;
    border: 1px solid rgba(151, 139, 207, .18);
    border-radius: 14px;
    background: rgba(16, 16, 35, .82);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 10px 30px rgba(0, 0, 0, .18);
    transform: translate(-50%, -50%);
}
.division-tab {
    display: grid;
    min-width: 118px;
    gap: 1px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #9295ae;
    text-align: center;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.division-tab small {
    color: #6f738d;
    font-size: .51rem;
    font-weight: 850;
    letter-spacing: .12em;
}
.division-tab span {
    font-size: .76rem;
    font-weight: 800;
}
.division-tab:hover {
    color: #ebeaff;
    background: rgba(255, 255, 255, .035);
}
.division-tab.active {
    border-color: rgba(140, 112, 255, .32);
    color: #fff;
    background: linear-gradient(135deg, rgba(123, 86, 244, .28), rgba(54, 122, 226, .13));
    box-shadow: 0 5px 18px rgba(80, 58, 171, .18);
}
.division-tab.tensura.active {
    border-color: rgba(80, 215, 207, .28);
    background: linear-gradient(135deg, rgba(96, 76, 210, .24), rgba(55, 190, 180, .14));
    box-shadow: 0 5px 18px rgba(37, 149, 143, .13);
}
.division-tab.active small {
    color: #aaa1dc;
}
.division-tab.tensura.active small {
    color: #72d8d1;
}
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid rgba(99, 230, 180, .2);
    border-radius: 99px;
    color: #8aebc6;
    background: rgba(99, 230, 180, .065);
    font-size: .6rem;
    font-weight: 850;
    letter-spacing: .09em;
}
.live-pill i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}
.identity {
    gap: 11px;
}
.identity > span:nth-child(2) {
    gap: 1px;
}
.identity b {
    font-size: .79rem;
}
.identity small {
    color: #8589a4;
    font-size: .68rem;
}
.avatar {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(190, 178, 255, .36);
    box-shadow: 0 8px 22px rgba(76, 63, 173, .22), inset 0 1px rgba(255, 255, 255, .12);
}
.text-button {
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #8e92ad;
    font-size: .72rem;
    font-weight: 700;
}
.text-button:hover {
    border-color: var(--line);
    color: #fff;
    background: rgba(255, 255, 255, .045);
}
.menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .04);
}
.content {
    width: 100%;
    max-width: 1620px;
    padding: clamp(25px, 3.2vw, 48px);
}
.page-heading {
    gap: 24px;
    margin-bottom: 30px;
}
.page-heading h1 {
    margin-bottom: 7px;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
    letter-spacing: -.05em;
}
.page-heading .muted {
    max-width: 720px;
    margin-bottom: 0;
}
#refresh-data::before {
    content: "↻";
    font-size: 1rem;
}
.warning {
    padding: 14px 17px;
    border-color: rgba(242, 198, 109, .28);
    border-radius: 13px;
    color: #f3d69a;
    background: rgba(242, 198, 109, .075);
    box-shadow: var(--shadow-sm);
}
.updated {
    margin-top: 18px;
    color: #727691;
    letter-spacing: .02em;
}
/* Cards and information hierarchy */
.stat-card,
.panel,
.member-card,
.leaderboard-panel,
.hq-panel,
.hq-profile,
.hq-status article,
.global-panel,
.global-widget-grid article,
.achievement-card,
.season-history-card {
    border-color: var(--line);
    background: linear-gradient(145deg, rgba(23, 23, 49, .9), rgba(10, 12, 28, .88));
    box-shadow: var(--shadow-sm), inset 0 1px rgba(255, 255, 255, .035);
    backdrop-filter: blur(12px);
}
.panel,
.stat-card,
.member-card,
.hq-panel,
.global-panel {
    border-radius: var(--radius-md);
}
.panel {
    padding: clamp(19px, 2vw, 26px);
}
.panel h2,
.panel-title h2,
.hq-panel h2,
.global-panel h2 {
    letter-spacing: -.035em;
}
.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    padding: 20px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.stat-card::before {
    position: absolute;
    top: 0;
    left: 20px;
    width: 38px;
    height: 2px;
    border-radius: 99px;
    content: "";
    background: linear-gradient(90deg, var(--purple), var(--blue));
    box-shadow: 0 0 13px rgba(141, 115, 255, .72);
}
.stat-card:hover,
.member-card:hover {
    border-color: rgba(149, 128, 255, .38);
    box-shadow: var(--shadow-md), inset 0 1px rgba(255, 255, 255, .05);
    transform: translateY(-2px);
}
.stat-card strong {
    margin: 9px 0 5px;
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    letter-spacing: -.045em;
}
.stat-card > span,
.stat-card small {
    color: #8f93ae;
    letter-spacing: .015em;
}
.stats-grid,
.feature-grid,
.split,
.chart-grid,
.member-grid,
.insight-grid,
.difference-grid,
.compare-grid {
    gap: 16px;
}
.rank-chip,
.top24 {
    padding: 6px 10px;
    border: 1px solid rgba(151, 129, 255, .2);
    color: #c2b5ff;
    background: rgba(132, 101, 255, .1);
    letter-spacing: .025em;
}
.progress,
.global-progress,
.hq-progress {
    border: 1px solid rgba(255, 255, 255, .035);
    background: rgba(255, 255, 255, .055);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .2);
}
.progress span,
.global-progress span,
.hq-progress span {
    background: linear-gradient(90deg, var(--purple), var(--blue), var(--cyan));
    box-shadow: 0 0 16px rgba(105, 111, 255, .52);
}
.inline-link,
.panel-title a,
.hq-panel header > a,
.global-panel a {
    color: #9cc7ff;
    font-weight: 700;
}
.inline-link:hover,
.panel-title a:hover,
.hq-panel header > a:hover {
    color: #d2e7ff;
}
.member-row,
.leaderboard-entry,
.hq-member-line,
.activity > div,
.hq-activity li,
.history-table > div {
    border-color: rgba(255, 255, 255, .065);
}
.member-row,
.leaderboard-entry,
.hq-member-line {
    transition: background 150ms ease, transform 150ms ease;
}
.member-row:hover,
.leaderboard-entry:hover,
.hq-member-line:hover {
    background: rgba(141, 115, 255, .065);
}
.member-row.me,
.leaderboard-entry.signed-in {
    background: linear-gradient(90deg, rgba(121, 91, 245, .14), rgba(55, 126, 227, .045));
}
.member-card {
    padding: 19px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.member-card h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.roblox-avatar,
.member-card > i,
.member-name > i,
.large-avatar {
    border: 1px solid rgba(186, 174, 255, .28);
    box-shadow: 0 8px 24px rgba(70, 57, 169, .2), inset 0 1px rgba(255, 255, 255, .12);
}
.controls input,
.controls select,
.compare-controls select,
.leaderboard-toolbar input {
    min-height: 44px;
    border-color: var(--line);
    color: #f4f4ff;
    background: rgba(9, 10, 24, .78);
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, .22);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.controls input:hover,
.controls select:hover,
.compare-controls select:hover,
.leaderboard-toolbar input:hover {
    border-color: rgba(151, 132, 255, .3);
}
.controls input:focus,
.controls select:focus,
.compare-controls select:focus,
.leaderboard-toolbar input:focus {
    border-color: rgba(159, 141, 255, .7);
    background: rgba(12, 13, 30, .94);
    box-shadow: 0 0 0 3px rgba(141, 115, 255, .11);
}
.loading-card,
.error-card {
    min-height: 390px;
    border-color: var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(19, 19, 41, .86), rgba(9, 10, 23, .86));
    box-shadow: var(--shadow-sm), inset 0 1px rgba(255, 255, 255, .035);
}
.skeleton-stack i {
    background: linear-gradient(90deg, rgba(255, 255, 255, .025), rgba(151, 128, 255, .1), rgba(255, 255, 255, .025));
    background-size: 200%;
}
.empty,
.empty-state,
.chart-empty,
.hq-empty {
    color: #888ca7;
}
.chart-card {
    overflow: hidden;
    height: 350px;
    min-height: 350px;
}
.chart-card canvas {
    min-height: 260px;
}
.heat-cell {
    border-color: rgba(255, 255, 255, .07);
    box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}
.badge,
.achievement-card,
.season-history-card {
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}
.badge:hover,
.achievement-card:hover,
.season-history-card:hover {
    border-color: rgba(151, 130, 255, .4);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* Page-specific refinement */
.hq-ready {
    gap: 16px;
}
.hq-hero,
.global-analytics-hero,
.member-id-card {
    border-color: rgba(151, 129, 255, .28);
    box-shadow: var(--shadow-md), inset 0 1px rgba(255, 255, 255, .055);
}
.hq-hero {
    background:
        radial-gradient(circle at 83% 15%, rgba(58, 145, 255, .17), transparent 38%),
        radial-gradient(circle at 7% -4%, rgba(141, 103, 255, .22), transparent 42%),
        linear-gradient(145deg, rgba(24, 22, 53, .96), rgba(9, 10, 25, .96));
}
.hq-hero h2,
.global-analytics-hero h2 {
    text-wrap: balance;
}
.hq-sync,
.hq-quick-nav a,
.global-top10-row,
.global-milestone,
.global-milestone-progress {
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .032);
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.hq-quick-nav a:hover,
.hq-quick-nav a:focus-visible {
    border-color: rgba(143, 122, 255, .42);
    background: rgba(126, 96, 246, .08);
    box-shadow: var(--shadow-sm);
}
.leaderboard-toolbar {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(12, 13, 29, .72);
    box-shadow: var(--shadow-sm);
}
.leaderboard-tabs button {
    min-height: 42px;
    border-color: var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .035);
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.leaderboard-tabs button:hover {
    color: #fff;
    border-color: rgba(145, 124, 255, .3);
    transform: translateY(-1px);
}
.leaderboard-tabs button[aria-selected="true"] {
    border-color: rgba(151, 129, 255, .5);
    background: linear-gradient(135deg, rgba(121, 94, 241, .27), rgba(56, 124, 229, .13));
    box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}
.leaderboard-panel {
    padding: 12px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}
.member-id-card {
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--rank-accent) 24%, transparent), transparent 42%),
        linear-gradient(145deg, color-mix(in srgb, var(--rank-accent) 15%, #17172f), #090a18 72%);
}
.member-id-card dl div {
    border-color: rgba(255, 255, 255, .09);
    background: rgba(5, 6, 16, .35);
    box-shadow: inset 0 1px rgba(255, 255, 255, .03);
}
.global-analytics-hero,
.global-panel,
.global-widget-grid article,
.global-empty {
    background: linear-gradient(145deg, rgba(20, 23, 47, .93), rgba(8, 11, 27, .93));
}
.global-top10-row.nazamiru {
    background: linear-gradient(90deg, rgba(121, 88, 255, .24), rgba(54, 132, 235, .09));
    outline-color: rgba(154, 132, 255, .48);
}
.achievement-card.locked,
.badge.locked {
    opacity: .58;
}
.gain,
.positive {
    color: var(--green) !important;
}
.negative,
.denied {
    color: var(--danger) !important;
}

@media (max-width: 1200px) {
    .portal-shell {
        grid-template-columns: 238px minmax(0, 1fr);
    }
    .sidebar {
        width: 238px;
    }
    .content {
        padding: 30px;
    }
}
@media (max-width: 1050px) {
    .division-switcher {
        left: 57%;
    }
    .stats-grid.extended {
        grid-template-columns: repeat(2, 1fr);
    }
    .member-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 800px) {
    body::before {
        background-size: 48px 48px;
    }
    .portal-shell {
        display: block;
    }
    .sidebar {
        width: min(286px, 86vw);
        padding-bottom: 72px;
        box-shadow: 30px 0 90px rgba(0, 0, 0, .55);
    }
    .drawer-scrim.show {
        background: rgba(2, 3, 10, .7);
        backdrop-filter: blur(5px);
    }
    .topbar {
        height: 68px;
        padding: 0 14px;
    }
    .division-switcher {
        position: static;
        flex: 1;
        max-width: 280px;
        margin-left: 10px;
        transform: none;
    }
    .division-tab {
        min-width: 0;
        flex: 1;
        padding: 7px 9px;
    }
    .identity {
        margin-left: 10px;
    }
    .identity > span:nth-child(2) {
        display: none;
    }
    .content {
        padding: 24px 14px 36px;
    }
    .page-heading {
        align-items: flex-start;
        margin-bottom: 22px;
    }
    .page-heading h1 {
        font-size: clamp(1.9rem, 9vw, 2.7rem);
    }
    .stats-grid,
    .stats-grid.extended,
    .feature-grid,
    .split,
    .chart-grid,
    .insight-grid,
    .difference-grid,
    .compare-grid {
        grid-template-columns: 1fr;
    }
    .member-grid {
        grid-template-columns: 1fr;
    }
    .chart-card {
        height: 365px;
        min-height: 365px;
    }
    .leaderboard-toolbar {
        padding: 12px;
    }
    .leaderboard-panel {
        padding: 8px 10px;
    }
}
@media (max-width: 520px) {
    .division-switcher {
        max-width: 214px;
        margin-left: 6px;
    }
    .division-tab {
        padding: 8px 7px;
    }
    .division-tab small {
        display: none;
    }
    .division-tab span {
        font-size: .7rem;
    }
    .identity {
        margin-left: 6px;
    }
    .identity .avatar {
        width: 32px;
        height: 32px;
    }
}
@media (max-width: 560px) {
    .landing {
        padding: 20px 14px;
    }
    .login-card {
        padding: 32px 20px;
        border-radius: 24px;
    }
    .landing-brand {
        margin-bottom: 26px;
    }
    .landing-features {
        grid-template-columns: 1fr;
    }
    .login-card .button {
        width: 100%;
    }
    .page-heading {
        display: grid;
    }
    .page-heading .button {
        width: 100%;
    }
    .stat-card {
        min-height: 104px;
    }
    .panel {
        padding: 17px;
    }
    .leaderboard-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .leaderboard-tabs button {
        width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .button:hover,
    .stat-card:hover,
    .member-card:hover,
    .nav-link:hover,
    .badge:hover,
    .achievement-card:hover,
    .season-history-card:hover {
        transform: none;
    }
}
@media (prefers-contrast: more) {
    :root {
        --line: rgba(230, 232, 255, .28);
        --muted: #bfc2d7;
    }
    .nav-link,
    .button.secondary,
    .text-button {
        color: #d4d6e7;
    }
}

/* 2026 unified command-center refinement */
.portal-shell {
    --division-accent: #9a7cff;
    --division-accent-rgb: 154, 124, 255;
    --division-accent-2: #4ba8ff;
    grid-template-columns: 276px minmax(0, 1fr);
}
.portal-shell[data-page="tensura-analytics"] {
    --division-accent: #5ce0d4;
    --division-accent-rgb: 92, 224, 212;
    --division-accent-2: #6b8cff;
}
.landing {
    padding: 42px 24px;
}
.login-card {
    width: min(760px, 100%);
}
.landing-divisions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
    align-items: center;
    margin: 28px 0 8px;
}
.landing-division {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .085);
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, .035);
    text-align: left;
}
.landing-division.primary {
    border-color: rgba(154, 124, 255, .26);
    background: linear-gradient(135deg, rgba(137, 92, 255, .13), rgba(75, 168, 255, .045));
}
.landing-division.secondary {
    border-color: rgba(92, 224, 212, .2);
    background: linear-gradient(135deg, rgba(92, 224, 212, .08), rgba(93, 113, 238, .055));
}
.landing-division i {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 12px;
    color: #e8e3ff;
    background: rgba(255, 255, 255, .055);
    font-size: .85rem;
    font-style: normal;
    font-weight: 900;
}
.landing-division.secondary i {
    color: #a6f4ed;
}
.landing-division b,
.landing-division small {
    display: block;
}
.landing-division b {
    overflow: hidden;
    font-size: .86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.landing-division small {
    margin-top: 3px;
    color: #898da7;
    font-size: .67rem;
    font-weight: 600;
}
.landing-link {
    height: 1px;
    background: linear-gradient(90deg, rgba(154, 124, 255, .5), rgba(92, 224, 212, .45));
}
.sidebar {
    width: 276px;
    overflow-y: auto;
    padding: 22px 16px 104px;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar {
    display: none;
}
.brand {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    margin: 0 6px 25px;
    padding: 4px 3px 22px;
}
.brand .brand-mark {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    border-color: rgba(var(--division-accent-rgb), .4);
    color: #fff;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .19), transparent 44%),
        linear-gradient(145deg, rgba(var(--division-accent-rgb), .45), rgba(55, 104, 216, .2));
    box-shadow: 0 12px 35px rgba(var(--division-accent-rgb), .18), inset 0 1px rgba(255, 255, 255, .13);
    font-size: .9rem;
    font-weight: 900;
}
.brand strong {
    align-self: end;
    font-size: 1.12rem;
}
.brand small {
    align-self: start;
    color: color-mix(in srgb, var(--division-accent) 58%, #777b96);
    font-size: .56rem;
    font-weight: 850;
    letter-spacing: .13em;
}
.nav-section {
    margin: 0 10px 9px;
    color: #676b83;
    font-size: .56rem;
    font-weight: 850;
    letter-spacing: .15em;
}
.sidebar nav {
    gap: 4px;
}
.nav-link {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 7px 11px;
    border-radius: 13px;
}
.nav-link::before {
    display: none;
}
.nav-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 10px;
    color: #8589a5;
    background: rgba(255, 255, 255, .025);
    font-size: .8rem;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.nav-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}
.nav-copy b {
    overflow: hidden;
    font-size: .78rem;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-copy small {
    overflow: hidden;
    color: #696d86;
    font-size: .61rem;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-link:hover {
    transform: translateX(1px);
}
.nav-link:hover .nav-icon {
    border-color: rgba(var(--division-accent-rgb), .24);
    color: #d9d4ec;
    background: rgba(var(--division-accent-rgb), .07);
}
.nav-link.active {
    border-color: rgba(var(--division-accent-rgb), .25);
    background: linear-gradient(90deg, rgba(var(--division-accent-rgb), .19), rgba(55, 126, 228, .045));
}
.nav-link.active .nav-icon {
    border-color: rgba(var(--division-accent-rgb), .42);
    color: #fff;
    background: rgba(var(--division-accent-rgb), .15);
    box-shadow: 0 7px 18px rgba(var(--division-accent-rgb), .12);
}
.nav-link.active .nav-copy small {
    color: color-mix(in srgb, var(--division-accent) 62%, #878ba5);
}
.sidebar-foot {
    right: 16px;
    bottom: 18px;
    left: 16px;
    display: flex;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 13px;
    background: rgba(255, 255, 255, .025);
}
.sidebar-foot::before {
    display: none;
}
.sidebar-foot > i {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 11px rgba(99, 230, 180, .72);
}
.sidebar-foot span {
    display: grid;
    gap: 2px;
}
.sidebar-foot b {
    color: #b8bbcf;
    font-size: .68rem;
}
.sidebar-foot small {
    color: #656980;
    font-size: .59rem;
}
.topbar {
    height: 78px;
}
.topbar-context > span:first-child {
    display: grid;
    gap: 2px;
}
.topbar-context > span:first-child small {
    color: #6d718a;
    font-size: .59rem;
    font-weight: 650;
}
.content {
    width: min(100%, 1660px);
    max-width: none;
    padding: clamp(26px, 3vw, 46px);
}
.page-heading {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 106px;
    margin-bottom: 25px;
    padding: 8px 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
}
.page-heading::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: min(220px, 34vw);
    height: 1px;
    content: "";
    background: linear-gradient(90deg, var(--division-accent), transparent);
    box-shadow: 0 0 16px rgba(var(--division-accent-rgb), .28);
}
.page-index {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(var(--division-accent-rgb), .24);
    border-radius: 17px;
    color: color-mix(in srgb, var(--division-accent) 74%, #fff);
    background: rgba(var(--division-accent-rgb), .075);
    box-shadow: inset 0 1px rgba(255, 255, 255, .055);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
}
.page-title-block {
    min-width: 0;
}
.page-title-block .eyebrow {
    margin-bottom: 6px;
    color: color-mix(in srgb, var(--division-accent) 88%, #fff);
}
.page-heading h1 {
    margin: 0;
    font-size: clamp(2.15rem, 3.4vw, 3.7rem);
    line-height: 1;
    letter-spacing: -.055em;
}
.page-heading .muted {
    max-width: 850px;
    margin: 9px 0 0;
    line-height: 1.45;
}
.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.readonly-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(99, 230, 180, .13);
    border-radius: 999px;
    color: #7d9f95;
    background: rgba(99, 230, 180, .04);
    font-size: .55rem;
    font-weight: 850;
    letter-spacing: .08em;
    white-space: nowrap;
}
.readonly-pill i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #63e6b4;
    box-shadow: 0 0 8px rgba(99, 230, 180, .62);
}
.page-actions .button {
    white-space: nowrap;
}
.warning {
    position: relative;
    padding-left: 44px;
    border-radius: 14px;
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}
.warning::before {
    position: absolute;
    top: 50%;
    left: 17px;
    content: "!";
    color: var(--gold);
    font-size: .8rem;
    font-weight: 900;
    transform: translateY(-50%);
}
.stat-card,
.panel,
.member-card,
.leaderboard-panel,
.tc-panel,
.tc-stat,
.tc-capacity {
    position: relative;
    isolation: isolate;
}
.stat-card::before,
.panel::before,
.member-card::before {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 18px;
    width: 44px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, var(--division-accent), transparent);
    opacity: .75;
}
.stat-card {
    min-height: 118px;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .14), inset 0 1px rgba(255, 255, 255, .035);
}
.stat-card:hover {
    border-color: rgba(var(--division-accent-rgb), .24);
    transform: translateY(-2px);
}
.panel,
.leaderboard-panel {
    border-radius: 20px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .15), inset 0 1px rgba(255, 255, 255, .03);
}
.panel h2,
.tc-panel h2 {
    letter-spacing: -.035em;
}
.controls,
.leaderboard-toolbar,
.compare-controls {
    backdrop-filter: blur(14px);
}
.controls input,
.controls select,
.leaderboard-toolbar input,
.compare-controls select,
.tc-roster input {
    accent-color: var(--division-accent);
}
.member-card:hover,
.leaderboard-entry:hover,
.member-row:hover {
    border-color: rgba(var(--division-accent-rgb), .2);
}
.updated {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 18px;
}
.updated::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    content: "";
    background: #5c6078;
}
.tensura-clan-page .tc-hero,
.tensura-clan-page .tc-panel,
.tensura-clan-page .tc-stat,
.tensura-clan-page .tc-capacity {
    border-color: rgba(var(--division-accent-rgb), .16);
}
.tensura-clan-page .tc-hero {
    background:
        radial-gradient(circle at 85% 0, rgba(92, 224, 212, .13), transparent 38%),
        radial-gradient(circle at 0 0, rgba(118, 89, 246, .18), transparent 43%),
        linear-gradient(145deg, rgba(18, 17, 40, .97), rgba(7, 21, 35, .96));
}
.tensura-clan-page .eyebrow {
    color: #8be9e1;
}
.tensura-clan-page .tc-roster thead th {
    position: sticky;
    z-index: 2;
    top: 0;
    background: #0c1022;
}
.tensura-clan-page [id^="tensura-"] {
    scroll-margin-top: 104px;
}

@media (max-width: 1280px) {
    .portal-shell {
        grid-template-columns: 254px minmax(0, 1fr);
    }
    .sidebar {
        width: 254px;
    }
    .nav-link {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 8px;
        padding-right: 8px;
        padding-left: 8px;
    }
    .readonly-pill {
        display: none;
    }
}
@media (max-width: 920px) {
    .portal-shell {
        display: block;
    }
    .sidebar {
        position: fixed;
        z-index: 30;
        top: 0;
        left: 0;
        width: min(292px, 88vw);
        transform: translateX(-105%);
        transition: transform 190ms ease;
    }
    .sidebar.open {
        transform: none;
    }
    .menu-toggle {
        display: grid;
        flex: 0 0 auto;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 11px;
        background: rgba(255, 255, 255, .035);
    }
    .drawer-scrim.show {
        position: fixed;
        z-index: 25;
        inset: 0;
        display: block;
    }
    .topbar-context {
        display: none !important;
    }
    .division-switcher {
        position: static;
        flex: 1;
        max-width: 294px;
        margin-right: auto;
        margin-left: 10px;
        transform: none;
    }
    .content {
        padding: 25px 18px 40px;
    }
}
@media (max-width: 700px) {
    .page-heading {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }
    .page-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
    .page-heading .button {
        width: auto;
    }
    .identity form,
    .identity > span:nth-child(2) {
        display: none;
    }
    .landing-features {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .landing {
        padding: 14px;
    }
    .login-card {
        padding: 30px 18px;
    }
    .landing-divisions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .landing-link {
        width: 1px;
        height: 15px;
        margin-left: 32px;
        background: linear-gradient(180deg, rgba(154, 124, 255, .5), rgba(92, 224, 212, .45));
    }
    .topbar {
        height: 66px;
    }
    .division-switcher {
        max-width: none;
    }
    .page-heading {
        gap: 12px;
        min-height: 0;
        padding-top: 0;
    }
    .page-index {
        width: 43px;
        height: 43px;
        border-radius: 13px;
        font-size: .62rem;
    }
    .page-heading h1 {
        font-size: clamp(1.95rem, 10vw, 2.7rem);
    }
    .page-heading .muted {
        font-size: .82rem;
    }
    .page-actions,
    .page-actions .button {
        width: 100%;
    }
    .page-actions .button {
        justify-content: center;
    }
    .content {
        padding: 20px 12px 34px;
    }
    .stat-card,
    .panel,
    .member-card {
        border-radius: 17px;
    }
}
