/* Mobile & small-viewport refinements shared by all static pages */
:root {
    --nav-gap: clamp(0.5rem, 2vw, 0.75rem);
    --primary-orange: #f97316;
    --primary-amber: #d97706;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base mobile spacing resets */
@media (max-width: 1023px) {
    /* Hide ALL desktop navigation links in ALL nav bars on mobile/tablet */
    nav .flex.space-x-2,
    nav .flex.space-x-4,
    nav .flex.space-x-6,
    nav .hidden.md\:flex,
    #authButtons,
    #userMenu {
        display: none !important;
    }

    /* Keep the logo/brand name centered or left, but remove space for hidden links */
    nav .flex.justify-between {
        justify-content: center !important;
    }
}

@media (max-width: 768px) {
    /* Hide legacy mobile menu buttons and containers */
    #mobileMenuBtn, 
    #mobileMenu,
    .md\:hidden.p-2.rounded-lg.hover\:bg-amber-700,
    nav button[id*="mobile"],
    nav div[id*="mobile"] {
        display: none !important;
    }

    /* Professional Card styling on mobile - make it full width on very small screens */
    .bg-white.rounded-xl, 
    .bg-white.rounded-2xl,
    .card,
    .glass-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 1.5rem !important; /* Slightly more rounded for modern look */
        padding: 1.5rem 1rem !important;
        width: calc(100% - 1.25rem) !important;
        margin: 0.75rem auto !important;
    }

    .glass-card {
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07) !important;
    }
    
    /* Remove body padding to allow full-width cards */
    body {
        padding: 0 !important;
    }
    
    .max-w-3xl, .max-w-4xl, .max-w-7xl {
        padding: 0 !important;
    }

    /* Teacher Panel Cards (Admin) */
    .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4.gap-4 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 0 0.75rem !important;
    }

    /* Target the teacher panel links specifically */
    a[href^="admin-"] {
        display: grid !important;
        grid-template-columns: 60px 1fr !important;
        grid-template-areas: 
            "icon title"
            "icon desc" !important;
        align-items: center !important;
        text-align: left !important;
        padding: 1.25rem 1rem !important;
        gap: 0 0.75rem !important;
        border-radius: 16px !important;
        width: calc(100% - 1.5rem) !important;
        margin: 0.5rem auto !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }

    a[href^="admin-"] .text-4xl {
        grid-area: icon !important;
        font-size: 2.5rem !important;
        margin-bottom: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    a[href^="admin-"] h4 {
        grid-area: title !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        align-self: end !important; /* Title closer to top half of icon */
        line-height: 1.2 !important;
    }

    a[href^="admin-"] p {
        grid-area: desc !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0.9rem !important;
        opacity: 0.95 !important;
        align-self: start !important; /* Description in bottom half of icon area */
        line-height: 1.3 !important;
        white-space: normal !important; /* Allow normal wrapping */
    }

    .bg-white.rounded-xl h3, 
    .bg-white.rounded-2xl h3 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
        margin-top: 0.5rem !important;
    }

    .bg-white.rounded-xl p, 
    .bg-white.rounded-2xl p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        color: #4b5563 !important;
    }

    .bg-white.rounded-xl .text-5xl,
    .bg-white.rounded-2xl .text-5xl {
        font-size: 3rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Form improvements */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 0.875rem 1rem !important;
        width: 100% !important;
        background-color: #fff !important;
        border: 1.5px solid #e5e7eb !important;
        border-radius: 12px !important;
        appearance: none !important; /* Remove native arrow */
    }

    /* Custom arrow for select dropdowns */
    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 1rem center !important;
        background-size: 1.25rem !important;
        padding-right: 2.5rem !important;
    }

    label {
        margin-bottom: 0.6rem !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        display: flex !important;
        align-items: center !important;
        text-align: left !important;
        font-size: 0.95rem !important;
    }

    /* Tooltip adjustments for mobile */
    .cursor-help {
        width: 22px !important;
        height: 22px !important;
        font-size: 14px !important;
        background-color: #f3f4f6 !important;
        color: #6b7280 !important;
        margin-left: 4px !important;
    }

    /* Grid spacing for mobile fields */
    .space-y-6 > * + * {
        margin-top: 1.75rem !important;
    }

    /* Custom Dropdown Styles */
    .custom-select-container {
        position: relative;
        width: 100%;
    }

    .custom-select-trigger {
        width: 100% !important;
        background-color: #fff !important;
        border: 1.5px solid #e5e7eb !important;
        border-radius: 12px !important;
        padding: 0.875rem 1rem !important;
        font-size: 16px !important;
        color: #374151;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .custom-select-trigger:after {
        content: "";
        width: 1.25rem;
        height: 1.25rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        transition: transform 0.3s ease;
    }

    .custom-select-container.open .custom-select-trigger:after {
        transform: rotate(180deg);
    }

    .custom-select-container.open .custom-select-trigger {
        border-color: #f59e0b !important;
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    }

    .custom-options {
        position: absolute;
        top: calc(100% + 5px);
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: 250px;
        overflow-y: auto;
        display: none;
        padding: 0.5rem;
        animation: selectFadeIn 0.2s ease-out;
    }

    @keyframes selectFadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .custom-select-container.open .custom-options {
        display: block;
    }

    .custom-option {
        padding: 0.75rem 1rem;
        font-size: 16px;
        color: #4b5563;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .custom-option:hover {
        background-color: #fff7ed;
        color: #f59e0b;
    }

    .custom-option.selected {
        background-color: #f59e0b;
        color: #fff;
        font-weight: 600;
    }

    /* Hide native select but keep it for form submission */
    .native-select-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    /* Footer mobile alignment */
    footer {
        text-align: center !important;
    }
    
    footer .grid {
        gap: 2.5rem !important;
    }
    
    footer ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Button professional look - targeted to actual buttons, not large cards */
    .btn, 
    button, 
    a.bg-amber-600, 
    a.bg-orange-600, 
    a.bg-gradient-to-r,
    .cta-button {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        letter-spacing: 0.01em;
    }

    /* Ensure cards stay vertical */
    .bg-white.rounded-xl, 
    .bg-white.rounded-2xl {
        display: flex !important;
        flex-direction: column !important;
        text-align: left !important; /* Changed to left for better form readability */
    }

    /* Center only specific informational headings if needed */
    .bg-white.rounded-xl h2, 
    .bg-white.rounded-2xl h2 {
        text-align: center !important;
        width: 100%;
        margin-bottom: 0.5rem !important;
    }

    .bg-white.rounded-xl > p:first-of-type, 
    .bg-white.rounded-2xl > p:first-of-type {
        text-align: center !important;
        width: 100%;
        margin-bottom: 1.5rem !important;
    }

    /* Keep upload box content centered */
    .border-dashed {
        height: auto !important;
        min-height: 140px !important;
        padding: 1rem !important;
    }
    
    .border-dashed div {
        text-align: center !important;
        padding: 0 !important;
    }

    .border-dashed p {
        margin-bottom: 0.25rem !important;
    }

    /* Tables on mobile */
    .overflow-x-auto {
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        margin: 1rem 0;
    }

    /* Admin Filter improvements */
    #groupFilter {
        min-width: 200px;
    }
}

/* Professional slide-in menu improvements */
.global-menu-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.global-menu-toggle .line {
    width: 24px;
    height: 2.5px;
    border-radius: 4px;
    background: var(--primary-amber);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.global-menu-toggle.active {
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.global-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(85vw, 340px);
    background: #fff;
    z-index: 1099;
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.15);
}

.global-menu-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 1rem;
}

.drawer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-amber);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-links {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.global-menu-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: #4b5563;
    font-weight: 500;
    font-size: 1.05rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.global-menu-link:hover {
    background: #fff7ed;
    color: var(--primary-amber);
    padding-left: 1.5rem;
}

.global-menu-link.active {
    background: var(--primary-amber);
    color: #fff;
    font-weight: 600;
}

.global-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1098;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.global-menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

    /* Typography adjustments */
    h2.text-3xl {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }

    /* Section specifically for exam/registration descriptions */
    .bg-white > p.text-gray-600 {
        font-size: 0.95rem !important;
        margin-bottom: 2rem !important;
        padding: 0 0.5rem;
    }

    /* Fix download section on mobile */
    #downloadSection {
        padding: 1.25rem !important;
        margin: 1rem 0 !important;
    }
    
    #downloadSection .flex {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    #downloadSection .bg-blue-500 {
        margin-bottom: 1rem;
    }

main, section, .form-container, .admin-dashboard {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Tabs and Pills for mobile */
@media (max-width: 768px) {
    .flex-wrap {
        gap: 0.5rem !important;
    }

    button[data-exam-course],
    button[data-course],
    .tab-btn {
        flex: 1 1 calc(50% - 0.5rem); /* 2 columns for tabs */
        min-width: 140px;
        font-size: 0.9rem !important;
        padding: 0.75rem 0.5rem !important;
    }
}

/* Professional status messages */
#statusMessage {
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1024px) {
    .global-menu-toggle, .global-menu-drawer, .global-menu-overlay {
        display: none !important;
    }
}

/* Homepage-specific mobile tuning */
@media (max-width: 768px) {
    .home-page nav .max-w-7xl {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .home-page nav .flex.justify-between {
        justify-content: flex-start !important;
        align-items: center !important;
        min-height: 4.5rem !important;
        padding-right: 4.8rem !important;
    }

    .home-page .home-brand {
        display: block !important;
        max-width: 12rem;
        font-size: clamp(1.15rem, 6.6vw, 1.52rem) !important;
        line-height: 1.02 !important;
        letter-spacing: -0.045em !important;
        color: #f8fcff !important;
        text-shadow: 0 8px 22px rgba(0, 29, 57, 0.28);
    }

    .home-page .global-menu-toggle {
        width: 4rem !important;
        height: 4rem !important;
        right: 1rem !important;
        top: 1rem !important;
        border-radius: 1.4rem !important;
    }

    .home-page .site-shell::before {
        width: 20rem;
        height: 20rem;
        left: -8rem;
        top: 1rem;
        opacity: 0.38;
    }

    .home-page .site-shell::after {
        width: 18rem;
        height: 18rem;
        right: -8rem;
        top: 22rem;
        opacity: 0.24;
    }

    .home-page .home-hero-card {
        background: linear-gradient(160deg, rgba(245, 251, 255, 0.28), rgba(152, 199, 230, 0.16)) !important;
        border: 1px solid rgba(255, 255, 255, 0.42) !important;
        box-shadow: 0 24px 70px rgba(0, 29, 57, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.46) !important;
        padding: 1.75rem 1.15rem !important;
    }

    .home-page .hero-eyebrow {
        background: rgba(123, 189, 232, 0.18) !important;
        border-color: rgba(73, 118, 159, 0.18) !important;
        color: #5d7f98 !important;
    }

    .home-page .hero-title {
        font-size: clamp(3.15rem, 16vw, 4.55rem) !important;
        line-height: 0.92 !important;
        color: #0b2742 !important;
        text-shadow: none !important;
        margin-bottom: 1.25rem !important;
    }

    html[lang="ru"] .home-page .hero-title {
        font-size: clamp(2.18rem, 10.5vw, 2.65rem) !important;
        line-height: 1.04 !important;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .home-page .hero-copy {
        color: #284865 !important;
        font-size: 1.05rem !important;
        line-height: 1.72 !important;
        margin-bottom: 1.6rem !important;
        max-width: none !important;
    }

    .home-page .primary-cta {
        font-size: 1rem !important;
        padding: 1rem 1.2rem !important;
    }

    html[lang="ru"] .home-page .primary-cta,
    html[lang="ru"] .home-page .home-secondary-cta {
        font-size: 0.98rem !important;
        line-height: 1.35 !important;
        padding-left: 0.95rem !important;
        padding-right: 0.95rem !important;
    }

    .home-page .home-secondary-cta {
        background: rgba(255, 255, 255, 0.18) !important;
        border-color: rgba(73, 118, 159, 0.22) !important;
        color: #173754 !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
    }

    .home-page .site-shell > section:first-of-type {
        padding-top: 2rem !important;
        padding-bottom: 1.75rem !important;
    }

    .home-page .site-shell > section:nth-of-type(2) {
        padding-top: 1.75rem !important;
    }

    .home-page .hero-visual-stack {
        display: grid !important;
        gap: 1rem !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    .home-page .hero-visual-stack .liquid-orb {
        display: none !important;
    }

    .home-page .floating-info-card {
        background: linear-gradient(160deg, rgba(113, 174, 216, 0.28), rgba(10, 65, 116, 0.38)) !important;
        position: relative !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: calc(100% - 1.25rem) !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0.35rem auto !important;
        padding: 1.2rem 1.05rem !important;
        transform: none !important;
        border-radius: 1.45rem !important;
    }

    html[lang="ru"] .home-page .floating-info-card {
        width: calc(100% - 1.25rem) !important;
        max-width: none !important;
    }

    .home-page .floating-info-card p:first-child {
        letter-spacing: 0.16em !important;
        font-size: 0.75rem !important;
        color: #d8ecf7 !important;
    }

    .home-page .floating-info-card p:nth-child(2) {
        font-size: clamp(1.65rem, 8vw, 2.15rem) !important;
        line-height: 1.08 !important;
    }

    html[lang="ru"] .home-page .floating-info-card p:nth-child(2) {
        font-size: clamp(1.55rem, 7.4vw, 2rem) !important;
        line-height: 1.1 !important;
    }

    .home-page .floating-info-card p:nth-child(3) {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
    }

    .home-page .floating-info-card p:nth-child(2),
    .home-page .floating-info-card p:nth-child(3) {
        color: #f7fbff !important;
    }

    .home-page .quick-card {
        background: linear-gradient(160deg, rgba(111, 175, 218, 0.26), rgba(10, 65, 116, 0.42)) !important;
        min-height: unset !important;
    }

    html[lang="ru"] .home-page .quick-card {
        gap: 0.15rem;
    }

    html[lang="ru"] .home-page .quick-card h3 {
        font-size: 1.55rem !important;
        line-height: 1.18 !important;
    }

    html[lang="ru"] .home-page .quick-card p {
        line-height: 1.58 !important;
    }

    .home-page .quick-card h3,
    .home-page .quick-card p,
    .home-page .quick-card span {
        color: #f7fbff !important;
    }

    .home-page .quick-card span {
        background: rgba(255, 255, 255, 0.14) !important;
        border: 1px solid rgba(255, 255, 255, 0.18);
    }

    .home-page .quick-icon {
        background: rgba(189, 216, 233, 0.18) !important;
        border-color: rgba(255, 255, 255, 0.24) !important;
    }
}

@media (max-width: 768px) {
    .gallery-mobile-page nav .max-w-7xl,
    .login-page nav .max-w-7xl,
    .signup-page nav .max-w-7xl,
    .profile-mobile-page nav .max-w-7xl,
    .verify-mobile-page nav .max-w-7xl {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .gallery-mobile-page nav .flex.justify-between,
    .login-page nav .flex.justify-between,
    .signup-page nav .flex.justify-between,
    .profile-mobile-page nav .flex.justify-between,
    .verify-mobile-page nav .flex.justify-between {
        justify-content: flex-start !important;
        align-items: center !important;
        min-height: 4.5rem !important;
        padding-right: 4.8rem !important;
    }

    .gallery-mobile-page .gallery-brand,
    .login-page .login-brand,
    .signup-page .signup-brand,
    .profile-mobile-page .profile-brand,
    .verify-mobile-page .verify-brand {
        display: block !important;
        max-width: 12rem;
        font-size: clamp(1.1rem, 6vw, 1.42rem) !important;
        line-height: 1.04 !important;
        letter-spacing: -0.04em !important;
        color: #f8fcff !important;
        text-shadow: 0 8px 22px rgba(0, 29, 57, 0.28);
    }

    .gallery-mobile-page .global-menu-toggle,
    .login-page .global-menu-toggle,
    .signup-page .global-menu-toggle,
    .profile-mobile-page .global-menu-toggle,
    .verify-mobile-page .global-menu-toggle {
        width: 4rem !important;
        height: 4rem !important;
        right: 1rem !important;
        top: 1rem !important;
        border-radius: 1.4rem !important;
    }

    .gallery-mobile-page .public-page-shell,
    .login-page .public-page-shell,
    .signup-page .public-page-shell,
    .profile-mobile-page .public-page-shell,
    .verify-mobile-page .public-page-shell {
        padding: 1.1rem 0.85rem 2rem !important;
    }

    .gallery-mobile-page .gallery-mobile-title,
    .profile-mobile-page .profile-mobile-title {
        font-size: clamp(2.7rem, 13vw, 4rem) !important;
        line-height: 0.98 !important;
        letter-spacing: -0.06em !important;
        text-wrap: balance;
    }

    .gallery-mobile-page .gallery-mobile-copy,
    .profile-mobile-page .profile-mobile-copy {
        font-size: 1.02rem !important;
        line-height: 1.65 !important;
        max-width: 100% !important;
        text-wrap: balance;
    }

    html[lang="ru"] .gallery-mobile-page .gallery-mobile-title {
        font-size: clamp(2.1rem, 10vw, 3rem) !important;
        line-height: 1.08 !important;
        letter-spacing: 0 !important;
    }

    html[lang="ru"] .gallery-mobile-page .gallery-mobile-copy,
    html[lang="ru"] .gallery-mobile-page .public-glass-card p,
    html[lang="ru"] .gallery-mobile-page .album-card h2,
    html[lang="ru"] .gallery-mobile-page .album-card p,
    html[lang="ru"] .gallery-mobile-page #albumMeta,
    html[lang="ru"] .gallery-mobile-page #emptyState p {
        line-height: 1.45 !important;
        letter-spacing: 0 !important;
    }

    html[lang="ru"] .gallery-mobile-page .album-card span,
    html[lang="ru"] .gallery-mobile-page #backToAlbums,
    html[lang="ru"] .gallery-mobile-page #downloadLightbox {
        white-space: normal !important;
        line-height: 1.25 !important;
    }

    .gallery-mobile-page .public-glass-card,
    .gallery-mobile-page #emptyState,
    .gallery-mobile-page #albumViewHeader {
        border-radius: 2rem !important;
        padding: 1.3rem !important;
    }

    .gallery-mobile-page #emptyState {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .gallery-mobile-page #emptyState h3 {
        font-size: 2rem !important;
        line-height: 1.08 !important;
        text-wrap: balance;
    }

    .gallery-mobile-page #emptyState p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        text-wrap: balance;
    }

    .gallery-mobile-page .lightbox #downloadLightbox {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 2rem);
        max-width: 20rem;
        justify-content: center;
        bottom: 1rem !important;
        padding: 0.95rem 1.2rem !important;
        border-radius: 1.35rem !important;
        font-size: 0.98rem !important;
    }

    .login-page .login-panel,
    .signup-page .signup-panel,
    .verify-mobile-page .public-glass-panel {
        width: calc(100% - 0.2rem) !important;
        margin: 0 auto !important;
        padding: 1.45rem 1.15rem !important;
        border-radius: 2rem !important;
    }

    .login-page .login-mobile-title,
    .signup-page .signup-mobile-title {
        font-size: clamp(2rem, 10vw, 2.45rem) !important;
        line-height: 1.02 !important;
        margin-bottom: 0.8rem !important;
    }

    .login-page .login-mobile-copy,
    .signup-page .signup-mobile-copy,
    .verify-mobile-page .verify-mobile-copy {
        font-size: 1rem !important;
        line-height: 1.65 !important;
        text-wrap: balance;
    }

    .login-page .login-panel input,
    .signup-page .signup-panel input,
    .signup-page .signup-panel select {
        min-height: 4.05rem !important;
        border-radius: 1.55rem !important;
        font-size: 1.02rem !important;
        padding-left: 1.15rem !important;
        padding-right: 1.15rem !important;
    }

    .login-page .login-panel label,
    .signup-page .signup-panel label {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
    }

    .profile-mobile-page .mb-14.text-center.md\\:text-left {
        margin-bottom: 2rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: center !important;
    }

    .profile-mobile-page .grid.grid-cols-1.lg\\:grid-cols-3 {
        gap: 1.4rem !important;
    }

    .profile-mobile-page .glass-card {
        padding: 1.35rem !important;
        border-radius: 2rem !important;
    }

    .profile-mobile-page .glass-card h2 {
        font-size: 2rem !important;
        line-height: 1.05 !important;
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }

    .profile-mobile-page #onlineUsersList {
        gap: 0.8rem !important;
    }

    .verify-mobile-page .verify-mobile-title {
        font-size: clamp(2.15rem, 10vw, 2.8rem) !important;
        line-height: 1.04 !important;
        text-wrap: balance;
    }

    .verify-mobile-page #verificationCard .grid {
        gap: 0.8rem !important;
    }

    .verify-mobile-page #verificationCard .flex.flex-col.sm\\:flex-row {
        gap: 0.8rem !important;
    }

    .verify-mobile-page #verificationCard button {
        min-height: 4.05rem !important;
        border-radius: 1.5rem !important;
        font-size: 1rem !important;
    }

    .courses-mobile-page nav .max-w-7xl,
    .reset-mobile-page nav .max-w-7xl,
    .legacy-registration-page nav .max-w-7xl {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .courses-mobile-page .courses-brand,
    .reset-mobile-page .reset-brand,
    .legacy-registration-page .legacy-registration-brand {
        display: block !important;
        max-width: 12rem;
        font-size: clamp(1.1rem, 6vw, 1.42rem) !important;
        line-height: 1.04 !important;
        letter-spacing: -0.04em !important;
    }

    .courses-mobile-page h1.courses-mobile-title {
        font-size: clamp(2.5rem, 12vw, 3.6rem) !important;
        line-height: 1 !important;
        text-wrap: balance;
    }

    .courses-mobile-page .courses-mobile-copy {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        text-wrap: balance;
    }

    .exam-mobile-page nav .max-w-7xl {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .exam-mobile-page nav .flex.justify-between {
        justify-content: flex-start !important;
        align-items: center !important;
        min-height: 4.25rem !important;
        padding-right: 4.55rem !important;
    }

    .exam-mobile-page nav h1.exam-brand,
    .exam-mobile-page nav .exam-brand {
        display: block !important;
        max-width: 8.9rem !important;
        margin: 0 !important;
        font-size: clamp(0.94rem, 4.9vw, 1.14rem) !important;
        font-weight: 800 !important;
        line-height: 0.9 !important;
        letter-spacing: -0.055em !important;
        white-space: normal !important;
        text-wrap: balance !important;
        color: #f8fcff !important;
        text-shadow: 0 8px 22px rgba(0, 29, 57, 0.28);
    }

    .exam-mobile-page .global-menu-toggle {
        width: 3.85rem !important;
        height: 3.85rem !important;
        right: 0.95rem !important;
        top: 0.95rem !important;
        border-radius: 1.35rem !important;
    }

    .exam-mobile-page .public-page-shell {
        padding: 0.9rem 0.7rem 1.75rem !important;
    }

    .exam-mobile-page .exam-panel {
        width: calc(100% - 0.4rem) !important;
        margin: 0 auto !important;
        padding: 1.3rem 1rem !important;
        border-radius: 1.8rem !important;
        background: linear-gradient(160deg, rgba(245, 251, 255, 0.24), rgba(152, 199, 230, 0.16)) !important;
        box-shadow: 0 22px 58px rgba(0, 29, 57, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.46) !important;
    }

    .exam-mobile-page .exam-mobile-title {
        font-size: clamp(1.78rem, 8.7vw, 2.28rem) !important;
        line-height: 0.98 !important;
        margin-bottom: 0.72rem !important;
        color: #0b2742 !important;
        text-wrap: balance;
    }

    .exam-mobile-page .exam-mobile-copy {
        font-size: 0.96rem !important;
        line-height: 1.58 !important;
        color: #284865 !important;
        margin-bottom: 1.25rem !important;
        padding: 0 !important;
        text-wrap: balance;
    }

    .exam-mobile-page .exam-panel label {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        margin-bottom: 0.55rem !important;
    }

    .exam-mobile-page .exam-upload-field-label {
        display: block !important;
    }

    .exam-mobile-page .exam-upload-field-label .upload-format-hint,
    .exam-mobile-page .exam-upload-field-label #performanceOptional {
        display: block !important;
        margin-top: 0.18rem !important;
        line-height: 1.35 !important;
    }

    html[lang="ru"] .exam-mobile-page .exam-mobile-title {
        font-size: clamp(1.68rem, 8.1vw, 2.16rem) !important;
        line-height: 1.08 !important;
        letter-spacing: 0 !important;
    }

    html[lang="ru"] .exam-mobile-page .exam-mobile-copy,
    html[lang="ru"] .exam-mobile-page .exam-panel label,
    html[lang="ru"] .exam-mobile-page .exam-panel input,
    html[lang="ru"] .exam-mobile-page .exam-panel select {
        line-height: 1.38 !important;
    }

    .exam-mobile-page .exam-panel .grid {
        gap: 0.95rem !important;
    }

    .exam-mobile-page .exam-panel input,
    .exam-mobile-page .exam-panel select,
    .exam-mobile-page .exam-panel textarea {
        min-height: 3.85rem !important;
        border-radius: 1.45rem !important;
        font-size: 0.98rem !important;
        padding-left: 1.05rem !important;
        padding-right: 1.05rem !important;
    }

    .exam-mobile-page #downloadSection,
    .exam-mobile-page #downloadLoading {
        border-radius: 1.6rem !important;
        padding: 1.15rem !important;
    }

    .exam-mobile-page #downloadSection .flex.items-center.gap-4 {
        gap: 0.9rem !important;
        align-items: flex-start !important;
    }

    .exam-mobile-page #downloadSection h3 {
        font-size: 1.08rem !important;
        line-height: 1.3 !important;
    }

    .exam-mobile-page #downloadSection p,
    .exam-mobile-page #downloadLoading p {
        font-size: 0.92rem !important;
        line-height: 1.55 !important;
    }

    .exam-mobile-page .public-cta,
    .exam-mobile-page button[type="submit"] {
        min-height: 4rem !important;
        border-radius: 1.5rem !important;
        font-size: 1rem !important;
    }

    .exam-mobile-page .exam-panel .group > span.cursor-help {
        width: 1.9rem !important;
        height: 1.9rem !important;
        font-size: 0.92rem !important;
    }

    .news-mobile-page nav .max-w-7xl {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .news-mobile-page nav .flex.justify-between {
        justify-content: flex-start !important;
        align-items: center !important;
        min-height: 4.5rem !important;
        padding-right: 4.8rem !important;
    }

    .news-mobile-page .news-brand {
        display: block !important;
        max-width: 12rem;
        font-size: clamp(1.1rem, 6vw, 1.42rem) !important;
        line-height: 1.04 !important;
        letter-spacing: -0.04em !important;
        color: #f8fcff !important;
        text-shadow: 0 8px 22px rgba(0, 29, 57, 0.28);
    }

    .news-mobile-page .global-menu-toggle {
        width: 4rem !important;
        height: 4rem !important;
        right: 1rem !important;
        top: 1rem !important;
        border-radius: 1.4rem !important;
    }

    .news-mobile-page .news-shell {
        padding: 1.2rem 0.95rem 2.2rem !important;
    }

    .news-mobile-page .news-page-header {
        margin-bottom: 2.4rem !important;
        padding-top: 0.2rem !important;
        text-align: center !important;
    }

    .news-mobile-page .news-back-link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 1.15rem !important;
        font-size: 0.98rem !important;
        line-height: 1.3 !important;
    }

    .news-mobile-page .news-back-link svg {
        width: 1.15rem !important;
        height: 1.15rem !important;
        margin-right: 0.45rem !important;
    }

    .news-mobile-page .news-mobile-title {
        font-size: clamp(3rem, 14vw, 4.3rem) !important;
        line-height: 0.96 !important;
        letter-spacing: -0.06em !important;
        margin-bottom: 0.95rem !important;
        text-wrap: balance;
    }

    html[lang="ru"] .news-mobile-page .news-mobile-title {
        font-size: clamp(2.5rem, 11.6vw, 3.15rem) !important;
        line-height: 1.04 !important;
        letter-spacing: -0.035em !important;
        overflow-wrap: normal;
        hyphens: none;
    }

    .news-mobile-page .news-mobile-copy {
        font-size: 1.08rem !important;
        line-height: 1.62 !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        color: rgba(243, 249, 255, 0.94) !important;
        text-wrap: balance;
    }

    .news-mobile-page .news-section-title {
        font-size: clamp(2rem, 9vw, 2.6rem) !important;
        line-height: 1.04 !important;
        letter-spacing: -0.05em !important;
        text-align: center !important;
    }

    html[lang="ru"] .news-mobile-page .news-section-title {
        font-size: clamp(1.75rem, 7.9vw, 2.2rem) !important;
        line-height: 1.12 !important;
        letter-spacing: -0.025em !important;
    }

    .news-mobile-page .flex.items-center.gap-3.mb-8 {
        flex-direction: column !important;
        gap: 0.55rem !important;
        justify-content: center !important;
        margin-bottom: 1.4rem !important;
        text-align: center !important;
    }

    .news-mobile-page #announcementsLoading,
    .news-mobile-page #loadingState {
        padding-top: 1.2rem !important;
        padding-bottom: 1.2rem !important;
    }

    .news-mobile-page #announcementsLoading p,
    .news-mobile-page #loadingState p {
        font-size: 0.96rem !important;
        line-height: 1.55 !important;
    }

    .news-mobile-page #announcementsEmpty,
    .news-mobile-page #emptyState {
        width: calc(100% - 0.2rem) !important;
        padding: 2.2rem 1.4rem !important;
        border-radius: 2.1rem !important;
        margin-bottom: 2.5rem !important;
    }

    .news-mobile-page #announcementsEmpty .w-20,
    .news-mobile-page #emptyState .w-20 {
        width: 5.2rem !important;
        height: 5.2rem !important;
        margin-bottom: 1.15rem !important;
    }

    .news-mobile-page #announcementsEmpty h3,
    .news-mobile-page #emptyState h3 {
        font-size: 2rem !important;
        line-height: 1.08 !important;
        margin-bottom: 0.8rem !important;
        text-wrap: balance;
    }

    .news-mobile-page #announcementsEmpty p,
    .news-mobile-page #emptyState p {
        font-size: 1rem !important;
        line-height: 1.65 !important;
        text-wrap: balance;
    }

    .news-mobile-page #announcementsGrid,
    .news-mobile-page #seminarsGrid {
        gap: 1.25rem !important;
    }

    .news-mobile-page .announcement-card,
    .news-mobile-page .seminar-card {
        border-radius: 2rem !important;
    }

    html[lang="ru"] .news-mobile-page .announcement-card,
    html[lang="ru"] .news-mobile-page .seminar-card {
        padding: 1.35rem 1.05rem !important;
    }

    html[lang="ru"] .news-mobile-page .announcement-card h3,
    html[lang="ru"] .news-mobile-page .seminar-card h3 {
        font-size: 1.24rem !important;
        line-height: 1.22 !important;
    }

    html[lang="ru"] .news-mobile-page .announcement-card p,
    html[lang="ru"] .news-mobile-page .seminar-card p,
    html[lang="ru"] .news-mobile-page .announcement-card span,
    html[lang="ru"] .news-mobile-page .seminar-card span {
        line-height: 1.5 !important;
    }

    html[lang="ru"] .news-mobile-page .announcement-card a,
    html[lang="ru"] .news-mobile-page .seminar-card a,
    html[lang="ru"] .news-mobile-page .seminar-card button {
        min-height: 3.65rem !important;
        white-space: normal !important;
        line-height: 1.25 !important;
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    html[lang="ru"] .news-mobile-page #registrationModal .bg-white {
        width: calc(100% - 0.4rem) !important;
        border-radius: 1.8rem !important;
    }

    html[lang="ru"] .news-mobile-page #registrationModal h2 {
        font-size: 1.55rem !important;
        line-height: 1.18 !important;
    }

    .register-page nav .max-w-7xl {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .register-page nav .flex.justify-between {
        justify-content: flex-start !important;
        align-items: center !important;
        min-height: 4.5rem !important;
        padding-right: 4.8rem !important;
    }

    .register-page .register-brand {
        display: block !important;
        max-width: 12rem;
        font-size: clamp(1.1rem, 6.1vw, 1.44rem) !important;
        line-height: 1.04 !important;
        letter-spacing: -0.04em !important;
        color: #f8fcff !important;
        text-shadow: 0 8px 22px rgba(0, 29, 57, 0.28);
    }

    .register-page .global-menu-toggle {
        width: 4rem !important;
        height: 4rem !important;
        right: 1rem !important;
        top: 1rem !important;
        border-radius: 1.4rem !important;
    }

    .register-page .public-page-shell {
        padding: 1.1rem 0.75rem 2rem !important;
    }

    .register-page .register-panel {
        width: calc(100% - 0.4rem) !important;
        margin: 0 auto !important;
        padding: 1.5rem 1.15rem !important;
        border-radius: 2rem !important;
        background: linear-gradient(160deg, rgba(245, 251, 255, 0.24), rgba(152, 199, 230, 0.16)) !important;
        box-shadow: 0 22px 58px rgba(0, 29, 57, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.46) !important;
    }

    .register-page .register-panel h2 {
        font-size: clamp(2rem, 10vw, 2.55rem) !important;
        line-height: 1.02 !important;
        margin-bottom: 0.85rem !important;
        color: #0b2742 !important;
    }

    .register-page .register-panel > p.text-gray-600 {
        font-size: 1.02rem !important;
        line-height: 1.72 !important;
        color: #284865 !important;
        margin-bottom: 1.6rem !important;
        padding: 0 !important;
    }

    .register-page .register-panel label {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        margin-bottom: 0.55rem !important;
    }

    .register-page .register-panel .grid {
        gap: 1.1rem !important;
    }

    .register-page .register-panel input,
    .register-page .register-panel select,
    .register-page .register-panel textarea {
        min-height: 4.1rem !important;
        border-radius: 1.6rem !important;
        font-size: 1.03rem !important;
        padding-left: 1.2rem !important;
        padding-right: 1.2rem !important;
    }

    .register-page .register-panel .birthdate-display-wrapper,
    .register-page .register-panel .birthdate-input-shell {
        min-height: 4.1rem !important;
    }

    .register-page .register-panel .birthdate-age-pill {
        transform: scale(0.94);
        transform-origin: right center;
    }

    .register-page .register-panel button[type="submit"],
    .register-page .register-panel .public-cta {
        min-height: 4.25rem !important;
        font-size: 1.05rem !important;
        border-radius: 1.6rem !important;
    }

    html[lang="ru"] .register-page .register-brand {
        max-width: 13.2rem !important;
        font-size: clamp(1rem, 5.4vw, 1.28rem) !important;
        line-height: 1.12 !important;
    }

    html[lang="ru"] .register-page .register-panel h2 {
        font-size: clamp(1.78rem, 8.4vw, 2.28rem) !important;
        line-height: 1.14 !important;
        letter-spacing: 0 !important;
    }

    html[lang="ru"] .register-page .register-panel > p.text-gray-600 {
        font-size: 0.98rem !important;
        line-height: 1.58 !important;
    }

    html[lang="ru"] .register-page .register-panel label,
    html[lang="ru"] .register-page .register-panel select,
    html[lang="ru"] .register-page .register-panel input {
        line-height: 1.35 !important;
    }

    html[lang="ru"] .register-page .birthdate-picker {
        max-width: 100% !important;
    }

    html[lang="ru"] .register-page .birthdate-picker-header {
        align-items: flex-start !important;
    }

    html[lang="ru"] .register-page .birthdate-picker-title,
    html[lang="ru"] .register-page .birthdate-selected-preview,
    html[lang="ru"] .register-page .birthdate-picker-footer span {
        line-height: 1.35 !important;
    }

    html[lang="ru"] .register-page .birthdate-quick-btn {
        white-space: normal !important;
        line-height: 1.15 !important;
        min-width: 5.4rem !important;
    }

    html[lang="ru"] .register-page .register-panel button[type="submit"],
    html[lang="ru"] .register-page .register-panel .public-cta,
    html[lang="ru"] .register-page #successModal button {
        white-space: normal !important;
        line-height: 1.28 !important;
    }

    html[lang="ru"] .register-page #successModal h3 {
        font-size: 1.8rem !important;
        line-height: 1.16 !important;
    }
}
