/* Shared phone, landscape and tablet layout. Text zoom remains enabled. */
html{scroll-padding-top:20px;scroll-padding-bottom:110px}
body{min-height:100svh}
img,video,canvas{max-width:100%}
input,select,textarea{max-width:100%}
button,a,summary{ -webkit-tap-highlight-color:transparent }
.content>*{min-width:0}
.btn,.answer,summary{overflow-wrap:anywhere;white-space:normal}
.btn,.answer,input:not([type=checkbox]):not([type=radio]),select,summary{min-height:44px}
.mola-card,.party-card,.mola-panel,.wide-card{min-width:0;overflow-wrap:anywhere}
.mola-card-body,.section-head>*,.party-room-head>*,.top-actions{min-width:0}
.section-head{gap:12px;flex-wrap:wrap}
.party-guide{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)}
dialog{overscroll-behavior:contain;max-width:calc(100vw - 24px)}
:focus-visible{scroll-margin:80px}
@media(max-width:650px){
 .topbar{padding-top:max(12px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
 .content{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
 .bottom-nav{padding-bottom:max(8px,env(safe-area-inset-bottom));padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 .bottom-nav a{min-height:48px;min-width:0;line-height:1.35;padding:6px 2px}
 .workspace{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
 input,textarea,select,.party-room input,.party-room select,.party-filters input,.party-filters select{font-size:16px!important}
 .mola-cards.recommendations,.mola-section>.mola-cards:has(>.mola-card:only-child){grid-template-columns:minmax(0,1fr)}
 .mola-card-body p{font-size:14px;line-height:1.65}
 .mola-card-body .btn,.party-card-actions .btn{min-height:48px}
 .party-scoreboard{grid-template-columns:repeat(2,minmax(0,1fr))}
 .party-fields label,.party-filters label{min-width:0;flex:1 1 130px}
 .party-room-head h1{font-size:clamp(20px,5vw,28px);overflow-wrap:anywhere}
 .party-room #party-clock{flex-shrink:0;min-width:62px;padding:12px 8px}
 .keyboard-open .bottom-nav{display:none}
 .keyboard-open .workspace{padding-bottom:20px}
 html:has(.keyboard-open){scroll-padding-bottom:30px}
}
@media(max-width:380px){
 .learn-hero-art,.mola-hero-mark{display:none}
 .learn-hero{padding:24px;display:block}
 .learn-hero h1{font-size:30px;max-width:none}
 .learn-hero p{font-size:14px}
 .learn-badges{gap:6px}
 .platform-switch a{font-size:12px;padding:10px 4px}
 .mola-cards{grid-template-columns:minmax(0,1fr)}
 .party-catalog{grid-template-columns:minmax(0,1fr)}
 .party-guide{padding:16px}
 .topbar{gap:4px}
 .top-actions{gap:4px}
 .mobile-brand .brand{font-size:16px;gap:4px}
 .mobile-brand .brandmark{width:26px;height:26px}
 .exam-select{width:64px;max-width:64px}
}
@media(orientation:landscape) and (max-height:500px) and (max-width:1000px){
 .shell{display:block}.sidebar{display:none}.workspace{padding-bottom:18px}
 .topbar{padding:8px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left));min-height:52px}
 .content{padding:16px max(20px,env(safe-area-inset-right)) 24px max(20px,env(safe-area-inset-left))}
 .bottom-nav{position:static;display:flex;justify-content:space-around;padding:6px max(12px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:white}
 .bottom-nav a{display:flex;gap:6px;align-items:center;justify-content:center;min-height:44px;font-size:12px;padding:8px}
 .learn-hero-art,.mola-hero-mark{display:none}.learn-hero,.mola-hero{padding:24px;min-height:0}
 dialog,.party-guide{max-height:calc(100dvh - 16px)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
