:root {
    --color-black: #000000;
    --color-red: #ff0000;
    --color-white: #ffffff;
    --color-gray: #737373;
    --white: var(--color-white);
    --black: var(--color-black);
    --red-primary: var(--color-red);
    --red-secondary: var(--color-red);
    --red-dark: var(--color-black);
    --gray-light: var(--color-white);
    --gray-lighter: var(--color-white);
}

.hero-search button {
    border-radius: 10px;
}

.hero-shared .hero-search {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
    color: var(--home-slate);
}

.hero-shared .hero-search input {
    color: var(--home-slate);
}

.hero-shared .hero-search input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.hero-shared .hero-search i {
    color: var(--home-muted);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: -3rem auto 3rem;
}

.feature-card {
    background: var(--gray-lighter);
    padding: 1.75rem;
    border-radius: var(--radius-card);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s;
}

.feature-card i {
    font-size: 2rem;
    color: var(--red-secondary);
    margin-bottom: 1rem;
}

.feature-card:hover {
    background: var(--red-secondary);
    color: var(--white);
    transform: translateY(-8px);
}

.feature-card:hover i {
    color: var(--white);
}

.contest-section {
    padding: 3rem 0;
}

.contest-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
}

.contest-highlight {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.contest-highlight img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.contest-body {
    padding: 1.5rem;
}

.badge {
    display: inline-block;
    background: var(--red-primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.contest-body h2 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.75rem;
}

.time-range {
    font-weight: 600;
    color: var(--red-primary);
    margin: 1rem 0;
}

.contest-list {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.contest-list ul {
    list-style: none;
    margin-top: 1rem;
}

.contest-list li {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
    transition: border 0.2s, transform 0.2s;
}

.contest-list li:hover {
    border-color: var(--red-secondary);
    transform: translateX(8px);
}

.contest-list img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.08em;
}

.link-more {
    color: var(--red-secondary);
    font-weight: 600;
}

.courses {
    padding: 3rem 0 5rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news {
    padding: 3rem 0 4rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.12);
}

.news-tag {
    display: inline-block;
    background: rgba(200, 16, 46, 0.1);
    color: var(--red-primary);
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.news-card time {
    font-size: 0.9rem;
    color: var(--gray-dark);
    font-weight: 600;
}

.site-footer {
    background: var(--red-primary);
    color: var(--white);
    padding: 2.5rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer-logo {
    width: 80px;
    margin-bottom: 1rem;
}

.footer-grid ul {
    list-style: none;
    margin-top: 0.75rem;
}

.footer-grid li {
    margin-bottom: 0.5rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    color: var(--white);
    font-size: 1.2rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    border: none;
    background: var(--red-secondary);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Auth page */
.auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #ff0000, #000000);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(60px);
    border-radius: 50%;
    z-index: 0;
}

.auth-page::before {
    top: -160px;
    left: -120px;
}

.auth-page::after {
    bottom: -180px;
    right: -140px;
}

.auth-overlay {
    width: min(480px, 100%);
    z-index: 1;
}

.auth-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.92));
    border-radius: 32px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.45);
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    width: 110px;
    margin: 0 auto 1.25rem;
}

.auth-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: #ff0000;
    text-transform: uppercase;
}

.auth-header p {
    color: #737373;
    margin-top: 0.25rem;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: #ffffff;
    border-radius: 999px;
    padding: 0.3rem;
    margin-bottom: 1.75rem;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
}

.auth-tab {
    background: transparent;
    border: none;
    padding: 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.04em;
}

.auth-tab.active {
    background: #ffffff;
    color: #ff0000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.auth-form.active {
    display: flex;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #737373;
}

.input-icon input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.85rem;
    border-radius: 12px;
    border: 1px solid #737373;
    background: #ffffff;
    font-size: 0.95rem;
}

.input-icon input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.15);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #737373;
}

.auth-links,
.auth-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #737373;
    margin-top: 0.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 0.5rem;
    color: #737373;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(115, 115, 115, 0.4), transparent);
}

.auth-message {
    font-size: 0.9rem;
    color: #ff0000;
    min-height: 1.25rem;
}

.text-red {
    color: var(--red-secondary);
}

.text-underline {
    text-decoration: underline;
}

/* Contest page */
.contest-hero {
    padding: 5rem 0 3rem;
    background: linear-gradient(120deg, rgba(200, 16, 46, 0.95), rgba(214, 32, 39, 0.85));
    color: var(--white);
    text-align: center;
}

.contest-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 3vw, 3rem);
    margin-bottom: 1rem;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.countdown-item {
    background: var(--white);
    color: var(--red-primary);
    border-radius: 10px;
    padding: 1rem;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.countdown-label {
    color: var(--gray-dark);
}

.contest-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contest-info {
    padding: 3rem 0;
}

.contest-info h2 {
    color: var(--red-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.accordion-item {
    background: var(--white);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-card);
}

.accordion-item header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-body {
    max-height: 400px;
    margin-top: 0.75rem;
}

/* Courses page */
.courses-page {
    padding: 4rem 0 5rem;
}

.course-list .filters select {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--gray-light);
}

.course-grid.extended {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.course-status {
    display: inline-block;
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--red-secondary);
    color: var(--red-secondary);
    font-size: 0.85rem;
}

.course-status.registered {
    background: rgba(214, 32, 39, 0.1);
}

.progress {
    width: 100%;
    height: 8px;
    background: var(--gray-light);
    border-radius: 999px;
}

.progress-bar {
    height: 100%;
    background: var(--red-secondary);
    border-radius: 999px;
}

.course-detail {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: var(--shadow-card);
}

.detail-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-hero img {
    border-radius: 15px;
    height: 220px;
    object-fit: cover;
}

.detail-hero ul {
    list-style: none;
    margin-top: 1rem;
}

.detail-hero li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-link {
    border: none;
    background: var(--gray-light);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.tab-link.active {
    background: var(--red-secondary);
    color: var(--white);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.lesson-list {
    list-style: none;
}

.lesson-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.review {
    background: var(--gray-lighter);
    padding: 1rem;
    border-radius: 12px;
}

/* Popup */
.login-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.login-popup.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    width: min(400px, 90%);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
}

.popup-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .nav-inner {
        flex-direction: column;
    }

    @media (max-width: 520px) {
        .account-summary-stats {
            grid-template-columns: 1fr;
        }

        .account-summary-avatar {
            width: 64px;
            height: 64px;
        }

        .account-history-table th,
        .account-history-table td {
            padding: 0.65rem 0.75rem;
        }
    }

    .hero-search {
        flex-direction: row;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.45rem 0.45rem 0.45rem 0.85rem;
        width: min(92vw, 420px);
    }

        .account-summary-detail-grid {
            grid-template-columns: 1fr;
        }

        .account-summary-detail {
            padding: 0.75rem 0.9rem;
        }

    .hero-search button {
        width: auto;
        min-width: clamp(96px, 28vw, 140px);
        border-radius: 10px;
    }

    .contest-grid {
        grid-template-columns: 1fr;
    }

    .contest-actions {
        flex-direction: column;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .popup-content {
        padding: 1.5rem;
    }
}

    /* === Home 2025 Refresh === */
    :root {
        --home-primary: #ff0000;
        --home-primary-dark: #000000;
        --home-mist: #ffffff;
        --home-rose: #ffffff;
        --home-shell: #ffffff;
        --home-slate: #000000;
        --home-muted: #737373;
        --home-border: rgba(0, 0, 0, 0.15);
    }

    .home-page {
        font-family: 'Nunito', system-ui, sans-serif;
        color: var(--home-slate);
        background: var(--home-shell);
        line-height: 1.6;
    }

    .shell {
        width: min(1200px, calc(100% - 3rem));
        margin: 0 auto;
    }

    .home-header {
        position: sticky;
        top: 0;
        z-index: 20;
        backdrop-filter: blur(16px);
        background: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid var(--home-border);
    }

    .header-inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        padding: 0.35rem 0;
        position: relative;
    }

    .header-start {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-width: 0;
    }

    .header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
        min-width: 0;
    }

    .header-user {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        min-width: 0;
        font-family: 'Be Vietnam Pro', sans-serif;
    }

    .header-user-profile {
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
        text-decoration: none;
        color: inherit;
        min-width: 0;
        font-weight: 600;
        flex: 1;
    }

    .header-user-profile:hover strong,
    .header-user-profile:focus-visible strong {
        color: var(--home-primary);
    }

    .header-user-avatar {
        width: clamp(36px, 5vw, 44px);
        height: clamp(36px, 5vw, 44px);
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        border: 2px solid rgba(0, 0, 0, 0.08);
        background: #f3f3f3;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-user-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 25%;
        display: block;
    }

    .header-user-avatar span {
        font-weight: 700;
        font-size: clamp(1rem, 2.6vw, 1.15rem);
        color: var(--home-primary);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .header-user-link {
        color: var(--home-primary);
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
    }

    .header-user-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.2;
        text-align: left;
        min-width: 0;
    }

    .header-user-info strong {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .header-user-meta {
        font-size: 0.75rem;
        color: var(--home-muted);
        white-space: nowrap;
    }

    .header-user-logout {
        border: none;
        background: transparent;
        color: var(--home-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        cursor: pointer;
        padding: 0.25rem;
        border-radius: 50%;
    }

    .header-user-logout:hover,
    .header-user-logout:focus-visible {
        background: rgba(214, 28, 31, 0.08);
        outline: none;
    }

    .menu-toggle {
        display: none;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        border: 1px solid var(--home-border);
        background: #fff;
        color: var(--home-primary);
        font-size: 1.1rem;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }

    .menu-toggle:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .menu-toggle:focus-visible {
        outline: 2px solid var(--home-primary);
        outline-offset: 2px;
    }

    .home-header.is-nav-open .menu-toggle {
        background: var(--home-primary);
        color: #fff;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: clamp(0.5rem, 2vw, 0.8rem);
        text-decoration: none;
        color: inherit;
        min-width: 0;
        flex-shrink: 1;
    }

    .brand-logo {
        width: clamp(30px, 5.2vw, 42px);
        height: clamp(30px, 5.2vw, 42px);
        object-fit: contain;
        flex-shrink: 0;
    }

    .brand-text {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        min-width: 0;
    }

    .brand-text span {
        font-size: clamp(0.58rem, 1.6vw, 0.75rem);
        text-transform: uppercase;
        letter-spacing: clamp(0.04em, 0.5vw, 0.06em);
        color: var(--home-muted);
        white-space: nowrap;
    }

    .brand-text strong {
        font-size: clamp(0.78rem, 2.4vw, 1.05rem);
        font-family: 'Be Vietnam Pro', sans-serif;
        text-transform: uppercase;
        white-space: nowrap;
        line-height: 1.05;
    }

    .primary-nav {
        display: flex;
        align-items: center;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.85rem;
        min-width: 0;
    }

    .nav-list {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item {
        position: relative;
        display: flex;
        align-items: center;
    }

    .nav-item + .nav-item::before {
        content: '';
        width: 4px;
        height: 4px;
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.18);
        position: absolute;
        left: -0.75rem;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    @media (min-width: 769px) {
        .primary-nav {
            justify-content: center;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        .primary-nav .nav-list {
            justify-content: center;
            gap: 2.4rem;
        }

        .nav-item.nav-account {
            display: none;
        }
    }

    @media (max-width: 1100px) and (min-width: 769px) {
        .header-inner {
            grid-template-columns: auto minmax(0, 1fr) auto;
        }

        .primary-nav {
            position: static;
            left: auto;
            top: auto;
            transform: none;
            justify-content: flex-start;
        }

        .primary-nav .nav-list {
            justify-content: flex-start;
            gap: 1.4rem;
        }

        .header-user-profile {
            gap: 0.5rem;
        }

        .header-user {
            gap: 0.45rem;
        }

        .header-user-info strong {
            font-size: 0.82rem;
        }

        .header-user-meta {
            display: none;
        }

        .header-user-logout {
            font-size: 0.9rem;
        }
    }

    .nav-sub-link i {
        color: currentColor;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        color: var(--home-muted);
        text-decoration: none;
        padding: 0.25rem 0.35rem;
        border: none;
        background: transparent;
        cursor: pointer;
        font: inherit;
        text-transform: inherit;
    }

    .nav-link-icon {
        font-size: 1rem;
        color: var(--home-primary);
    }

    .nav-link.is-active,
    .nav-link:hover {
        color: var(--home-primary);
    }

    .nav-link.is-active .nav-link-icon,
    .nav-link:hover .nav-link-icon {
        color: var(--home-primary);
    }

    .nav-account {
        display: flex;
        align-items: center;
    }

    .nav-account-toggle {
        border-radius: 10px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .nav-account-toggle:hover {
        background: rgba(214, 32, 39, 0.12);
    }

    .nav-account-toggle.is-open {
        background: rgba(214, 32, 39, 0.1);
        color: var(--home-primary);
    }

    .nav-account-toggle.is-open .nav-link-icon {
        color: var(--home-primary);
    }

    .nav-account-caret {
        margin-left: auto;
        font-size: 0.75rem;
        transition: transform 0.2s ease;
    }

    .nav-account-toggle.is-open .nav-account-caret {
        transform: rotate(-180deg);
    }

    .nav-account-menu {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        right: 0;
        top: calc(100% + 0.75rem);
        min-width: 240px;
        padding: 0.9rem;
        border-radius: 12px;
        border: 1px solid var(--home-border);
        background: #fff;
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
        text-transform: none;
        z-index: 10;
    }

    .nav-account-menu.is-open {
        display: flex;
    }

    .nav-account-info {
        display: block;
        padding-bottom: 0.6rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-account-profile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        color: inherit;
    }

    .nav-account-profile:hover strong,
    .nav-account-profile:focus-visible strong {
        color: var(--home-primary);
    }

    .nav-account-details {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        min-width: 0;
    }

    .nav-account-info strong {
        font-size: 0.95rem;
        color: var(--home-slate);
        text-transform: none;
        line-height: 1.25;
    }

    .nav-account-meta {
        font-size: 0.78rem;
        color: var(--home-muted);
        letter-spacing: 0;
        text-transform: none;
        line-height: 1.2;
    }

    .nav-account-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        background: rgba(214, 32, 39, 0.12);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-account-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .nav-account-avatar-fallback {
        font-weight: 700;
        font-size: 1.05rem;
        color: var(--home-primary);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .nav-sub-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.45rem 0;
        font-weight: 600;
        text-decoration: none;
        color: var(--home-primary);
        background: transparent;
        border: none;
        font-size: 0.85rem;
        cursor: pointer;
        text-transform: none;
    }

    .nav-auth-link {
        color: var(--home-primary);
    }

    .nav-sub-link:hover {
        color: var(--home-primary-dark);
    }

    .nav-auth-link.is-hidden,
    .nav-auth-logout.is-hidden {
        display: none;
    }

    .nav-auth-logout {
        color: #d62027;
    }

    .nav-auth-logout i {
        font-size: 0.9rem;
    }

    .btn {
        border: none;
        border-radius: 999px;
        padding: 0.65rem 1.5rem;
        font-weight: 700;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .btn-solid {
        background: var(--home-primary);
        color: #fff;
        box-shadow: 0 12px 30px rgba(164, 49, 42, 0.3);
    }

    .btn-solid:hover {
        background: var(--home-primary-dark);
        transform: translateY(-2px);
    }

    .btn-ghost {
        background: rgba(164, 49, 42, 0.08);
        color: var(--home-primary);
    }

    .home-main {
        overflow: hidden;
    }

    .hero {
        background-image: var(--hero-background, linear-gradient(135deg, #ff0000, #000000));
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
        padding: clamp(0.85rem, 3.5vw, 1.8rem) 0;
        position: relative;
        min-height: clamp(200px, 28vw, 320px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero.hero-hidden,
    .account-page .hero.hero-hidden {
        display: none;
    }

    .hero::after {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 85% 15%, rgba(0, 0, 0, 0.15), transparent 40%);
        pointer-events: none;
    }

    .hero-shared {
        color: #fff;
        padding: clamp(1rem, 4vw, 2.25rem) 0;
        background-image: var(--hero-background, linear-gradient(135deg, #ff0000, #000000));
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
    }

    .hero-shared.hero-plain {
        background-image: var(--hero-background, none);
    }

    .hero-shared::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(255, 0, 0, 0.15));
        pointer-events: none;
        z-index: 0;
    }

    .hero-shared::after {
        background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.1), transparent 60%);
        z-index: 0;
    }

    .hero-shared.hero-plain::before,
    .hero-shared.hero-plain::after {
        display: none;
    }

    .account-page .hero {
        background-image: none;
        background-color: #ffffff;
    }

    .account-page .hero::after {
        display: none;
    }

    .account-page .hero-shared {
        min-height: clamp(180px, 28vw, 260px);
        padding: clamp(1.5rem, 4vw, 2.5rem) 0;
        color: var(--home-slate);
    }

    .account-hero .hero-stack {
        align-items: flex-start;
        text-align: left;
    }

    .account-hero .hero-body {
        align-items: flex-start;
        text-align: left;
        max-width: 540px;
    }

    .account-hero .hero-heading {
        align-items: flex-start;
    }

    .account-hero .hero-emblem {
        width: 72px;
        height: 72px;
    }

    .account-hero .hero-subtitle {
        color: rgba(255, 255, 255, 0.85);
    }

    .account-main {
        background: linear-gradient(180deg, rgba(244, 244, 244, 0.85), #ffffff);
        padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 4.5rem);
        min-height: 60vh;
    }

    .account-shell {
        display: grid;
        grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
        gap: clamp(1.5rem, 3vw, 2.75rem);
        align-items: flex-start;
    }

    .account-sidebar {
        background: #ffffff;
        border-radius: 18px;
        padding: 1.5rem 1.25rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .account-sidebar-title {
        font-weight: 700;
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 1.25rem;
        color: var(--home-muted);
    }

    .account-nav {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .account-nav-link {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        border: none;
        background: rgba(214, 32, 39, 0.08);
        color: var(--home-muted);
        padding: clamp(0.68rem, 2vw, 0.88rem) clamp(0.9rem, 2.6vw, 1.25rem);
        border-radius: 12px;
        font-weight: 600;
        font-size: clamp(0.85rem, 2.4vw, 1rem);
        cursor: pointer;
        text-align: left;
        transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }

    .account-nav-link i {
        font-size: clamp(0.9rem, 2.2vw, 1rem);
    }

    .account-nav-link:hover,
    .account-nav-link:focus-visible {
        transform: translateX(2px);
        outline: none;
    }

    .account-nav-link.is-active {
        background: var(--home-primary);
        color: #ffffff;
    }

    .account-content {
        display: flex;
        flex-direction: column;
        gap: clamp(1.5rem, 3vw, 2.5rem);
    }

    .account-panel {
        display: none;
    }

    .account-panel.is-active {
        display: block;
    }

    .account-panel-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.25rem;
        flex-wrap: wrap;
    }

    .account-panel-header h1 {
        margin: 0;
        font-size: clamp(1.5rem, 3vw, 1.9rem);
        flex: 0 0 auto;
        order: 1;
    }

    .account-panel-header p {
        margin: 0;
        color: var(--home-muted);
        font-weight: 500;
        flex: 1 0 100%;
        order: 3;
    }

    .account-panel-header .account-refresh {
        margin-left: auto;
        order: 2;
        flex: 0 0 auto;
    }

    .account-card {
        background: #ffffff;
        border-radius: clamp(12px, 2vw, 14px);
        padding: clamp(1.4rem, 3vw, 2rem);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.07);
        border: 1px solid rgba(0, 0, 0, 0.04);
    }

    .account-summary-header {
        display: flex;
        align-items: center;
        gap: clamp(0.85rem, 2.5vw, 1.5rem);
        margin-bottom: clamp(1.1rem, 3vw, 1.6rem);
        flex-wrap: wrap;
    }

    .account-summary-avatar {
        width: clamp(60px, 9vw, 80px);
        height: clamp(60px, 9vw, 80px);
        border-radius: 18px;
        background: rgba(214, 32, 39, 0.08);
        display: grid;
        place-items: center;
        font-weight: 700;
        font-size: clamp(1.4rem, 4vw, 2rem);
        color: var(--home-primary);
        overflow: hidden;
        position: relative;
    }

    .account-summary-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 25%;
    }

    .account-summary-initials {
        letter-spacing: 0.04em;
    }

    .account-summary-info {
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.3rem;
    }

    .account-summary-name {
        font-size: clamp(1.15rem, min(3.8vw, 2.2rem), 1.75rem);
        margin: 0;
        color: var(--home-slate);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        max-width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .account-summary-meta,
    .account-summary-code {
        margin: 0.15rem 0 0;
        color: var(--home-muted);
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .account-summary-stats {
        display: none;
    }

    .account-summary-details {
        margin-top: clamp(1.5rem, 3vw, 2rem);
    }

    .account-summary-detail-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: clamp(0.75rem, 2vw, 1rem);
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .account-summary-detail {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        flex-wrap: nowrap;
        background: rgba(214, 32, 39, 0.05);
        border-radius: clamp(10px, 2vw, 12px);
        padding: clamp(0.65rem, 2vw, 0.85rem) clamp(0.8rem, 2.4vw, 1.1rem);
        min-width: 0;
    }

    .account-summary-detail[hidden] {
        display: none !important;
    }

    .account-summary-detail dt {
        margin: 0;
        font-size: clamp(0.65rem, min(1.9vw, 1rem), 0.75rem);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--home-muted);
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .account-summary-detail dd {
        margin: 0;
        font-size: clamp(0.88rem, min(2.6vw, 1.15rem), 1rem);
        font-weight: 600;
        color: var(--home-primary-dark);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1 1 auto;
        text-align: right;
        min-width: 0;
    }

    .account-summary-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .account-summary-actions[hidden] {
        display: none !important;
    }

    .account-summary-actions[data-position="stack"] {
        margin-left: 0;
        margin-top: 1.1rem;
        justify-content: center;
        width: 100%;
    }

    .account-summary-actions[data-position="stack"] .account-summary-edit {
        width: min(260px, 80%);
        justify-content: center;
    }

    .account-summary-edit {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.6rem 1.2rem;
        border-radius: 999px;
        border: none;
        background: var(--home-primary);
        color: #ffffff;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .account-summary-edit:hover,
    .account-summary-edit:focus-visible {
        background: #b41f24;
        transform: translateY(-1px);
        outline: none;
    }

    .account-summary-edit i {
        font-size: 1rem;
    }

    .account-edit-modal[hidden] {
        display: none !important;
    }

    .account-edit-modal {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .account-edit-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(17, 24, 39, 0.55);
    }

    .account-edit-dialog {
        position: relative;
        z-index: 1;
        width: min(420px, 92vw);
        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 28px 60px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    .account-edit-form {
        display: flex;
        flex-direction: column;
        gap: 1.1rem;
        padding: clamp(1.5rem, 4vw, 2rem);
    }

    .account-edit-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .account-edit-header h2 {
        margin: 0;
        font-size: 1.35rem;
        color: var(--home-slate);
    }

    .account-edit-close {
        border: none;
        background: transparent;
        color: var(--home-muted);
        font-size: 1.2rem;
        cursor: pointer;
        line-height: 1;
        transition: color 0.2s ease;
    }

    .account-edit-close:hover,
    .account-edit-close:focus-visible {
        color: var(--home-primary);
        outline: none;
    }

    .account-edit-subtitle {
        margin: 0;
        color: var(--home-muted);
        font-size: 0.95rem;
    }

    .account-edit-message {
        min-height: 1.25rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--home-muted);
    }

    .account-edit-message[data-state="error"] {
        color: #d42027;
    }

    .account-edit-message[data-state="success"] {
        color: #0f7a2e;
    }

    .account-edit-message[data-state="info"] {
        color: var(--home-primary);
    }

    .account-edit-avatar {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .account-edit-avatar-preview {
        width: 88px;
        height: 88px;
        border-radius: 50%;
        background: rgba(214, 32, 39, 0.08);
        display: grid;
        place-items: center;
        overflow: hidden;
        position: relative;
    }

    .account-edit-avatar-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .account-edit-avatar-placeholder {
        font-weight: 700;
        font-size: 1.8rem;
        color: var(--home-primary);
    }

    .account-edit-avatar-upload {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.55rem 1.1rem;
        border-radius: 999px;
        border: 1px dashed rgba(214, 32, 39, 0.4);
        color: var(--home-primary);
        cursor: pointer;
        font-weight: 600;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .account-edit-avatar-upload:hover,
    .account-edit-avatar-upload:focus-visible {
        background: rgba(214, 32, 39, 0.1);
        border-color: var(--home-primary);
        outline: none;
    }

    .account-edit-avatar-upload input {
        display: none;
    }

    .account-edit-field {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }

    .account-edit-field label {
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: 700;
        color: var(--home-muted);
    }

    .account-edit-field input {
        padding: 0.75rem 0.9rem;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.12);
        font-size: 1rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .account-edit-field input:focus-visible {
        border-color: var(--home-primary);
        box-shadow: 0 0 0 3px rgba(214, 32, 39, 0.15);
        outline: none;
    }

    .account-edit-footer {
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    .account-edit-cancel,
    .account-edit-submit {
        border-radius: 999px;
        padding: 0.6rem 1.35rem;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .account-edit-cancel {
        border: 1px solid rgba(0, 0, 0, 0.2);
        background: #ffffff;
        color: var(--home-muted);
    }

    .account-edit-cancel:hover,
    .account-edit-cancel:focus-visible {
        transform: translateY(-1px);
        outline: none;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }

    .account-edit-submit {
        border: none;
        background: var(--home-primary);
        color: #ffffff;
        box-shadow: 0 10px 24px rgba(214, 32, 39, 0.25);
    }

    .account-edit-submit:hover,
    .account-edit-submit:focus-visible {
        transform: translateY(-1px);
        outline: none;
        box-shadow: 0 12px 28px rgba(214, 32, 39, 0.3);
    }

    @media (max-width: 900px) {
        .account-shell {
            grid-template-columns: 1fr;
        }

        .account-sidebar {
            display: none;
        }

        .account-panel-header {
            display: block;
            margin-bottom: 1rem;
        }

        .account-panel-header h1 {
            font-size: 1.4rem;
            margin-bottom: 0.35rem;
        }

        .account-panel-header p {
            font-size: 0.95rem;
            color: var(--home-muted);
        }

        .account-panel-history {
            display: none !important;
        }

        .account-content {
            gap: 1.5rem;
        }

        .account-main .account-sidebar,
        .account-main .account-panel-history,
        .account-main .account-nav,
        .account-main .account-sidebar-title {
            display: none !important;
        }

        .account-panel.account-panel-profile {
            display: block !important;
        }

        .account-summary-header {
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            gap: 0.75rem;
        }

        .account-summary-info {
            text-align: center;
            align-items: center;
            gap: 0.4rem;
        }

        .account-summary-meta,
        .account-summary-code {
            text-align: center;
        }

        .account-summary-name {
            text-align: center;
            width: 100%;
        }

        .account-summary-avatar {
            border-radius: 50%;
            margin: 0 auto;
        }
    }

    @media (max-width: 640px) {
        .account-summary-actions {
            width: 100%;
            justify-content: center;
        }

        .account-edit-avatar {
            flex-direction: column;
            align-items: flex-start;
        }

        .account-edit-footer {
            flex-direction: column;
            align-items: stretch;
        }

        .account-edit-cancel,
        .account-edit-submit {
            width: 100%;
            text-align: center;
        }

        .account-summary-detail-grid {
            grid-template-columns: 1fr;
        }

        .account-summary-detail {
            padding: 0.7rem 0.85rem;
        }
    }

    .account-refresh {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        border: 1px solid rgba(214, 32, 39, 0.3);
        border-radius: 999px;
        padding: 0.55rem 1.1rem;
        background: #fff;
        color: var(--home-primary);
        font-weight: 600;
        cursor: pointer;
        transition: border 0.2s ease, transform 0.2s ease;
    }

    .account-refresh:hover,
    .account-refresh:focus-visible {
        border-color: var(--home-primary);
        transform: translateY(-1px);
    }

    .account-history-body {
        position: relative;
    }

    .account-history-loading,
    .account-history-empty {
        font-weight: 600;
        color: var(--home-muted);
        text-align: center;
        padding: 1.5rem 0;
    }

    .account-history-table-wrapper {
        overflow-x: auto;
    }

    .account-history-table {
        width: 100%;
        border-collapse: collapse;
        min-width: 640px;
    }

    .account-history-table th,
    .account-history-table td {
        padding: 0.75rem 1rem;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .account-history-table thead th {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--home-muted);
        background: rgba(214, 32, 39, 0.05);
    }

    .account-history-table tbody tr:hover {
        background: rgba(214, 32, 39, 0.04);
    }

    .account-history-link {
        color: var(--home-primary);
        font-weight: 600;
        text-decoration: none;
    }

    .account-history-link:hover,
    .account-history-link:focus-visible {
        text-decoration: underline;
    }

    .account-history-action {
        color: var(--home-primary);
        font-weight: 600;
        text-decoration: none;
    }

    .account-history-action:hover,
    .account-history-action:focus-visible {
        text-decoration: underline;
    }

    .eyebrow {
        text-transform: uppercase;
        letter-spacing: 0.22em;
        font-size: clamp(0.95rem, 2.2vw, 1.15rem);
        font-weight: 800;
        color: var(--home-primary);
        margin-bottom: 0.85rem;
    }

    .link-inline {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        color: var(--home-primary);
        font-weight: 700;
        text-decoration: none;
    }

    .link-inline i {
        transition: transform 0.2s ease;
    }

    .link-inline:hover i {
        transform: translateX(4px);
    }

    .hero-stack {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
        padding: clamp(1rem, 3vw, 1.75rem) 0;
        width: min(1200px, calc(100% - 2.5rem));
    }

    .hero-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        max-width: 580px;
    }

    .hero-heading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }

    .hero-emblem {
        width: 88px;
        height: 88px;
        object-fit: contain;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .hero-subtitle {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: none;
        color: var(--home-muted);
    }

    .hero-shared .hero-subtitle {
        color: #ffffff;
    }

    .hero-stack h1 {
        font-size: clamp(1.6rem, 2.4vw, 2.4rem);
        margin: 0;
        font-weight: 800;
        line-height: 1.15;
        font-family: 'Nunito', system-ui, sans-serif;
        letter-spacing: 0.04em;
    }

    .hero-search {
        display: flex;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 0.6rem;
        padding: 0.3rem 0.3rem 0.3rem 0.95rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.82);
        border: 1px solid rgba(0, 0, 0, 0.04);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
        width: min(60vw, 420px);
        margin-top: 0.25rem;
    }
    .hero-shared .hero-stack h1 {
        color: #fff;
    }
    
    .hero-shared .hero-lead,
    .hero-shared .search-hint {
        color: rgba(255, 255, 255, 0.85);
    }

    .account-page .hero-shared .hero-stack h1,
    .account-page .hero-shared .hero-subtitle,
    .account-page .hero-shared .hero-lead,
    .account-page .hero-shared .search-hint {
        color: var(--home-slate);
    }

    .hero-visual {
        display: none;
    }

    .hero-heading h1 {
        margin: 0;
        font-size: clamp(0.85rem, calc((100vw - 56px) / 18), 2.6rem);
        letter-spacing: -0.01em;
    }

    .hero-title-line {
        display: inline;
    }

    .hero-title-line + .hero-title-line {
        margin-left: 0.35em;
    }

    .hero-centered .hero-stack {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: clamp(0.75rem, 2vw, 1.15rem);
        min-height: clamp(200px, 45vh, 300px);
        padding: clamp(1rem, 3.5vw, 1.6rem) 0 clamp(0.85rem, 3vw, 1.35rem);
        text-align: center;
    }

    .hero-centered .hero-body {
        align-items: center;
        text-align: center;
        max-width: min(96vw, 720px);
        width: 100%;
        gap: clamp(0.75rem, 1.8vw, 1.15rem);
    }

    .hero-centered .hero-heading {
        align-items: center;
        gap: clamp(0.75rem, 2vw, 1.2rem);
    }

    .hero-centered .hero-emblem {
        width: clamp(78px, 10vw, 108px);
        height: clamp(78px, 10vw, 108px);
    }

    .hero-centered .hero-body h1,
    .hero-centered .hero-body .hero-subtitle,
    .hero-centered .hero-body .hero-lead {
        text-align: center;
    }

    .hero-centered .hero-search {
        margin: 0 auto;
        width: min(60vw, 420px);
    }

    @media (max-width: 900px) {
        .hero {
            min-height: 0;
            padding: 2.5rem 0 2rem;
        }

        .hero-stack {
            width: calc(100% - 2rem);
        }

        .hero-centered .hero-stack {
            padding-right: 0;
        }

        .hero-centered .hero-body {
            align-items: center;
            text-align: center;
        }

        .hero-centered .hero-search {
            width: 100%;
        }
    }

    .hero-search {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.3rem 0.3rem 0.3rem 0.95rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.82);
        border: 1px solid rgba(0, 0, 0, 0.04);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
        width: min(420px, 100%);
        margin-top: 0.25rem;
    }

    .hero-search i {
        display: none;
    }

    .hero-search input {
        flex: 1;
        min-width: 0;
        border: none;
        font-size: 0.96rem;
        outline: none;
        background: rgba(255, 255, 255, 0.95);
        color: var(--home-slate);
        border-radius: 10px;
        padding: 0.48rem 0.85rem;
    }

    .hero-search input::placeholder {
        color: rgba(0, 0, 0, 0.45);
    }

    .hero-search .btn {
        border-radius: 10px;
        padding: 0.55rem 1.5rem;
        font-size: 0.95rem;
    }

    .search-hint {
        color: var(--home-muted);
        font-size: 0.85rem;
    }

    .segment {
        padding: clamp(1.75rem, 4vw, 2.75rem) 0;
    }

    .segment-header {
        display: flex;
        justify-content: space-between;
        gap: 2rem;
        align-items: flex-end;
        flex-wrap: wrap;
        margin-bottom: 2rem;
    }

    .segment-contest .segment-header {
        margin-bottom: 2.5rem;
        position: relative;
        padding-bottom: clamp(0.85rem, 2vw, 1.25rem);
        align-items: center;
    }

    .segment-contest .segment-header::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: 100vw;
        height: 2px;
        background: rgba(214, 32, 39, 0.2);
    }

    .segment-header h2 {
        margin: 0;
        font-size: clamp(1.8rem, 3vw, 2.3rem);
    }

    .segment-contest .segment-header .eyebrow {
        margin-bottom: 0;
    }

    .segment-contest {
        background: transparent;
        border-radius: 0;
        margin-top: clamp(0.25rem, 1.5vw, 0.9rem);
        box-shadow: none;
        padding-top: clamp(0.75rem, 2.5vw, 1.25rem);
    }

    .home-contest-layout {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
        gap: clamp(1.5rem, 4vw, 3rem);
        align-items: start;
    }

    .home-featured-card {
        position: relative;
    }

    .home-featured-link {
        display: flex;
        flex-direction: column;
        gap: clamp(0.9rem, 2vw, 1.25rem);
        color: inherit;
        text-decoration: none;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .home-featured-link:hover,
    .home-featured-link:focus-visible {
        transform: translateY(-6px);
        opacity: 0.92;
    }

    .home-featured-media {
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        margin: 0;
        aspect-ratio: 16 / 9;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.18);
    }

    .home-featured-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .home-featured-badge {
        position: absolute;
        top: 1rem;
        left: 1rem;
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        padding: 0.4rem 1.2rem;
        border-radius: 999px;
        font-size: 0.78rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .home-featured-info {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }

    .home-featured-info h3 {
        margin: 0;
        font-size: clamp(1.15rem, 2.6vw, 1.55rem);
        line-height: 1.35;
    }

    .home-featured-info time {
        font-size: 0.95rem;
        color: var(--home-muted);
        letter-spacing: 0.02em;
        font-weight: 600;
    }

    .home-secondary-list {
        display: flex;
        flex-direction: column;
        gap: clamp(0.85rem, 2vw, 1.25rem);
        padding-left: clamp(0.5rem, 1.5vw, 1rem);
        border-left: 1px solid rgba(0, 0, 0, 0.08);
    }

    .home-secondary-item {
        margin: 0;
    }

    .home-secondary-link {
        display: flex;
        align-items: center;
        gap: clamp(0.75rem, 2vw, 1.1rem);
        text-decoration: none;
        color: inherit;
        padding-bottom: 0.75rem;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .home-secondary-link:hover,
    .home-secondary-link:focus-visible {
        transform: translateX(6px);
        opacity: 0.88;
    }

    .home-secondary-item + .home-secondary-item .home-secondary-link {
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        padding-top: 0.75rem;
    }

    .home-secondary-thumb {
        flex: 0 0 104px;
        width: 104px;
        aspect-ratio: 16 / 9;
        border-radius: 6px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
        margin: 0;
    }

    .home-secondary-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .home-secondary-info {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .home-secondary-info h4 {
        margin: 0;
        font-size: clamp(0.92rem, 2vw, 1.05rem);
        line-height: 1.4;
        font-weight: 700;
    }

    .home-secondary-info time {
        font-size: 0.85rem;
        color: var(--home-muted);
        letter-spacing: 0.01em;
    }

    @media (min-width: 900px) {
        .contest-toolbar {
            flex-direction: row;
            align-items: center;
        }

        .contest-search-bar {
            max-width: 520px;
        }

        .contest-filters {
            justify-content: flex-end;
        }
    }

    .home-footer {
        background: linear-gradient(180deg, #db0000 0%, #9a0000 70%, #560000 100%);
        color: #fff;
        margin-top: clamp(2rem, 5vw, 4rem);
    }

    .home-footer a {
        color: inherit;
        text-decoration: none;
    }

    .home-footer a:hover {
        color: #ffe3e3;
    }

    .footer-top {
        padding: clamp(0.95rem, 3.2vw, 1.7rem) 0 clamp(0.85rem, 3vw, 1.5rem);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
    }

    .footer-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(1.75rem, 5vw, 3rem);
        align-items: start;
    }

    @media (min-width: 768px) {
        .footer-grid {
            gap: clamp(2rem, 4vw, 3.25rem);
        }
    }

    @media (min-width: 992px) {
        .footer-grid {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }

    .footer-block {
        display: flex;
        flex-direction: column;
        gap: clamp(0.35rem, 1.2vw, 0.7rem);
        align-items: flex-start;
    }

    .footer-block h3 {
        font-size: clamp(0.88rem, 1.5vw, 1.02rem);
        letter-spacing: clamp(0.06em, 0.2vw, 0.08em);
        margin: 0;
        padding-bottom: 0.5rem;
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        transition: color 0.2s ease;
        white-space: nowrap;
    }

    .footer-block h3::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 36px;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
        transition: width 0.2s ease, background 0.2s ease;
    }

    .footer-brand {
        text-align: center;
        align-items: center;
    }

    .footer-brand-logo {
        width: clamp(54px, 14vw, 82px);
        height: clamp(54px, 14vw, 82px);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0.65rem auto 0;
        max-width: min(72px, 14vw);
    }

    .footer-brand-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .footer-brand-desc {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #ffffff;
    }

    .footer-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        gap: clamp(0.35rem, 1.2vw, 0.6rem);
        font-size: clamp(0.85rem, 1.6vw, 1rem);
        color: #ffffff;
    }

    .footer-label {
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: none;
        margin-right: 0.35rem;
        color: #ffffff;
    }

    .footer-list a {
        font-weight: 600;
        letter-spacing: 0.03em;
        color: #ffffff;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .footer-list a:hover {
        color: #ffffff;
        transform: translateX(4px);
    }

    .footer-block:hover h3 {
        color: #ffffff;
    }

    .footer-block:hover h3::after {
        width: 64px;
        background: #ffffff;
    }

    .footer-bottom {
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        background: rgba(0, 0, 0, 0.12);
        height: 18px;
        width: 100%;
    }

    .user-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.85rem;
        padding: 0.35rem 0.45rem 0.35rem 0.35rem;
        border-radius: 999px;
        border: 1px solid var(--home-border);
        background: #fff;
        text-decoration: none;
        color: inherit;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    }

    .user-pill strong {
        display: block;
        font-size: 0.95rem;
        line-height: 1.1;
    }

    @media (max-width: 1100px) {
        .footer-bottom-inner {
            justify-content: center;
            text-align: center;
        }

        .footer-links {
            justify-content: center;
            gap: 1.5rem;
        }
    }

    .user-pill small {
        color: var(--home-muted);
        font-size: 0.75rem;
    }

    .user-pill-copy {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        padding-right: 0.5rem;
    }

    .user-avatar {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: rgba(255, 0, 0, 0.12);
        display: grid;
        place-items: center;
        color: var(--home-primary);
        font-size: 1.1rem;
        overflow: hidden;
    }

    .user-avatar i {
        font-size: 1.25rem;
    }

    .user-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .user-pill-caret {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 0, 0, 0.12);
        display: grid;
        place-items: center;
        color: var(--home-primary);
        font-size: 0.85rem;
    }

    .user-pill-link {
        font-weight: 600;
    }

    .icon-btn {
        border: none;
        background: transparent;
        color: var(--home-primary);
        font-size: 1rem;
        cursor: pointer;
    }

    .is-hidden {
        display: none !important;
    }

    .skeleton-block,
    .skeleton-row {
        height: 140px;
        border-radius: 20px;
        background: linear-gradient(90deg, rgba(115, 115, 115, 0.15) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(115, 115, 115, 0.15) 100%);
        background-size: 200% 100%;
        animation: shimmer 1.5s linear infinite;
    }

    .skeleton-row {
        height: 70px;
    }

    @keyframes shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    @media (max-width: 1024px) {
        .account-shell {
            grid-template-columns: 1fr;
        }

        .account-sidebar {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .account-sidebar-title {
            margin-bottom: 0;
        }

        .account-nav {
            flex-direction: row;
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .account-nav-link {
            flex: 1 0 calc(50% - 0.75rem);
        }

        .account-summary-header {
            flex-direction: row;
        }

        .account-summary-stats {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    @media (max-width: 768px) {
        .menu-toggle {
            display: flex;
        }

        .primary-nav {
            position: absolute;
            top: calc(100% + 0.4rem);
            left: 0;
            right: 0;
            display: none;
            padding: 0.35rem 0;
            background: rgba(255, 255, 255, 0.92);
            border-radius: 10px;
            border: 1px solid rgba(214, 32, 39, 0.12);
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
            backdrop-filter: blur(8px);
        }

        .home-header.is-nav-open .primary-nav {
            display: block;
        }

        .primary-nav .nav-list {
            flex-direction: column;
            gap: 0;
            width: 100%;
        }

        .nav-item {
            width: 100%;
            flex-direction: column;
            align-items: stretch;
        }

        .nav-item + .nav-item::before {
            display: none;
        }

        .nav-link {
            width: 100%;
            justify-content: flex-start;
            padding: 0.65rem 1.35rem;
            border-radius: 8px;
            font-size: 0.82rem;
        }

        .nav-link.is-active {
            background: rgba(214, 32, 39, 0.08);
            color: var(--home-primary);
        }

        .nav-link .nav-link-icon {
            font-size: 0.95rem;
        }

        .nav-account-toggle {
            width: 100%;
            justify-content: flex-start;
        }

        .nav-account-menu {
            position: static;
            border: none;
            box-shadow: none;
            padding: 0.45rem 1.35rem 0.6rem;
            margin-top: 0;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
            border-bottom: none;
            gap: 0.35rem;
            display: none;
            flex-direction: column;
            align-items: stretch;
            background: rgba(255, 255, 255, 0.96);
            border-radius: 0 0 10px 10px;
        }

        .nav-account-menu.is-open {
            display: flex;
        }

        .nav-account-info {
            padding: 0.5rem 0 0.45rem;
            border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        }

        .nav-account-avatar {
            width: 36px;
            height: 36px;
        }

        .nav-account-profile {
            gap: 0.55rem;
        }

        .nav-account-details strong {
            font-size: 0.88rem;
        }

        .nav-account-details .nav-account-meta {
            font-size: 0.75rem;
        }

        .nav-sub-link {
            padding: 0.45rem 0;
            font-size: 0.83rem;
        }

        .nav-auth-logout {
            justify-content: flex-start;
        }

        .header-actions {
            display: flex;
        }

        #headerAuthTarget {
            display: none;
        }

        .header-inner {
            grid-template-columns: 1fr auto;
        }

        .hero-title-line {
            display: block;
        }

        .hero-title-line + .hero-title-line {
            margin-left: 0;
        }

        .hero-search {
            flex-direction: row;
            align-items: center;
            padding: 0.5rem 0.55rem 0.5rem 0.75rem;
            gap: 0.5rem;
            width: min(85vw, 340px);
            margin: 0.35rem auto 0;
            border-radius: 10px;
        }

        .hero-centered .hero-search {
            width: min(85vw, 340px);
        }

        .hero-search input {
            font-size: 0.88rem;
            padding: 0.48rem 0.7rem;
            border-radius: 10px;
        }

        .hero-search .btn {
            flex-shrink: 0;
            padding: 0.48rem 1.15rem;
            font-size: 0.88rem;
            border-radius: 10px;
        }

        .account-main {
            padding: 1.75rem 0 3rem;
        }

        .account-sidebar {
            flex-direction: column;
            align-items: stretch;
        }

        .account-nav {
            width: 100%;
            flex-direction: column;
        }

        .account-nav-link {
            flex: none;
        }

        .account-summary-header {
            flex-direction: column;
            align-items: flex-start;
        }

        .account-summary-stats {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .account-summary-detail-grid {
            grid-template-columns: 1fr;
        }

        .account-history-table {
            min-width: 100%;
        }

        .hero-split .hero-stack {
            display: flex;
            flex-direction: column;
            text-align: center;
            gap: 1.75rem;
        }

        .hero-split .hero-body {
            align-items: center;
            text-align: center;
        }

        .hero-split .hero-heading {
            align-items: center;
        }

        .hero-split .hero-visual {
            order: 1;
        }

        .home-contest-layout {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }

        .home-featured-media {
            border-radius: 8px;
            box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
        }

        .home-secondary-list {
            padding-left: 0;
            border-left: none;
        }

        .home-secondary-item + .home-secondary-item .home-secondary-link {
            border-top: 1px solid rgba(0, 0, 0, 0.08);
        }
    }
