html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (max-width: 1100px) {
    body { background: #301c24; }
    .site-shell {
        width: 100%;
        zoom: 1;
        min-height: 100vh;
        font-size: 16px;
        background-image: linear-gradient(transparent 280px, #301c24 680px), url('../assets/theme/background.webp');
        background-size: 100% 800px, auto 800px;
        background-position: center 40px, 64% 40px;
    }

    .site-shell .navbar { height: 64px; position: sticky; top: 0; }
    .site-shell .navbar-inner { width: 100%; height: 62px; margin: 0; padding: 0 16px; gap: 12px; }
    .site-shell .navbar-logo { display: block; margin: 0 auto 0 0; flex: 0 1 100px; }
    .site-shell .navbar-logo img { width: 100px; height: 55px; }
    .site-shell .nav-toggle { display: flex; width: 44px; height: 44px; flex-shrink: 0; padding: 11px; }
    .site-shell .navbar-right { margin: 0; padding: 0; gap: 10px; min-width: 0; }
    .site-shell .nav-account { min-height: 44px; }
    .site-shell .nav-account-name { max-width: 66px; }
    .site-shell .nav-logout { display: none; }
    .site-shell .lang-selected { height: 44px; min-height: 44px; min-width: 76px; font-size: 14px; }
    .site-shell .lang-option { min-height: 48px; font-size: 16px; }
    .site-shell .navbar-nav {
        display: none; position: absolute; inset: 100% 0 auto;
        padding: 12px 16px; background: #301e29; border-bottom: 1px solid #b1879d;
        box-shadow: 0 12px 24px #140b1b55; max-height: calc(100dvh - 64px); overflow-y: auto;
    }
    .site-shell .navbar.menu-open .navbar-nav {
        display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
        position: absolute; padding: 12px 16px; gap: 6px; background: #301e29;
        border-bottom: 1px solid #b1879d; box-shadow: 0 12px 24px #140b1b55;
    }
    .site-shell .nav-link, html[lang="ro"] .site-shell .nav-link {
        display: flex; width: 100%;
        min-height: 48px; padding: 12px 8px; font-size: 14px; line-height: 1.4;
        letter-spacing: .2px; justify-content: center; white-space: normal; text-align: center;
    }
    .site-shell .navbar-nav .dropdown-menu { display: none; }

    .site-shell .hero { height: 280px; }
    .site-shell .hero-inner { width: 100%; max-width: 800px; height: 100%; margin: auto; padding: 0; }
    .site-shell .hero-brand { left: 16px; top: auto; bottom: 28px; width: min(70%, 320px); height: auto; }
    .site-shell .hero-logo { width: 100%; height: auto; filter: drop-shadow(0 5px 9px #3f253755); }
    .site-shell .site-background { min-height: 0; }
    .site-shell .content-wrapper { width: calc(100% - 32px); max-width: 800px; margin: 0 auto; padding: 0 0 32px; }
    .top-panel { height: auto; grid-template-columns: minmax(0,1fr); gap: 14px; padding: 12px; border: 1px solid #997586; border-radius: 8px; }
    .top-download { padding: 0; }
    .top-download-button { width: 100%; height: 64px; gap: 4px; }
    .top-download-button strong { font-size: 18px; }
    .top-download-button span { font-size: 12px; }
    .quick-news { display: none; }
    .feature-tiles { height: auto; gap: 8px; }
    .feature-tile { border-radius: 4px; }
    .feature-tile > img { height: 88px; flex: none; }
    .feature-tile > span { min-height: 40px; height: auto; padding: 8px 3px; font-size: 14px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }

    .site-shell .main-layout { width: 100%; margin: 16px 0 0; grid-template-columns: minmax(0,1fr); gap: 16px; }
    .site-shell .main-right { grid-row: 1; }
    .site-shell .main-left { display: flex; gap: 16px; margin: 0; }
    .site-shell .widget, .site-shell .news-widget { border: 1px solid #876274; border-radius: 8px; background-color: #301e29; }
    .site-shell .widget-header { height: auto; min-height: 52px; padding: 12px 16px; font-size: 16px; background-size: 100% 100%; }
    .site-shell .news-widget { min-height: 0; }
    .news-toolbar { height: auto; padding: 16px 12px 20px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
    .news-toolbar-title { font-size: 16px; }
    .news-toolbar::after { left: 12px; right: 12px; height: 8px; background-size: 100% auto; }
    .news-filters { flex-wrap: wrap; gap: 8px; }
    .news-filter { flex: 1 1 calc(33.333% - 8px); min-height: 44px; height: auto; padding: 9px 6px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
    .news-content { padding: 12px; }
    .site-shell .news-article { min-height: 180px; border-radius: 5px; }
    .site-shell .news-article-header { height: auto; padding: 16px 14px 0; flex-wrap: wrap; gap: 8px; align-items: center; }
    .site-shell .news-article-title { font-size: 18px; line-height: 1.4; padding: 4px 8px; overflow-wrap: anywhere; }
    .site-shell .news-article-date { font-size: 13px; line-height: 1.5; white-space: normal; }
    .site-shell .news-article-body { padding: 16px 14px; gap: 16px; }
    .site-shell .news-article-excerpt { min-height: 0; font-size: 16px; line-height: 1.65; font-weight: 400; overflow-wrap: anywhere; }
    .site-shell .news-article-image { width: 100%; height: auto; max-height: none; margin: 0; }
    .news-empty { padding: 20px 8px; }
    .news-community { padding: 16px; min-height: 0; }
    .site-shell .news-community .social-bar { max-width: 100%; flex-wrap: wrap; margin: 16px 0; padding: 6px; }
    .site-shell .news-community .social-icon-link { width: 44px; height: 44px; }
    .event-item-inner { flex-wrap: wrap; gap: 4px 12px; }
    .event-title { font-size: 15px; }
    .event-time { font-size: 13px; }
    .events-page-btn { width: 44px; height: 44px; }

    .userpanel { min-height: 0; }
    .sidebar-login-form { padding: 16px; }
    .sidebar-label-row { gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
    .sidebar-login-form label { height: auto; font-size: 14px; padding: 0; }
    .sidebar-label-row a { min-height: 32px; padding: 5px 6px; font-size: 12px; line-height: 22px; }
    .sidebar-input-wrap, .site-shell .sidebar-input-wrap input { height: 48px; }
    .site-shell .sidebar-input-wrap input { font-size: 16px; }
    .sidebar-login-submit { width: 100%; height: 48px; margin: 20px 0 0; font-size: 16px; }
    .sidebar-login-form .form-error.visible { margin: 12px 0 0; font-size: 14px; }
    .sidebar-account { min-height: 0; padding: 20px; }
    .sidebar-logout { min-height: 44px; font-size: 14px; }
    .site-shell .statistics-bar { width: 100%; height: auto; }
    .site-shell .statistics-inner { width: 100%; height: auto; padding: 12px; gap: 8px; flex-wrap: nowrap; }
    .site-shell .statistics-item, .site-shell .statistics-item:last-child { width: 100%; min-height: 48px; height: auto; flex: none; padding: 10px; }
    .site-shell .statistics-text { min-width: 0; }
    .site-shell .statistics-label { font-size: 14px; white-space: normal; }
    .site-shell .statistics-value { font-size: 16px; flex-shrink: 0; }
    .site-shell .statistics-icon { flex-shrink: 0; }
    .site-shell .ranking-widget { height: auto; margin: 0; }
    .site-shell .ranking-widget .widget-header { padding: 8px 16px; }
    .site-shell .ranking-tabs .btn-tab { width: 44px; height: 44px; padding: 12px; }
    .site-shell .ranking-tabs .btn-tab img { width: 18px; height: 18px; }
    .site-shell .ranking-list { padding: 16px 10px; }
    .ranking-podium { height: 205px; gap: 6px; max-width: 420px; margin: auto; }
    .podium-place { width: calc((100% - 12px) / 3); min-width: 0; }
    .podium-frame { max-width: 100%; background-size: 100% auto; }
    .podium-frame::before { width: 100%; }
    .podium-name { width: 100%; height: auto; min-height: 30px; line-height: 20px; padding: 4px 2px; font-size: 12px; }

    .site-shell .register-view, .site-shell .ranking-view, .site-shell .download-view, .site-shell .profile-view { padding: 0 16px 32px; }
    .site-shell .register-form { padding: 20px 16px; }
    .site-shell .download-inner { max-width: 800px; padding: 12px; }
    .site-shell .download-header { flex-wrap: wrap; gap: 12px; padding: 16px 12px; }
    .site-shell .download-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
    .download-card { min-height: 80px; }
    .site-shell .profile-inner { max-width: 800px; }
    .site-shell .profile-layout, .site-shell .profile-chars-grid { grid-template-columns: minmax(0,1fr); }
    .site-shell .ranking-page-header { flex-wrap: wrap; padding: 16px 12px 0; }
    .ranking-page-table { overflow-x: auto; }
    .rp-row, .rp-table-head { min-width: 545px; }
    .register-close, .login-close { width: 44px; height: 44px; }
    .register-header-left, .login-header-left { min-width: 0; gap: 8px; }
    .register-title, .login-title { overflow-wrap: anywhere; font-size: 14px; letter-spacing: .02em; }
    .login-logo, .register-logo { width: 70px; height: auto; }
    .login-modal { max-height: calc(100dvh - 28px); }
    .site-shell .footer { height: auto; }
    .site-shell .footer-inner { height: auto; min-height: 72px; padding: 20px 16px; }
    .site-shell .footer-copy { font-size: 12px; line-height: 1.6; text-align: center; }
}

@media (min-width: 600px) and (max-width: 1100px) {
    .site-shell { background-size: 100% 1050px, auto 1050px; background-position: center 32px, 62% 32px; }
    .site-shell .hero { height: 350px; }
    .site-shell .hero-brand { bottom: 38px; width: 350px; }
    .feature-tile > img { height: 150px; }
    .site-shell .main-left { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
    .site-shell .main-left .ranking-widget { grid-column: 1 / -1; }
    .news-filter { flex-basis: 0; }
    .site-shell .download-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
