:root {
    color-scheme: dark;
    --bg: #090b12;
    --panel: rgba(18, 22, 36, 0.82);
    --panel-solid: #121624;
    --card: rgba(255, 255, 255, 0.075);
    --card-strong: rgba(255, 255, 255, 0.12);
    --text: #f7f8ff;
    --muted: #9aa5bd;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #7367ff;
    --accent-2: #00d4ff;
    --green: #35d07f;
    --yellow: #ffd166;
    --red: #ff5c7a;
    --heat-color: #6d5dfc;
    --heat-color-1: #ffd6d6;
    --heat-color-2: #ffb3b3;
    --heat-color-3: #ff8f8f;
    --heat-color-4: #ff6f6f;
    --heat-color-5: #ff5252;
    --heat-color-6: #ff3333;
    --heat-color-7: #ff1919;
    --stats-text-color: #10131f;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(115, 103, 255, 0.34), transparent 34rem),
        radial-gradient(circle at 86% 18%, rgba(0, 212, 255, 0.22), transparent 30rem),
        linear-gradient(135deg, #080a12, #101423 48%, #080a12);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.orb {
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.55;
}

.orb-one {
    width: 18rem;
    height: 18rem;
    left: -5rem;
    top: 18rem;
    background: rgba(115, 103, 255, 0.22);
}

.orb-two {
    width: 15rem;
    height: 15rem;
    right: -4rem;
    bottom: 8rem;
    background: rgba(53, 208, 127, 0.16);
}

.shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: stretch;
}

.hero h1,
.panel h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(2.6rem, 7vw, 5.6rem);
    line-height: 0.92;
}

.hero-text {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.auth-badge {
    align-self: start;
    display: grid;
    gap: 6px;
    min-width: 240px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.auth-badge span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-badge strong {
    font-size: 1rem;
}

.guest-landing {
    display: grid;
    gap: 24px;
    margin: 28px 0 36px;
}

.guest-hero-card,
.guest-preview-panel {
    border: 1px solid var(--line);
    border-radius: 34px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.guest-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 28px;
    padding: 30px;
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 212, 255, 0.16), transparent 18rem),
        radial-gradient(circle at 88% 28%, rgba(115, 103, 255, 0.18), transparent 16rem),
        var(--panel);
}

.guest-hero-copy,
.guest-hero-side,
.guest-mini-stack,
.guest-preview-grid,
.guest-timer-preview,
.guest-subject-list,
.guest-achievement-preview,
.guest-league-list,
.guest-donut-grid {
    display: grid;
    gap: 16px;
}

.guest-hero-copy h2 {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.guest-hero-copy p:not(.eyebrow) {
    max-width: 58ch;
    margin: 0;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.7;
}

.guest-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.guest-primary,
.guest-secondary {
    border: 0;
    border-radius: 18px;
    padding: 14px 18px;
    font-weight: 900;
}

.guest-primary {
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
}

.guest-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--line);
}

.guest-rank-pill,
.guest-mini-stack article,
.guest-timer-card,
.guest-subject-list article,
.guest-stats-showcase article,
.guest-achievement-preview article,
.guest-league-list article {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
}

.guest-rank-pill {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
}

.guest-rank-pill span,
.guest-mini-stack article span,
.guest-timer-card span,
.guest-lock-badge,
.guest-league-meta span,
.guest-stats-showcase article span,
.guest-achievement-preview article span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-rank-pill strong,
.guest-mini-stack article strong,
.guest-timer-card strong,
.guest-stats-showcase article strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
}

.guest-mini-stack article {
    padding: 16px;
}

.guest-mini-stack article small,
.guest-timer-card small {
    color: var(--muted);
}

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

.guest-tier-showcase {
    overflow: hidden;
}

.guest-tier-marquee {
    padding-block: 6px 2px;
}

.guest-tier-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 14% 18%, var(--league-glow, rgba(255,255,255,0.1)), transparent 8rem),
        rgba(255, 255, 255, 0.04);
}

.guest-tier-card.active {
    border-color: color-mix(in srgb, var(--league-accent, #fff) 55%, transparent);
    box-shadow: 0 16px 36px color-mix(in srgb, var(--league-glow, rgba(255,255,255,0.1)) 72%, transparent);
}

.guest-tier-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-tier-card strong {
    display: block;
    margin-top: 4px;
}

.guest-tier-card small {
    display: block;
    margin-top: 8px;
    color: rgba(235, 240, 255, 0.72);
    line-height: 1.45;
}

.guest-tier-slider {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 16px;
}

.guest-tier-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 232px;
}

.guest-tier-nav {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(244, 247, 255, 0.9);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.guest-tier-nav:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: rgba(0, 212, 255, 0.28);
    background: rgba(0, 212, 255, 0.08);
}

.guest-tier-nav:active {
    transform: scale(0.98);
}

.guest-tier-challenge {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.guest-tier-challenge span {
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.guest-tier-challenge strong {
    font-size: 1.05rem;
    line-height: 1.5;
}

.guest-preview-panel {
    padding: 24px;
}

.guest-timer-card {
    padding: 18px;
}

.guest-timer-card strong {
    font-size: 2.25rem;
    letter-spacing: -0.06em;
}

.guest-subject-list article,
.guest-achievement-preview article,
.guest-league-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.guest-subject-list article b,
.guest-league-list article span {
    font-size: 0.98rem;
}

.guest-donut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.guest-donut-card {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.guest-donut-card > span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-lock-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: min(100%, 184px);
    max-width: min(100%, 184px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 11px 13px;
    background: rgba(255, 255, 255, 0.05);
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
    margin-top: 10px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.guest-league-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.guest-league-list article.is-you {
    border-color: rgba(0, 212, 255, 0.22);
    background: rgba(0, 212, 255, 0.08);
}

.guest-league-list article b,
.guest-achievement-preview article img {
    flex: 0 0 auto;
}

.guest-achievement-preview article {
    justify-content: flex-start;
}

.guest-achievement-preview article img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
}

.guest-achievement-preview article div {
    display: grid;
    gap: 4px;
}

.auth-logout {
    width: fit-content;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-2);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.today-card,
.panel,
.active-focus,
.subject-card,
.day-card,
.donut-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.today-card {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 34px;
    padding: 28px;
}

.today-card span,
.today-card small {
    color: var(--muted);
}

.today-card strong {
    margin: 10px 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    letter-spacing: -0.06em;
}

.tabs {
    display: inline-flex;
    gap: 8px;
    margin: 28px 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.tab {
    min-width: 132px;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    color: var(--muted);
    background: transparent;
    font-weight: 800;
}

.tab.active {
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.hidden {
    display: none !important;
}

.panel {
    border-radius: 34px;
    padding: 24px;
}

.panel-head {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.panel-head.compact {
    margin-bottom: 18px;
}

.panel h2 {
    font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.add-form {
    display: flex;
    gap: 10px;
}

.add-form input {
    width: min(320px, 34vw);
    border: 1px solid var(--line);
    border-radius: 18px;
    outline: none;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.add-form .subject-color {
    width: 50px;
    min-width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
}

.add-form .subject-color::-webkit-color-swatch-wrapper,
.subject-edit-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.add-form .subject-color::-webkit-color-swatch,
.subject-edit-color::-webkit-color-swatch {
    border: 0;
    border-radius: 50%;
}

.add-form input:focus {
    border-color: rgba(0, 212, 255, 0.7);
}

.add-form button,
.subject-card button,
.ghost {
    border: 0;
    border-radius: 18px;
    padding: 14px 18px;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
    font-weight: 900;
}

.active-focus {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 20px;
    align-items: center;
    margin-bottom: 22px;
    border-radius: 28px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(115, 103, 255, 0.42), rgba(0, 212, 255, 0.1)),
        var(--panel-solid);
}

.today-inline-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 24px;
    background: var(--panel-solid);
}

.today-inline-card img {
    grid-column: 2;
    grid-row: 1;
    width: clamp(96px, 13vw, 170px);
    height: clamp(96px, 13vw, 170px);
    object-fit: contain;
    opacity: 0.68;
    transform: translateX(8px);
    filter:
        drop-shadow(0 18px 26px rgba(0, 0, 0, 0.26))
        saturate(0.95);
}

.today-inline-card > div {
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
}

.today-inline-card[class*="level-"] span,
.today-inline-card[class*="level-"] small,
.today-inline-card[class*="level-"] strong {
    color: var(--stats-text-color);
}

.today-inline-card span,
.today-inline-card small {
    font-size: 1.05rem;
}

.today-inline-card span {
    font-weight: 850;
}

.today-inline-card small {
    font-weight: 800;
}

.today-inline-card strong {
    color: var(--text);
    font-size: clamp(2.4rem, 6vw, 5rem);
    letter-spacing: -0.07em;
}

.active-focus span,
.active-focus p {
    color: rgba(255, 255, 255, 0.72);
}

.active-focus span,
.active-focus p,
.active-focus strong {
    margin: 0;
}

.active-focus strong {
    grid-column: 1;
    font-size: clamp(2.4rem, 6vw, 5rem);
    letter-spacing: -0.07em;
}

.ghost {
    grid-column: 2;
    grid-row: 1 / span 3;
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.ghost.danger:hover {
    background: rgba(255, 92, 122, 0.26);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.subject-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: 28px;
    padding: 22px;
    border-color: color-mix(in srgb, var(--subject-color, var(--accent)) 42%, transparent);
}

.subject-card.active {
    border-color: var(--subject-color, var(--accent-2));
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--subject-color, var(--accent)) 68%, transparent), rgba(0, 212, 255, 0.18)),
        var(--panel-solid);
}

.subject-card h3 {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 34px 18px 0;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.subject-card h3 i {
    width: 14px;
    height: 14px;
    border-radius: 5px;
    background: var(--subject-color, var(--accent));
    box-shadow: 0 0 24px var(--subject-color, var(--accent));
}

.subject-card .time-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 0;
    color: var(--muted);
}

.subject-card .time-row strong {
    color: var(--text);
}

.subject-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.subject-actions button {
    flex: 1;
    background: linear-gradient(135deg, var(--subject-color, var(--accent-2)), var(--green));
}

.subject-actions .delete {
    flex: 0 0 auto;
    min-width: 52px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
}

.subject-actions .delete:hover {
    background: rgba(255, 92, 122, 0.28);
}

.archive-panel {
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.045);
}

.archive-head,
.archive-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.archive-head {
    margin-bottom: 14px;
}

.archive-head h3,
.archive-head p {
    margin: 0;
}

.archive-head > span {
    display: grid;
    min-width: 38px;
    min-height: 38px;
    place-items: center;
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font-weight: 900;
}

.archive-list {
    display: grid;
    gap: 10px;
}

.archive-row {
    border: 1px solid color-mix(in srgb, var(--subject-color) 34%, transparent);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.archive-row span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.archive-row i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--subject-color);
}

.archive-row button {
    border: 0;
    border-radius: 14px;
    padding: 10px 14px;
    color: #08101d;
    background: color-mix(in srgb, var(--subject-color) 70%, white);
    font-weight: 900;
}

.subject-edit-color {
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    height: 48px;
    border: 0;
    overflow: hidden;
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.empty {
    grid-column: 1 / -1;
    border: 1px dashed var(--line);
    border-radius: 26px;
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.stats-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 32px;
}

.stats-subtabs {
    display: inline-flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.subject-filter {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px 14px;
    padding: 8px 10px 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
}

.subject-filter select {
    min-width: 210px;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    color: #f7f8ff;
    background: rgba(255, 255, 255, 0.09);
    font: inherit;
    font-weight: 900;
}

.subject-filter select option {
    color: #0b1020;
    background: #ffffff;
}

.subtab {
    min-width: 110px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: var(--muted);
    background: transparent;
    font-weight: 900;
}

.subtab.active {
    color: #08101d;
    background: linear-gradient(135deg, var(--heat-color), var(--accent-2));
}

.month-panel,
.period-panel,
.days-panel {
    grid-column: 1 / -1;
}

[data-day-picker] {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.month-nav {
    display: flex;
    gap: 10px;
}

.month-nav button {
    border: 0;
    border-radius: 16px;
    padding: 12px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    font-weight: 900;
}

.weekday-row,
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.weekday-row {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-align: center;
}

.calendar-empty,
.calendar-day,
.year-month {
    min-height: 100px;
    border-radius: 20px;
}

.calendar-day,
.year-month {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.055);
    text-align: left;
}

.calendar-day span,
.calendar-day strong,
.year-month span,
.year-month strong,
.day-total span,
.day-total strong,
.day-total small {
    color: inherit;
}

.calendar-day strong,
.year-month strong {
    font-size: 0.88rem;
    letter-spacing: -0.04em;
}

.week-day {
    min-height: 130px;
}

.week-day small {
    color: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.calendar-day:not(.level-0) {
    box-shadow: inset 0 -18px 48px rgba(255, 255, 255, 0.04);
}

.calendar-day.selected {
    outline: 3px solid var(--accent-2);
    outline-offset: 2px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.achievements-panel {
    overflow: hidden;
}

.achievement-total {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 14px 18px;
    color: #08101d;
    background: linear-gradient(135deg, var(--heat-color-4), var(--heat-color-7));
    font-size: 1.15rem;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.achievement-card {
    position: relative;
    display: grid;
    gap: 14px;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 20px;
    background:
        radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--heat-color-4) 28%, transparent), transparent 9rem),
        rgba(255, 255, 255, 0.055);
    box-shadow: var(--shadow);
}

.achievement-card.done {
    border-color: color-mix(in srgb, var(--heat-color-7) 55%, white);
    background:
        radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--heat-color-7) 45%, transparent), transparent 9rem),
        rgba(255, 255, 255, 0.07);
}

.achievement-badge {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 20px;
    color: var(--stats-text-color);
    background: var(--heat-color-5);
    font-weight: 1000;
    box-shadow: 0 18px 40px color-mix(in srgb, var(--heat-color-5) 36%, transparent);
}

.achievement-badge img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.achievement-card span,
.achievement-card p,
.achievement-card small {
    color: var(--muted);
}

.achievement-card h3,
.achievement-card strong {
    margin: 0;
    color: var(--text);
}

.achievement-card h3 {
    font-size: 1.25rem;
}

.achievement-card strong {
    font-size: 1.55rem;
}

.achievement-progress {
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.achievement-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--heat-color-3), var(--heat-color-7));
}

.completed-achievements {
    margin-top: 34px;
}

.completed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.completed-badge {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.completed-badge b {
    grid-row: span 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 15px;
    color: var(--stats-text-color);
    background: var(--heat-color-4);
}

.completed-badge b img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.completed-badge span {
    color: var(--text);
    font-weight: 900;
}

.completed-badge small {
    color: var(--muted);
}

.year-month {
    min-height: 120px;
}

.year-month span {
    font-size: 1.5rem;
    font-weight: 1000;
}

.heatmap {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, minmax(54px, 1fr));
    gap: 9px;
    align-items: center;
    justify-content: start;
    overflow-x: auto;
    padding: 4px 2px 12px;
}

.heat-cell,
.heat-legend i {
    width: 92px;
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.heat-cell {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 9px;
}

.heat-cell small {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 800;
}

.heat-cell strong {
    color: var(--text);
    font-size: 0.82rem;
    letter-spacing: -0.03em;
}

.heat-legend i {
    width: 18px;
    min-height: 18px;
    height: 18px;
    border-radius: 6px;
}

.level-1 { background: var(--heat-color-1) !important; color: var(--stats-text-color); }
.level-2 { background: var(--heat-color-2) !important; color: var(--stats-text-color); }
.level-3 { background: var(--heat-color-3) !important; color: var(--stats-text-color); }
.level-4 { background: var(--heat-color-4) !important; color: var(--stats-text-color); }
.level-5 { background: var(--heat-color-5) !important; color: var(--stats-text-color); }
.level-6 { background: var(--heat-color-6) !important; color: var(--stats-text-color); }
.level-7 { background: var(--heat-color-7) !important; color: var(--stats-text-color); }

.heat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 18px 0 34px;
    color: var(--muted);
    font-size: 0.88rem;
}

.weeks {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.month-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 34px 0 30px;
}

.month-summary article,
.day-total {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.day-total {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    margin: 20px 0 30px;
    border-color: color-mix(in srgb, var(--heat-color) 40%, white);
    min-height: 118px;
    padding-right: clamp(132px, 18vw, 230px);
}

.day-total > div {
    position: relative;
    z-index: 1;
}

.day-total-icon {
    position: absolute;
    top: 50%;
    right: clamp(20px, 4vw, 54px);
    width: clamp(96px, 13vw, 170px);
    height: clamp(96px, 13vw, 170px);
    object-fit: contain;
    opacity: 0.72;
    transform: translateY(-50%);
    filter:
        drop-shadow(0 18px 28px rgba(0, 0, 0, 0.25))
        saturate(0.95);
}

.month-summary span,
.day-total span,
.day-total small {
    display: block;
    color: var(--muted);
    font-size: 1.02rem;
    font-weight: 900;
    text-transform: uppercase;
}

.day-total small {
    text-transform: none;
}

.month-summary strong,
.day-total strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 1.45rem;
    letter-spacing: -0.05em;
}

.calendar-day[class*="level-"] span,
.calendar-day[class*="level-"] strong,
.year-month[class*="level-"] span,
.year-month[class*="level-"] strong,
.day-total[class*="level-"] span,
.day-total[class*="level-"] strong,
.day-total[class*="level-"] small {
    color: var(--stats-text-color);
}

.week-row {
    display: grid;
    grid-template-columns: 64px 1fr 86px;
    gap: 12px;
    align-items: center;
    color: var(--muted);
}

.bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.bar span {
    display: block;
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--green));
}

.donuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.donut-card {
    border-radius: 26px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.donut-card h3 {
    margin: 0 0 16px;
}

.donut {
    position: relative;
    display: grid;
    width: 170px;
    height: 170px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#242a3a 0% 100%);
}

.donut::after {
    content: attr(data-total);
    display: grid;
    width: 104px;
    height: 104px;
    place-items: center;
    border-radius: 50%;
    color: var(--text);
    background: #111625;
    font-size: 0.92rem;
    font-weight: 900;
    text-align: center;
}


.legend {
    display: grid;
    gap: 16px;
}

.legend-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.intensity-widget {
    display: grid;
    gap: 14px;
    margin: 10px 0 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.intensity-widget > span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 900;
    text-transform: uppercase;
}

.intensity-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
}

.intensity-scale i {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.intensity-scale b {
    margin-right: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.legend-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-row strong {
    color: var(--text);
    white-space: nowrap;
}

.legend-row i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.days,
.selected-day {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.selected-day {
    grid-template-columns: 1fr;
}

.day-donuts {
    gap: 34px;
    margin-top: 30px;
    margin-bottom: 34px;
}

.day-subject-list {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.session-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.session-list h3 {
    margin: 0 0 10px;
}

.session-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.session-list-head h3 {
    margin: 0;
}

.session-list-head button {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
    font-weight: 1000;
}

.session-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.break-row {
    border-style: dashed;
    background: rgba(109, 93, 252, 0.09);
}

.break-row i {
    background: var(--heat-color);
}

.session-row span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.session-row i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.session-row em {
    color: var(--muted);
    font-style: normal;
}

.session-actions {
    display: inline-flex;
    gap: 8px;
}

.session-row button {
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: var(--text);
    background: rgba(255, 92, 122, 0.22);
    font-weight: 900;
}

.session-actions button:first-child {
    background: rgba(255, 255, 255, 0.1);
}

.session-row small {
    color: var(--muted);
}

.day-card {
    border-radius: 24px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: none;
}

.day-card header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.day-card h3 {
    margin: 0;
}

.day-card strong {
    color: var(--yellow);
}

.day-subject {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.day-subject span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.day-subject i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20;
    max-width: 360px;
    border: 1px solid rgba(255, 92, 122, 0.42);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 92, 122, 0.18);
    box-shadow: var(--shadow);
}

.settings-form {
    display: grid;
    gap: 22px;
    max-width: 720px;
}

.color-setting {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.color-setting span {
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 900;
}

.color-setting input {
    width: 74px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    padding: 0;
    background: transparent;
}

.level-color-settings {
    display: grid;
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.level-color-settings > div {
    grid-column: 1 / -1;
}

.level-color-settings h3,
.level-color-settings p {
    margin: 0;
}

.level-color-setting {
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-weight: 900;
}

.level-color-setting input {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.11);
    cursor: pointer;
}

.preset-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.preset-colors button,
.settings-form > button {
    border: 0;
    border-radius: 18px;
    padding: 14px 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font-weight: 900;
}

.preset-colors button::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 9px;
    border-radius: 5px;
    background: var(--preset);
    vertical-align: -1px;
}

.settings-form > button {
    width: fit-content;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
}

.focus-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--focus-color, var(--heat-color)) 48%, transparent), transparent 26rem),
        radial-gradient(circle at 72% 82%, color-mix(in srgb, var(--focus-color, var(--heat-color)) 30%, transparent), transparent 28rem),
        rgba(4, 6, 12, 0.9);
    backdrop-filter: blur(22px);
}

.focus-modal.visible {
    display: grid;
}

.focus-box {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: min(720px, 100%);
    border: 1px solid color-mix(in srgb, var(--focus-color, var(--accent)) 48%, rgba(255, 255, 255, 0.18));
    border-radius: 46px;
    padding: clamp(28px, 7vw, 74px);
    text-align: center;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--focus-color, var(--accent)) 18%, rgba(255, 255, 255, 0.12)), rgba(255, 255, 255, 0.04)),
        var(--panel-solid);
    box-shadow:
        0 42px 120px rgba(0, 0, 0, 0.72),
        0 0 90px color-mix(in srgb, var(--focus-color, var(--accent)) 38%, transparent);
}

.focus-icon {
    position: absolute;
    top: clamp(24px, 4vw, 42px);
    right: clamp(24px, 4vw, 42px);
    width: clamp(80px, 10vw, 126px);
    height: clamp(80px, 10vw, 126px);
    object-fit: contain;
    opacity: 0.28;
    filter:
        drop-shadow(0 20px 34px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 26px color-mix(in srgb, var(--focus-color, var(--accent)) 38%, transparent));
}

.focus-box::before {
    content: "";
    position: absolute;
    inset: 22px;
    z-index: -1;
    border: 1px solid color-mix(in srgb, var(--focus-color, var(--accent)) 32%, transparent);
    border-radius: 34px;
    pointer-events: none;
}

.focus-aura {
    position: absolute;
    inset: auto -18% -42% -18%;
    z-index: -1;
    height: 58%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--focus-color, var(--accent)) 46%, transparent), transparent 68%);
    filter: blur(14px);
}

.focus-box p,
.focus-box h2,
.focus-box strong {
    margin: 0;
}

.focus-box p {
    color: var(--muted);
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.focus-box h2 {
    margin-top: 18px;
    font-size: clamp(2rem, 6vw, 4.6rem);
    letter-spacing: -0.07em;
    text-shadow: 0 0 36px color-mix(in srgb, var(--focus-color, var(--accent)) 42%, transparent);
}

.focus-box strong {
    display: block;
    margin: 26px 0 24px;
    font-size: clamp(3rem, 12vw, 8rem);
    letter-spacing: -0.08em;
}

.focus-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 auto 32px;
    max-width: 560px;
}

.focus-stats article {
    border: 1px solid color-mix(in srgb, var(--focus-color, var(--accent)) 34%, rgba(255, 255, 255, 0.12));
    border-radius: 22px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.07);
}

.focus-stats span,
.focus-stats b {
    display: block;
}

.focus-stats span {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.focus-stats b {
    color: var(--text);
    font-size: 1.35rem;
}

.focus-box button {
    border: 0;
    border-radius: 999px;
    padding: 18px 48px;
    color: var(--text);
    background: linear-gradient(135deg, var(--red), #ff8fab);
    font-size: 1.15rem;
    font-weight: 1000;
}

.confirm-modal,
.session-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--heat-color) 34%, transparent), transparent 25rem),
        rgba(3, 6, 14, 0.76);
    backdrop-filter: blur(18px);
}

.confirm-modal.visible,
.session-modal.visible {
    display: grid;
}

.confirm-box,
.session-box {
    width: min(520px, 100%);
    border: 1px solid color-mix(in srgb, var(--heat-color) 32%, rgba(255, 255, 255, 0.18));
    border-radius: 34px;
    padding: 28px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
        var(--panel-solid);
    box-shadow: var(--shadow);
}

.confirm-box p,
.confirm-box h2,
.confirm-box span,
.session-box p,
.session-box h2,
.session-box span {
    margin: 0;
}

.confirm-box p,
.session-box p {
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 1000;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.confirm-box h2,
.session-box h2 {
    margin-top: 10px;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    letter-spacing: -0.05em;
}

.session-box {
    display: grid;
    gap: 16px;
}

.session-box label {
    display: grid;
    gap: 8px;
}

.session-box label span {
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
}

.session-box input,
.session-box select {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font: inherit;
    font-weight: 850;
}

.session-time-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.confirm-box > span {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.55;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.confirm-actions button {
    border: 0;
    border-radius: 999px;
    padding: 14px 20px;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
    font-weight: 1000;
}

.confirm-actions .ghost-danger {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
}

.confirm-actions .ghost-danger:hover {
    background: rgba(255, 92, 122, 0.2);
}

.league-season-label {
    color: var(--accent-2);
    font-size: 0.96rem;
    font-weight: 900;
}

.leagues-panel {
    display: grid;
    gap: 22px;
}

.league-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.league-rank-card,
.league-stat-card,
.league-tier-card,
.league-arena-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: var(--shadow);
}

.league-rank-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at 20% 15%, var(--league-glow), transparent 11rem),
        linear-gradient(145deg, color-mix(in srgb, var(--league-accent) 18%, transparent), rgba(255, 255, 255, 0.04)),
        var(--panel-solid);
}

.league-rank-card span,
.league-stat-card span,
.league-tier-card span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.league-rank-card h3,
.league-tier-card strong,
.league-person strong {
    margin: 6px 0 0;
}

.league-rank-card p,
.league-arena-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.league-rank-card > strong,
.league-stat-card strong {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.06em;
}

.league-progress {
    grid-column: 1 / -1;
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.league-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--league-accent), #ffffff);
}

.league-stat-card {
    padding: 20px;
}

.league-stat-card small,
.league-status small,
.league-arena-card small {
    color: var(--muted);
}

.league-stat-card .positive,
.league-table .positive {
    color: var(--green);
}

.league-stat-card .negative,
.league-table .negative {
    color: var(--red);
}

.league-subtabs {
    display: inline-flex;
    gap: 8px;
    width: fit-content;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.league-panel-view {
    display: grid;
    gap: 18px;
}

.league-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.045);
}

.league-table {
    width: 100%;
    border-collapse: collapse;
}

.league-table th,
.league-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.league-table th {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.league-table .is-you {
    background: rgba(0, 212, 255, 0.08);
}

.league-person {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.league-person i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 18px currentColor;
}

.league-person small {
    display: block;
    color: var(--muted);
}

.league-status {
    display: grid;
    gap: 2px;
}

.league-status.live b,
.league-live-pill.live {
    color: var(--green);
}

.league-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.league-tier-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background:
        radial-gradient(circle at 22% 20%, var(--league-glow), transparent 7rem),
        rgba(255, 255, 255, 0.05);
}

.league-tier-card.active {
    border-color: color-mix(in srgb, var(--league-accent) 75%, white);
}

.league-emblem {
    width: 82px;
    height: 96px;
    background-image: url("/static/icons/league-sprite.png");
    background-repeat: no-repeat;
    background-size: 500% 300%;
    background-position: var(--sprite-x, 0%) var(--sprite-y, 0%);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

.league-emblem.mini {
    width: 54px;
    height: 62px;
}

.league-arena-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.league-arena-card {
    padding: 16px;
    background:
        radial-gradient(circle at 18% 16%, color-mix(in srgb, var(--arena-color) 28%, transparent), transparent 7rem),
        rgba(255, 255, 255, 0.05);
}

.league-arena-card.is-you {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.16), var(--shadow);
}

.league-arena-head {
    display: grid;
    gap: 2px;
    margin-bottom: 14px;
}

.league-arena-head span,
.league-arena-head small {
    color: var(--muted);
}

.league-arena-card > strong {
    display: block;
    font-size: 1.7rem;
    letter-spacing: -0.06em;
}

.league-live-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin: 12px 0 8px;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font-weight: 900;
}

.league-wood {
    --league-accent: #7b5a37;
    --league-glow: rgba(123, 90, 55, 0.34);
    --sprite-x: 4%;
    --sprite-y: 0%;
}

.league-bronze {
    --league-accent: #a6693f;
    --league-glow: rgba(166, 105, 63, 0.34);
    --sprite-x: 29%;
    --sprite-y: 0%;
}

.league-gold {
    --league-accent: #d7b35f;
    --league-glow: rgba(215, 179, 95, 0.34);
    --sprite-x: 79%;
    --sprite-y: 0%;
}

.league-sapphire {
    --league-accent: #54b8ff;
    --league-glow: rgba(84, 184, 255, 0.34);
    --sprite-x: 54%;
    --sprite-y: 50%;
}

.league-ruby {
    --league-accent: #ff6b54;
    --league-glow: rgba(255, 107, 84, 0.34);
    --sprite-x: 79%;
    --sprite-y: 50%;
}

.league-emerald {
    --league-accent: #5cda63;
    --league-glow: rgba(92, 218, 99, 0.34);
    --sprite-x: 100%;
    --sprite-y: 50%;
}

.league-diamond {
    --league-accent: #d9f6ff;
    --league-glow: rgba(217, 246, 255, 0.38);
    --sprite-x: 29%;
    --sprite-y: 100%;
}

.league-inferno {
    --league-accent: #ff7f3f;
    --league-glow: rgba(255, 127, 63, 0.36);
    --sprite-x: 54%;
    --sprite-y: 100%;
}

.league-void {
    --league-accent: #5c657a;
    --league-glow: rgba(92, 101, 122, 0.4);
    --sprite-x: 104%;
    --sprite-y: 100%;
}

.profile-panel,
.profile-layout,
.profile-directory-grid {
    display: grid;
    gap: 18px;
}

.profile-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.profile-form,
.profile-card,
.profile-person-card,
.profile-modal-box {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: var(--shadow);
}

.profile-form {
    display: grid;
    gap: 16px;
    padding: 24px;
}

.profile-form label {
    display: grid;
    gap: 8px;
}

.profile-form span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-form input,
.profile-form textarea {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font: inherit;
    resize: vertical;
}

.profile-form button,
.profile-person-card {
    border: 0;
}

.profile-form button {
    width: fit-content;
    border-radius: 18px;
    padding: 14px 18px;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
    font-weight: 900;
}

.profile-card {
    padding: 24px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 128, 0, 0.18), transparent 10rem),
        var(--panel-solid);
}

.profile-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.profile-card h3,
.profile-card p,
.profile-card span,
.profile-card strong {
    margin: 0;
}

.profile-card h3 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.profile-card span,
.profile-person-card small,
.profile-modal-meta span,
.profile-modal-meta small {
    color: var(--muted);
}

.profile-card strong {
    display: block;
    margin: 12px 0 14px;
    font-size: 1.25rem;
}

.profile-card p {
    color: var(--text);
    line-height: 1.6;
}

.profile-person-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    text-align: left;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 212, 255, 0.1), transparent 8rem),
        rgba(255, 255, 255, 0.05);
}

.profile-person-card.is-you {
    border: 1px solid rgba(0, 212, 255, 0.35);
}

.profile-person-card strong {
    font-size: 1.1rem;
}

.profile-person-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: rgba(3, 6, 14, 0.78);
    backdrop-filter: blur(18px);
}

.profile-modal.visible {
    display: grid;
}

.profile-modal-box {
    width: min(720px, 100%);
    padding: 28px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 128, 0, 0.16), transparent 12rem),
        var(--panel-solid);
}

.profile-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-modal-head button {
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    font-weight: 900;
}

.profile-modal-head h2,
.profile-modal-text {
    margin: 0;
}

.profile-modal-head small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.profile-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.profile-modal-meta strong {
    font-size: 1.35rem;
}

.profile-modal-league {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.profile-modal-league b {
    font-size: 1rem;
}

.profile-modal-text {
    color: var(--text);
    line-height: 1.7;
    font-size: 1.02rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.admin-user-card {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 20px;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 128, 0, 0.1), transparent 10rem),
        var(--panel-solid);
    box-shadow: var(--shadow);
}

.admin-user-card.live {
    border-color: rgba(91, 224, 163, 0.28);
}

.admin-user-head,
.admin-user-meta,
.admin-user-actions,
.admin-user-title {
    display: flex;
    gap: 10px;
}

.admin-user-head,
.admin-user-actions {
    justify-content: space-between;
    align-items: center;
}

.admin-user-head {
    gap: 14px;
    align-items: flex-start;
}

.admin-user-head > div,
.admin-user-status {
    display: grid;
    gap: 6px;
}

.admin-user-title {
    align-items: center;
    flex-wrap: wrap;
}

.admin-user-title strong,
.admin-user-status b {
    font-size: 1rem;
}

.admin-user-head small,
.admin-user-meta span,
.admin-user-status small {
    color: var(--muted);
}

.admin-user-meta {
    flex-wrap: wrap;
}

.admin-user-meta span,
.admin-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-pill {
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
    border: 0;
}

.admin-user-status {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.admin-user-status.live {
    border-color: rgba(91, 224, 163, 0.28);
    background: rgba(91, 224, 163, 0.08);
}

.admin-user-actions {
    flex-wrap: wrap;
}

.admin-user-actions button {
    border: 0;
    border-radius: 16px;
    padding: 12px 14px;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
    font-weight: 900;
}

.admin-user-actions button.ghost-danger {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.admin-user-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 128, 0, 0.18), transparent 18rem),
        rgba(3, 6, 14, 0.86);
    backdrop-filter: blur(18px);
}

.auth-modal.visible {
    display: grid;
}

.auth-box {
    position: relative;
    display: grid;
    gap: 16px;
    width: min(520px, 100%);
    border: 1px solid var(--line);
    border-radius: 34px;
    padding: 30px;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 128, 0, 0.14), transparent 11rem),
        var(--panel-solid);
    box-shadow: var(--shadow);
}

.auth-box h2,
.auth-box .auth-text {
    margin: 0;
}

.auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.35rem;
    line-height: 1;
}

.auth-mode-switch {
    display: flex;
    gap: 10px;
}

.auth-mode-switch button {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 800;
}

.auth-mode-switch button.active {
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
}

.auth-box label {
    display: grid;
    gap: 8px;
}

.auth-box label span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-box input {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.auth-box button {
    width: fit-content;
    border: 0;
    border-radius: 18px;
    padding: 14px 18px;
    color: #08101d;
    background: linear-gradient(135deg, var(--accent-2), var(--green));
    font-weight: 900;
}

@media (max-width: 880px) {
    .hero,
    .stats-layout,
    .donuts {
        grid-template-columns: 1fr;
    }

    .auth-badge {
        min-width: 0;
    }

    .panel-head,
    .add-form,
    .active-focus,
    .today-inline-card {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .today-inline-card img,
    .today-inline-card > div {
        grid-column: 1;
    }

    .today-inline-card img {
        justify-self: end;
        width: 96px;
        height: 96px;
        opacity: 0.5;
    }

    .day-total {
        padding-right: 18px;
    }

    .day-total-icon {
        position: static;
        width: 86px;
        height: 86px;
        transform: none;
        justify-self: end;
        opacity: 0.55;
    }

    .add-form input {
        width: 100%;
    }

    .ghost,
    .active-focus strong {
        grid-column: auto;
        grid-row: auto;
    }

    .heat-cell {
        width: 82px;
    }

    .weekday-row,
    .month-grid {
        gap: 6px;
    }

    .calendar-empty,
    .calendar-day,
    .year-month {
        min-height: 68px;
    }

    .calendar-day,
    .year-month {
        padding: 8px;
        font-size: 0.82rem;
    }

    .month-summary {
        grid-template-columns: 1fr;
    }

    .subject-filter {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        border-radius: 24px;
    }

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

    .subject-filter select,
    .focus-stats {
        width: 100%;
    }

    .focus-stats {
        grid-template-columns: 1fr;
    }

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

    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .league-overview,
    .league-tier-grid,
    .league-arena-grid,
    .profile-layout,
    .guest-hero-card,
    .guest-preview-grid,
    .guest-donut-grid {
        grid-template-columns: 1fr;
    }

    .guest-lock-badge {
        width: 100%;
        max-width: 100%;
    }

    .guest-tier-slider {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 10px;
    }

    .guest-tier-stage {
        min-height: 208px;
    }

    .guest-tier-nav {
        width: 40px;
        height: 40px;
        font-size: 1.45rem;
    }

    .league-rank-card {
        grid-template-columns: 1fr;
    }

    .league-subtabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .session-row {
        grid-template-columns: 1fr;
    }

    .session-list-head,
    .session-actions,
    .session-time-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
}
