/* Touch layout, loaded after the desktop component styles. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,a,summary{touch-action:manipulation}
.mobile-menu-toggle,.mobile-account-shortcut,.mobile-menu-backdrop{display:none}
.nav-panel{display:contents}
.login-modal{max-height:calc(100dvh - 32px);display:flex;flex-direction:column}
.login-modal-header{flex-shrink:0}
.login-form{overflow-y:auto;overscroll-behavior:contain;min-height:0}
.login-close{min-width:44px;min-height:44px}
body.login-is-open,body.mobile-menu-open{overflow:hidden}
.password-field{position:relative}
.password-field .form-input{padding-right:54px}
.password-toggle{position:absolute;right:3px;top:3px;width:42px;height:42px;border:0;background:transparent;color:#c8d4e8;cursor:pointer;display:flex;align-items:center;justify-content:center}
.password-toggle svg{width:22px;height:22px}
.password-toggle[aria-pressed=true]{color:#e8c384;background:#ffffff0a}
:is(.mobile-menu-toggle,.mobile-account-shortcut,.password-toggle,.login-close):focus-visible{outline:2px solid #b7d9ff;outline-offset:3px}
.login-overlay{height:var(--login-vh,100dvh);top:var(--login-vtop,0px);bottom:auto}
@media(max-width:1100px){
 .profile-layout{grid-template-columns:minmax(0,1fr)}
 .navbar,.navbar-inner{height:64px}.navbar-inner{padding:0 14px;gap:10px;justify-content:space-between}
 .navbar-logo{margin:0 auto 0 0}.navbar-logo img{width:112px;min-width:0;height:44px}
 .mobile-menu-toggle,.mobile-account-shortcut{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:1px solid #344967;border-radius:6px;padding:8px 11px;background:#142137;color:#e0eafa;font:600 13px var(--font-main);cursor:pointer}
 .mobile-menu-toggle svg{width:19px;height:19px}.mobile-account-shortcut{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .nav-panel{display:none;position:absolute;left:0;right:0;top:64px;max-height:calc(100dvh - 64px);overflow-y:auto;overscroll-behavior:contain;background:#0b1424;border-bottom:1px solid #39506e;padding:12px 18px calc(20px + env(safe-area-inset-bottom));box-shadow:0 16px 32px #0008}
 .navbar.menu-open .nav-panel{display:flex;flex-direction:column;gap:14px}
 .navbar-nav{display:flex;flex-direction:column;align-items:stretch;gap:0;flex:none}.nav-link{min-height:48px;padding:12px;font-size:16px;white-space:normal;border-bottom:1px solid #ffffff0a}
 .nav-dropdown .dropdown-menu{display:block;position:static;padding:0;min-width:0}.dropdown-menu-inner{background:transparent;border:0;box-shadow:none;padding:0 0 0 18px}.dropdown-item{min-height:44px;display:flex;align-items:center;font-size:15px}.nav-arrow{display:none}
 .navbar-right{display:flex;align-items:stretch;flex-wrap:wrap;gap:10px}.nav-login,.nav-register,.nav-account,.nav-logout{display:flex;min-height:48px;justify-content:center;align-items:center;flex:1 1 40%;padding:10px;border:1px solid #344967;border-radius:6px;font-size:15px}.nav-account-name{overflow:hidden;text-overflow:ellipsis}
 .nav-lang{width:100%;margin-top:2px}.lang-selected{min-height:48px;width:100%;padding:10px 14px;font-size:16px}.lang-arrow{margin-left:auto}.lang-dropdown{position:static;width:100%;max-height:none;margin-top:6px;box-shadow:none}.lang-option{min-height:48px;font-size:16px}
 .mobile-menu-backdrop:not([hidden]){display:block;position:fixed;inset:64px 0 0;background:#0008;z-index:999}
 .content-wrapper{padding:24px 16px 36px}.main-layout{grid-template-columns:minmax(0,1fr);gap:20px}.main-left,.main-right{min-width:0}.main-right{grid-row:1}
 .social-bar{position:relative;left:auto;top:auto;transform:none;flex-direction:row;justify-content:center;border-radius:0;padding:4px;order:0}.social-bar-bg{border-radius:0}.social-icon-link{width:48px;height:44px}.social-icon-link:hover{transform:none}
 .statistics-inner{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:20px 14px}.statistics-divider{display:none}.statistics-item{padding:0;justify-content:flex-start;gap:10px}.statistics-label{white-space:normal;font-size:12px}
 .footer-inner{padding:20px 16px}.footer-nav{gap:8px 16px}.footer-link{display:inline-flex;align-items:center;min-height:44px}.footer-left{flex-wrap:wrap}
 .register-view,.profile-view,.ranking-view{padding:20px 12px 32px;scroll-margin-top:76px}.register-form,.login-form{padding:20px 18px;gap:18px}
 .form-input,.profile-settings-card .form-input{font-size:16px;min-height:48px;padding:12px}.form-label{flex-wrap:wrap;gap:4px 8px}.form-error{overflow-wrap:anywhere}
 .register-close{min-width:44px;min-height:44px}.register-card-header,.login-modal-header{padding:12px 16px}.register-title,.login-title{font-size:14px}.register-header-left,.login-header-left{gap:10px;min-width:0}
 .register-submit-btn,.login-submit-btn,.profile-settings-btn{min-height:48px}.login-register-hint a,.register-login-hint a{display:inline-flex;align-items:center;min-height:44px;padding:4px 8px}
 .profile-hero{padding:20px 16px;gap:14px;flex-wrap:wrap}.profile-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-main{min-width:0}.profile-tabs{overflow-x:auto;flex-wrap:nowrap;max-width:100%;overscroll-behavior-x:contain}.profile-tab{min-height:48px;flex-shrink:0}.profile-panel{padding:16px}.profile-chars-grid,.profile-settings-grid{grid-template-columns:1fr}.profile-coins{flex-wrap:wrap}.ranking-table-wrapper{overflow-x:auto}
}
@media(max-width:600px){
 .mobile-menu-toggle{padding:8px;min-width:44px}.mobile-account-shortcut{font-size:12px;padding:8px;max-width:104px}.navbar-inner{gap:7px;padding:0 10px}.navbar-logo img{width:100px}
 .login-overlay{padding:8px;align-items:center;background:#040814e6}.login-modal{max-height:calc(var(--login-vh,100dvh) - 16px);border-radius:10px}.login-form{padding:16px;gap:14px}.login-title{letter-spacing:0}.login-logo,.register-logo{height:22px}.register-form{padding:20px 16px}
 .slider-caption{font-size:16px;padding:12px}.profile-avatar{width:54px;height:54px;font-size:22px}.footer-tagline{line-height:1.5}
}
@media(max-width:350px){.mobile-menu-toggle span{display:none}.mobile-menu-toggle{width:44px}.register-logo{display:none}}
@media(prefers-reduced-motion:reduce){.login-modal,.login-overlay,.page-exit-up,.page-exit-down,.page-enter-up,.page-enter-down{animation:none!important;transition:none!important}}

/* Mobile start page: one hero, clear entry points, compact server overview. */
.hero-mobile-actions{display:none}
@media(max-width:700px){
 .navbar-bg{background-image:none;background-color:#0c1020;border-bottom:1px solid #82729c45}
 .navbar-inner{padding-inline:16px;gap:8px}
 .navbar-logo img{width:114px;height:44px}
 .mobile-menu-toggle,.mobile-account-shortcut{background:#181e30;border-color:#42445a;border-radius:5px;font-size:13px}
 .hero{display:block;height:clamp(280px,78vw,370px);background:#090b19}
 .hero .hero-media,.hero video.hero-media{width:100%;height:100%;max-height:none;object-fit:cover;object-position:50% 46%}
 .hero::after{content:'';position:absolute;inset:45% 0 0;background:linear-gradient(transparent,#090d1bd9 72%,#090d1b);pointer-events:none}
 .hero-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;position:absolute;z-index:2;bottom:20px;left:16px;right:16px}
 .hero-mobile-actions a{min-height:50px;display:flex;align-items:center;justify-content:center;text-align:center;padding:12px 8px;font-size:14px;font-weight:650;line-height:1.25;border:1px solid #8c8198;background:#15172be8;border-radius:5px;color:#f0eaf5;box-shadow:0 3px 14px #0005}
 .hero-mobile-actions a:first-child{background:linear-gradient(#d4bb8e,#b8955f);border-color:#e8c996;color:#211c17}
 .hero-mobile-actions a:focus-visible{outline:2px solid #fff;outline-offset:3px}
 .statistics-bar{background:#090d1b;padding:0 16px 18px}
 .statistics-bg{display:none}
 .statistics-inner{grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;padding:1px;background:#333249;border:1px solid #333249;border-radius:8px;overflow:hidden}
 .statistics-item{min-width:0;min-height:76px;padding:12px 6px;gap:8px;justify-content:center;background:#131728;text-align:center}
 .statistics-item:nth-child(1),.statistics-item:nth-child(3){background:#181c2f}
 .statistics-text{min-width:0;gap:5px}
 .statistics-label{font-size:11px;line-height:1.3;color:#b1b5c8;overflow-wrap:anywhere}
 .statistics-value{font-size:19px;line-height:1.1;font-weight:650;color:#ede7da}
 .statistics-icon{width:22px;height:22px;opacity:.8}
 .site-background{background-size:auto 100%;background-color:#090d1b}
 .content-wrapper{padding:0 16px 24px}
 .main-layout{gap:18px}
 .main-right:has(>a.slider-widget:only-child){display:none}
 .ranking-widget{border-radius:8px;background:#111626;border-color:#343449}
 .ranking-widget .widget-header{padding:14px 16px;background:#1b1e31;font-size:13px;letter-spacing:.08em}
 .ranking-tabs{padding:12px;gap:10px;background:#111626}
 .ranking-tabs .btn-tab{min-height:44px;border-radius:5px;font-size:14px}
 .ranking-list{padding:8px 14px 18px}
 .ranking-footer{padding:8px 14px;background:#101523}
 .ranking-load-more{min-height:44px;font-size:13px}
 .social-bar{padding:10px 16px;gap:16px;background:#0e1322;border-top:1px solid #272c40;border-bottom:1px solid #272c40}
 .social-bar-bg{display:none}
 .footer-bg{background-image:none;background-color:#090d18}
 .footer-inner{display:flex;flex-direction:column;align-items:center;text-align:center;gap:16px;padding:24px 16px}
 .footer-left{flex-direction:column;gap:10px}
 .footer-nav{justify-content:center;gap:0 18px}
 .footer-link{font-size:13px;color:#a7aec6}
 body:has(#views-container.active) .hero,body:has(#views-container.active) .statistics-bar{display:none}
}
@media(max-width:350px){
 .navbar-inner{padding-inline:12px}.navbar-logo img{width:106px}
 .hero-mobile-actions a{font-size:12px}
 .statistics-item{padding-inline:4px}.statistics-item:nth-child(1),.statistics-item:nth-child(3){gap:6px}
}

/* Readable forms and ranking columns on phones and small tablets. */
@media(max-width:1100px){
 .nav-panel{padding-bottom:calc(24px + env(safe-area-inset-bottom));scroll-padding-block:16px}
 .nav-link,.dropdown-item,.footer-link{overflow-wrap:anywhere}
 .register-card,.profile-inner,.profile-settings-card,.profile-hero-info{min-width:0;max-width:100%}
 .register-view,.ranking-view,.profile-view{padding-bottom:calc(32px + env(safe-area-inset-bottom))}
 .form-label{font-size:13px;line-height:1.5}.form-label-hint{font-size:12px;line-height:1.6}
 .form-input{scroll-margin-block:96px}
 .profile-username,.profile-email,.profile-settings-card-title,.prof-char-name{overflow-wrap:anywhere}
 .profile-settings-btn{white-space:normal;line-height:1.5}
 .profile-stat-box{min-width:0}.profile-stat-val{overflow-wrap:anywhere}
 .ranking-page-header{flex-direction:column;align-items:stretch;padding:16px 16px 0;gap:8px}
 .ranking-page-title-row{padding-bottom:4px}.ranking-page-tabs{align-self:stretch;gap:8px}
 .ranking-page-tab{flex:1;min-width:0;min-height:48px;justify-content:center;font-size:14px;padding:10px}
 .rp-table-head,.rp-row{grid-template-columns:28px minmax(0,1.5fr) minmax(0,1fr) 48px 38px;gap:6px;padding:14px 12px}
 .rp-table-head{font-size:10px;letter-spacing:0;line-height:1.5}
 .rp-col-name,.rp-col-class,.rp-col-level,.rp-col-empire{min-width:0;overflow-wrap:anywhere}
 .rp-col-name{font-size:13px}.rp-col-class,.rp-col-level{font-size:12px}
 .rp-table-head :is(.rp-col-name,.rp-col-class,.rp-col-level){font-size:inherit}
 .rp-page-btn{width:48px;height:48px}.rp-pagination{gap:20px}
}
@media(max-width:380px){
 .rp-table-head,.rp-row{grid-template-columns:22px minmax(0,1.25fr) minmax(0,1fr) 38px 32px;gap:4px;padding-inline:8px}
 .register-logo{display:none}.register-title,.login-title{overflow-wrap:anywhere}
 .navbar-logo img{width:100px}.navbar-inner{padding-inline:10px}
 .hero-mobile-actions a{font-size:13px}
}
@media(max-height:500px) and (max-width:1100px){
 .login-overlay{align-items:flex-start}.login-modal{margin:auto}.login-form{padding-block:12px}
}
