@media(max-width:1100px){.desktop-nav{display:none}.mobile-menu-btn{display:grid}.hero-grid{grid-template-columns:1fr 1fr;gap:38px}.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.home-strip-grid{grid-template-columns:repeat(2,1fr)}.home-strip-grid>div:nth-child(2){border-right:0}.home-strip-grid>div:nth-child(-n+2){border-bottom:1px solid var(--border)}}
@media(max-width:820px){body{padding-bottom:76px}.container{width:min(calc(100% - 24px),var(--max))}.topbar .nav-wrap{height:64px}.brand-logo{height:35px;max-width:112px}.hide-mobile{display:none}.bottom-nav{display:grid;position:fixed;z-index:65;bottom:0;left:0;right:0;grid-template-columns:repeat(5,1fr);padding:7px 8px calc(7px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(18px);border-top:1px solid var(--border)}.bottom-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:18px;color:var(--text-2)}.bottom-nav span{font-size:10px}.bottom-nav .battle-nav{color:var(--primary);font-weight:800}.hero{padding:50px 0 32px}.hero-grid{grid-template-columns:1fr}.hero-visual{margin-top:4px}.hero-visual-card{max-width:620px;margin:auto}.floating-card-top{left:-4px}.floating-card-bottom{right:-4px}.section{padding:52px 0}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.top-three{grid-template-columns:1fr}.top-three .first{order:-1}.footer-grid{grid-template-columns:1fr 1fr}.footer-grid>div:first-child{grid-column:1/-1}.footer{padding-bottom:35px}.footer-bottom{flex-direction:column;gap:8px}.form-grid{grid-template-columns:1fr}.profile-hero{grid-template-columns:auto 1fr}.profile-hero>div:last-child{grid-column:1/-1}.answers{grid-template-columns:1fr}.battle-versus{grid-template-columns:1fr 52px 1fr;gap:8px}.battle-player{padding:12px}.battle-score{font-size:36px}.cta-v3{align-items:flex-start;flex-direction:column}.section-head{align-items:flex-start;flex-direction:column}.split-showcase,.community-showcase{grid-template-columns:1fr;gap:26px}.community-showcase>img{order:-1}.event-layout{grid-template-columns:1fr}.event-layout .event-content{grid-column:auto}.news-tabs{margin-inline:-12px;padding-inline:12px}.news-tab:first-child{margin-left:0}}
@media(max-width:560px){.brand-text{font-size:14px}.login-nav-btn{display:none}.nav-actions{gap:7px}.icon-btn{width:39px;height:39px}.hero h1{font-size:55px}.hero h1 span{font-size:.5em}.hero-kicker{font-size:18px}.hero-actions .btn{width:100%}.hero-trust{display:grid;grid-template-columns:1fr 1fr}.hero-visual-card{padding:9px;border-radius:24px}.hero-visual-card>img{border-radius:17px}.floating-card{position:relative;inset:auto!important;margin-top:8px}.hero-visual-card{transform:none}.home-strip-grid{grid-template-columns:1fr}.home-strip-grid>div{border-right:0;border-bottom:1px solid var(--border)!important}.home-strip-grid>div:last-child{border-bottom:0!important}.grid-3,.grid-4{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr 1fr!important}.stat-premium{padding:22px 18px}.stat-premium strong{font-size:38px}.page-head{padding-top:34px}.page-head h1{font-size:40px}.news-search{display:grid}.news-search .btn{width:100%}.battle-stage .btn{width:100%}.search-panel{padding:12px}.auth-shell{padding:24px 12px}.auth-card{padding:22px}.auth-card h1{font-size:31px}.cta{padding:30px 24px}.card{padding:20px}.premium-card{padding:12px 12px 18px}.footer-grid{grid-template-columns:1fr}.footer-grid>div:first-child{grid-column:auto}.pagination-row .btn{flex:1}.profile-pill{padding-right:4px}.mobile-menu-panel{width:92vw}}

/* v7 case library */
@media(max-width:1024px){.case-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.case-filter{grid-template-columns:1fr 1fr}.case-search-wrap{grid-column:1/-1}.case-detail-layout{grid-template-columns:1fr}.case-detail-side{order:-1}.sticky-card{position:static}.case-detail-side .case-steps{grid-template-columns:repeat(5,1fr);gap:7px}.case-detail-side .case-steps li{padding:26px 4px 0;text-align:center;font-size:10px}.case-detail-side .case-steps li:before{left:50%;top:4px;transform:translateX(-50%)}}
@media(max-width:820px){.cases-hero-grid{grid-template-columns:1fr;gap:24px}.case-hero-visual{min-height:225px}.case-library-head p{text-align:left}.case-data-grid{grid-template-columns:1fr 1fr}.case-data-card:first-child{grid-column:1/-1}.case-analysis-grid{grid-template-columns:1fr}.case-analysis-block.accent{grid-column:auto}}
@media(max-width:600px){.case-filter{grid-template-columns:1fr;padding:10px}.case-search-wrap{grid-column:auto}.case-library-grid{grid-template-columns:1fr}.case-library-body h3{font-size:20px}.case-data-grid{grid-template-columns:1fr}.case-data-card:first-child{grid-column:auto}.case-media-grid,.case-answers{grid-template-columns:1fr}.case-analysis{padding:20px}.case-analysis-header h2{font-size:29px}.case-complete{align-items:flex-start;flex-direction:column}.case-complete .btn{width:100%}.case-detail-side .case-steps{display:none}.case-detail-side .sticky-card{padding:14px}.case-visual-radiograph{inset:18px 25% 58px 18px}.case-visual-note{right:12px;bottom:12px}}

/* v8.1 responsive fixes */
@media(max-width:1280px) and (min-width:821px){
  .event-layout{grid-template-columns:minmax(0,1.65fr) minmax(330px,.55fr)}
  .event-qr-card{grid-template-columns:116px minmax(0,1fr);gap:12px;padding:12px}
  .event-qr{width:116px;min-width:116px}
  .event-qr-copy>b{font-size:14px}
  .event-qr-copy p{font-size:12px}
}
@media(max-width:820px){
  .dashboard-nav-btn,.admin-nav-btn,.checkin-nav-btn{display:none}
  .event-qr-card{grid-template-columns:1fr;text-align:center;padding:16px}
  .event-qr{width:min(210px,100%);min-width:0;margin:auto}
  .event-qr-copy .attendance-badge{justify-content:center;text-align:center}
  .profile-actions{width:100%}
}
@media(max-width:560px){
  .profile-actions{display:grid;grid-template-columns:1fr}
  .profile-actions .btn{width:100%}
}

/* v8.8 mobile polish and overflow safeguards */
@media(max-width:820px){
  .nav-wrap{gap:10px}
  .brand{max-width:calc(100% - 210px)}
  .nav-actions{gap:6px}
  .nav-actions .btn{min-height:40px;padding-inline:12px}
  .mobile-menu-panel{width:min(92vw,400px);padding:18px 16px calc(22px + env(safe-area-inset-bottom))}
  .mobile-menu-links{gap:10px}
  .mobile-menu-links a{padding:14px}
  .hero-copy,.hero-visual-card,.section-head,.split-showcase,.community-showcase,.home-strip-grid{min-width:0}
}
@media(max-width:560px){
  html,body{overflow-x:clip}
  .container{width:min(calc(100% - 20px),var(--max))}
  .topbar .nav-wrap{height:auto;min-height:64px;gap:8px;padding:10px 0}
  .brand{gap:8px;max-width:calc(100% - 182px)}
  .brand-logo{height:31px;max-width:86px}
  .brand-mark{width:34px;height:34px;border-radius:12px}
  .brand-text{font-size:13px}
  .nav-actions{gap:6px}
  .nav-actions>.btn{padding-inline:11px;min-height:38px;font-size:12px;border-radius:12px}
  .profile-pill{padding:3px;gap:0;min-width:42px}
  .profile-pill .badge{margin-left:-4px}
  .avatar.sm{width:32px;height:32px;font-size:12px}
  .mobile-menu-panel{width:94vw;border-top-left-radius:24px;border-bottom-left-radius:24px}
  .mobile-menu-head .brand{max-width:calc(100% - 56px)}
  .hero{padding:38px 0 28px}
  .eyebrow{font-size:11px;padding:7px 10px}
  .hero h1{font-size:clamp(42px,15.5vw,54px);line-height:.95;letter-spacing:-.052em}
  .hero h1 span{font-size:.48em;line-height:1.1}
  .hero-kicker{font-size:15px;margin-bottom:8px}
  .lead{font-size:16px;line-height:1.62}
  .hero-actions{gap:10px;margin-top:22px}
  .hero-actions .btn{width:100%}
  .hero-trust{grid-template-columns:1fr;gap:10px;margin-top:18px}
}
@media(max-width:420px){
  .brand{max-width:calc(100% - 168px)}
  .nav-actions .icon-btn{width:36px;height:36px}
  .nav-actions>.btn{padding-inline:10px;font-size:11px}
  .hero h1{font-size:clamp(40px,15vw,48px)}
  .lead{font-size:15.5px}
}

/* v8.8.1 premium mobile experience */
@media(max-width:820px){
  body{padding-bottom:calc(82px + env(safe-area-inset-bottom))}
  .topbar{background:color-mix(in srgb,var(--surface) 88%,transparent);box-shadow:0 8px 28px rgba(24,20,43,.035)}
  .bottom-nav{left:10px;right:10px;bottom:8px;border:1px solid color-mix(in srgb,var(--border) 92%,transparent);border-radius:22px;padding:7px 7px calc(7px + env(safe-area-inset-bottom));box-shadow:0 14px 38px rgba(20,16,38,.12);background:color-mix(in srgb,var(--surface) 94%,transparent);overflow:hidden}
  .bottom-nav a{position:relative;min-width:0;padding:6px 2px;border-radius:15px;font-size:18px;transition:.2s var(--ease)}
  .bottom-nav a i{width:28px;height:25px;display:grid;place-items:center;border-radius:10px}
  .bottom-nav a span{font-size:10px;font-weight:650;white-space:nowrap}
  .bottom-nav a.active{color:var(--primary);background:var(--primary-soft);font-weight:850}
  .bottom-nav a.active i{transform:translateY(-1px)}
  .bottom-nav .battle-nav{color:var(--primary);font-weight:800}
  .bottom-nav .battle-nav i{font-size:21px}
  .mobile-menu-backdrop{backdrop-filter:blur(3px)}
  .mobile-menu-panel{box-shadow:-24px 0 70px rgba(12,10,22,.18)}
  .mobile-menu-head{padding-bottom:2px}
  .mobile-menu-links a{background:color-mix(in srgb,var(--surface-2) 88%,var(--surface));border-color:color-mix(in srgb,var(--border) 55%,transparent);transition:.18s var(--ease)}
  .mobile-menu-links a:active{transform:scale(.99);background:var(--primary-soft)}
  .mobile-account-actions{position:sticky;bottom:0;background:linear-gradient(180deg,transparent,var(--surface) 16%);padding-top:20px}
}
@media(max-width:560px){
  .hero-v3:before{width:390px;height:390px;right:-210px;top:-210px;opacity:.9}
  .hero-copy{padding-top:2px}
  .hero .eyebrow{max-width:100%;font-size:10.5px;letter-spacing:.015em}
  .hero h1{margin:16px 0 14px}
  .hero h1 span{margin-top:9px}
  .hero-actions .btn{min-height:54px;border-radius:17px;font-size:15px}
  .hero-trust{padding-top:2px}
  .hero-trust span{padding:10px 12px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--surface) 74%,transparent)}
  .hero-visual{margin-top:16px}
  .hero-visual-card{border-radius:26px;padding:8px;box-shadow:0 24px 54px rgba(39,30,75,.11)}
  .hero-visual-card>img{border-radius:19px;aspect-ratio:1.22/1}
  .floating-card{border-radius:14px;padding:11px 12px}
  .home-strip{padding-top:3px}
  .home-strip-grid{border-radius:18px}
  .home-strip-grid>div{padding:15px 16px}
  .section{padding:44px 0}
  .section-head h2{font-size:clamp(30px,9vw,40px);line-height:1.02;letter-spacing:-.04em}
  .mobile-user-card{padding:12px;border-radius:16px}
  .mobile-menu-links a{border-radius:16px;padding:13px 14px}
}
@media(max-width:390px){
  .container{width:min(calc(100% - 16px),var(--max))}
  .brand{max-width:calc(100% - 156px)}
  .brand-logo{height:29px;max-width:76px}
  .brand-text{font-size:12px}
  .nav-actions{gap:5px}
  .nav-actions .icon-btn{width:35px;height:35px;border-radius:11px}
  .profile-pill{min-width:39px}
  .avatar.sm{width:30px;height:30px}
  .hero{padding-top:32px}
  .hero h1{font-size:clamp(38px,14.6vw,45px)}
  .hero h1 span{font-size:.47em}
  .hero-kicker{font-size:14px}
  .lead{font-size:15px;line-height:1.58}
  .bottom-nav{left:6px;right:6px;bottom:6px}
  .bottom-nav a span{font-size:9px}
}


/* v8.9 profile/dashboard responsive */
@media(max-width:1020px){
  .profile-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .profile-dashboard-hero{grid-template-columns:auto minmax(0,1fr)}
  .profile-level-card{grid-column:1/-1;grid-template-columns:auto auto 1fr auto;align-items:center}
  .profile-level-card .progress{min-width:160px}
}
@media(max-width:820px){
  .bottom-nav a i{display:none}
  .bottom-nav a{gap:3px}
  .bottom-nav-icon{width:23px;height:23px}
  .profile-page-head{padding-top:28px}
  .profile-upcoming-grid{grid-template-columns:1fr}
  .profile-dashboard-grid{grid-template-columns:1fr 1fr}
  .rating-toolbar{grid-template-columns:1fr 150px auto}
}
@media(max-width:620px){
  .profile-dashboard-hero{grid-template-columns:auto minmax(0,1fr);padding:17px;gap:13px}
  .profile-main-avatar{width:58px!important;height:58px!important;font-size:17px!important}
  .profile-identity h1{font-size:26px}
  .profile-identity .eyebrow{display:none}
  .profile-summary-line{font-size:12px}
  .profile-actions{display:flex;grid-template-columns:none;width:auto;margin-top:11px}
  .profile-actions .btn{width:auto;min-height:36px;padding:8px 11px;font-size:12px}
  .profile-level-card{grid-column:1/-1;grid-template-columns:1fr auto;gap:7px;padding:13px}
  .profile-level-card .progress{grid-column:1/-1;min-width:0}.profile-level-card small{grid-column:1/-1}
  .profile-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.profile-metrics .metric{padding:12px}.profile-metrics .metric strong{font-size:20px}
  .profile-section-head{align-items:flex-start;flex-direction:column;margin-top:26px;gap:7px}.profile-section-head h2{font-size:26px}
  .profile-event-card{grid-template-columns:auto minmax(0,1fr);gap:11px;padding:13px}.profile-event-arrow{display:none}.profile-event-date{width:46px;height:52px}.profile-event-main h3{font-size:15px}
  .profile-dashboard-grid{grid-template-columns:1fr}.profile-dashboard-grid>.card{padding:15px}
  .profile-quick-actions{grid-template-columns:1fr 1fr}.profile-quick-actions a{padding:11px}
  .profile-history>summary{padding:15px}
  .rating-toolbar{grid-template-columns:1fr}.rating-toolbar .btn{width:100%}
  .rating-table-wrap table{min-width:580px}
}
@media(max-width:390px){
  .profile-dashboard-hero{grid-template-columns:1fr;text-align:left}.profile-main-avatar{width:54px!important;height:54px!important}.profile-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-quick-actions{grid-template-columns:1fr}.bottom-nav-icon{width:22px;height:22px}
}

/* v9.0 unified UX/responsive stabilization */
:where(.card,.admin-panel,.admin-event-card,.admin-user-card,.admin-news-card,.event-card,.news-card,.case-library-card){min-width:0}
:where(h1,h2,h3,h4,p,a,b,span,small,td,th,label){overflow-wrap:anywhere}
:where(input,select,textarea,button){max-width:100%}
:where(.input,select,textarea){width:100%;min-width:0}
:where(.table-wrap,.rating-table-wrap,.compact-table){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
:where(.table-wrap,.rating-table-wrap,.compact-table) table{width:100%}
:where(img,video,iframe,canvas,svg){max-width:100%}
:where(.btn,.icon-btn,.answer-btn,.bottom-nav a,.mobile-menu-links a){touch-action:manipulation;-webkit-tap-highlight-color:transparent}
:where(.btn,.answer-btn,.mobile-menu-links a){min-height:44px}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid color-mix(in srgb,var(--primary) 38%,transparent);outline-offset:2px}

@media(max-width:820px){
  html{scroll-padding-top:76px}
  body{min-width:0;padding-bottom:calc(92px + env(safe-area-inset-bottom))}
  .container{width:auto;max-width:var(--max);margin-inline:12px;padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}
  .topbar{overflow:visible}
  .topbar .nav-wrap{height:64px;min-height:64px;padding:0;gap:8px}
  .topbar .brand{flex:1 1 auto;max-width:none;min-width:0;overflow:hidden}
  .topbar .brand-logo{flex:0 1 auto;max-width:min(112px,32vw);height:34px}
  .topbar .brand-text{font-size:13px;min-width:0;text-overflow:ellipsis;overflow:hidden}
  .nav-actions{flex:0 0 auto;margin-left:0;gap:6px}
  .nav-actions .icon-btn{width:40px;height:40px;min-width:40px}
  .profile-pill{min-width:40px;max-width:52px;padding:3px;justify-content:center}
  .profile-pill .badge{position:absolute;margin:0;transform:translate(14px,-14px)}
  .page-head{padding-top:30px;padding-bottom:22px}
  .page-head h1{font-size:clamp(34px,10vw,46px);line-height:1.02;margin-bottom:10px}
  .lead{font-size:16px;line-height:1.58}
  .section{padding:42px 0}
  .section-tight{padding-top:8px}
  .section-head{gap:12px;margin-bottom:20px}
  .card{border-radius:18px;padding:18px}
  .bottom-nav{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(7px,env(safe-area-inset-bottom));padding:6px;border-radius:20px;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
  .bottom-nav a{min-width:0;min-height:56px;padding:6px 2px;gap:3px;justify-content:center;border-radius:14px}
  .bottom-nav-icon{width:22px;height:22px;flex:0 0 auto}
  .bottom-nav a span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:9.5px;line-height:1.1;white-space:nowrap}
  .mobile-menu-panel{width:min(94vw,420px);max-width:100%;padding:16px 14px calc(18px + env(safe-area-inset-bottom));border-radius:24px 0 0 24px}
  .mobile-menu-links a{padding:13px 14px}
  .search-modal{padding:calc(70px + env(safe-area-inset-top)) 12px 20px}
  .search-panel{width:100%;padding:12px;border-radius:18px}
  .search-head{gap:8px}
  .search-head .icon-btn{flex:0 0 44px;width:44px;height:44px}
  .auth-shell{min-height:100dvh}
  .event-layout,.profile-dashboard-grid,.profile-upcoming-grid{min-width:0}
  .event-layout>*{min-width:0}
  .footer{padding-bottom:24px}
}

@media(max-width:620px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  .container{margin-inline:10px}
  .input,input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea{font-size:16px!important}
  .btn{min-height:46px;padding:11px 15px}
  .btn-sm{min-height:40px;padding:8px 11px}
  .hero{padding:32px 0 24px}
  .hero h1{font-size:clamp(38px,13.2vw,52px);line-height:.98;letter-spacing:-.048em}
  .hero-kicker{font-size:15px}
  .hero-actions{margin-top:20px}
  .hero-actions .btn{min-height:50px}
  .floating-card{max-width:100%}
  .grid,.grid-3,.grid-4{gap:12px}
  .card{padding:16px}
  .premium-card{padding:10px 10px 16px}
  .event-card h3,.news-card h3{font-size:18px}
  .form-grid{gap:12px}
  .answers{gap:10px}
  .answer-btn{padding:14px 15px;line-height:1.4}
  .question{font-size:clamp(19px,5.5vw,23px);margin:20px 0}
  .battle-stage{padding:18px 14px}
  .battle-versus{grid-template-columns:1fr auto 1fr;gap:7px}
  .battle-player{padding:10px 8px}
  .battle-score{font-size:32px}
  .stats-grid{grid-template-columns:1fr 1fr!important}
  .stat-premium{padding:17px 14px}
  .stat-premium strong{font-size:32px}
  .profile-dashboard-hero{grid-template-columns:auto minmax(0,1fr);padding:15px;gap:12px}
  .profile-main-avatar{width:54px!important;height:54px!important;font-size:16px!important}
  .profile-identity h1{font-size:24px;line-height:1.08}
  .profile-summary-line{font-size:11.5px;gap:6px}
  .profile-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .profile-actions .btn{width:100%}
  .profile-level-card{grid-column:1/-1}
  .profile-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .profile-metrics .metric{padding:12px}
  .profile-quick-actions{grid-template-columns:1fr}
  .profile-event-main h3{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .rating-toolbar{grid-template-columns:1fr;gap:8px}
  .rating-toolbar .btn{width:100%}
  .rating-table-wrap table{min-width:0!important;table-layout:fixed}
  .rating-table-wrap th:nth-child(3),.rating-table-wrap td:nth-child(3),.rating-table-wrap th:nth-child(5),.rating-table-wrap td:nth-child(5){display:none}
  .rating-table-wrap th:nth-child(1),.rating-table-wrap td:nth-child(1){width:54px}
  .rating-table-wrap th:nth-child(4),.rating-table-wrap td:nth-child(4){width:88px;text-align:right}
  .rating-table-wrap th,.rating-table-wrap td{padding:12px 8px;font-size:12px}
  .rating-table-wrap td:nth-child(2){font-size:13px}
  .compact-table table{min-width:480px}
  .news-tabs{overflow-x:auto;scrollbar-width:none;overscroll-behavior-inline:contain;scroll-snap-type:x proximity}
  .news-tabs::-webkit-scrollbar{display:none}
  .news-tab{flex:0 0 auto;scroll-snap-align:start}
  .pagination{display:flex;max-width:100%;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .pagination::-webkit-scrollbar{display:none}
  .pagination a{flex:0 0 42px;min-height:42px;display:grid;place-items:center}
}

@media(max-width:390px){
  .container{margin-inline:8px}
  .topbar .brand-logo{max-width:84px;height:30px}
  .topbar .brand-text{display:none}
  .nav-actions .icon-btn{width:38px;height:38px;min-width:38px}
  .hero h1{font-size:clamp(36px,12.6vw,45px)}
  .home-strip-grid>div{padding:13px 14px}
  .profile-actions{grid-template-columns:1fr}
  .stats-grid{grid-template-columns:1fr!important}
  .bottom-nav{left:5px;right:5px;padding-inline:4px}
  .bottom-nav a span{font-size:8.5px}
  .bottom-nav-icon{width:21px;height:21px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* v9.1 chat/mobile navigation */
@media(max-width:820px){
  .bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr));}
  .bottom-nav a{min-height:56px;padding-inline:1px}
  .bottom-nav a span:last-child{font-size:8.8px}
  .chat-page{overflow:hidden;padding-bottom:0}
  .chat-page .topbar{position:fixed;top:0;left:0;right:0;z-index:100}
  .chat-page main{height:100dvh;padding-top:64px;padding-bottom:calc(82px + env(safe-area-inset-bottom));overflow:hidden}
  .chat-page .footer{display:none}
  .chat-page .section-tight{height:100%;padding:0}
  .chat-page .section-tight>.container{height:100%;margin:0;max-width:none;width:100%;padding:0}
  .chat-page .chat-shell{height:100%;min-height:0;border:0;border-radius:0;box-shadow:none;background:var(--surface)}
  .chat-sidebar-head{padding:14px 14px 11px;gap:10px}
  .chat-sidebar-head>div>span:first-child b{font-size:18px}
  .chat-user-list{padding:5px 8px 14px}
  .chat-user{min-height:64px;padding:9px 8px;border-radius:14px}
  .chat-user.active{box-shadow:none}
  .chat-main{height:100%;min-height:0}
  .chat-shell.chat-open-mobile .chat-main{display:block;height:100%;min-height:0}
  .chat-conversation{height:100%;min-height:0}
  .chat-conversation-head{min-height:60px;padding:8px 10px;position:relative;z-index:2;box-shadow:0 1px 0 var(--border)}
  .chat-back{width:40px;height:40px;border-radius:12px;font-size:28px;line-height:1}
  .chat-messages{padding:12px 10px 14px;gap:7px;overscroll-behavior:contain}
  .chat-bubble{max-width:88%;padding:9px 11px;border-radius:15px 15px 15px 5px;font-size:14px}
  .chat-bubble-row.mine .chat-bubble{border-radius:15px 15px 5px 15px}
  .chat-composer{padding:8px 9px max(8px,env(safe-area-inset-bottom));gap:7px}
  .chat-composer textarea{min-height:44px;max-height:96px;padding:11px 12px}
  .chat-send-btn{width:44px;min-width:44px;padding:0;border-radius:14px}
  .chat-send-btn span{display:none}.chat-send-btn b{font-size:20px}
}
@media(max-width:390px){
  .bottom-nav{left:4px;right:4px;padding-inline:4px;gap:0}
  .bottom-nav a span:last-child{font-size:8px}
  .bottom-nav-icon{width:21px;height:21px}
  .chat-user{grid-template-columns:auto minmax(0,1fr) auto;gap:8px}
}


/* v9.1.1 micro-fixes */
@media(max-width:820px){.chat-page .bottom-nav{bottom:max(6px,env(safe-area-inset-bottom));}}


/* v9.2.1 badge visibility */
@media(max-width:820px){.bottom-nav a .bottom-nav-icon-wrap{overflow:visible!important;max-width:none!important;width:28px!important;height:28px!important;display:grid!important}.bottom-nav a .bottom-nav-icon-wrap .bottom-nav-badge{display:grid!important;overflow:visible!important}}
