/* Shared small-screen refinements; retain each site's existing visual theme. */
html{max-width:100%;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{min-width:0}
main,section,article,aside,form,fieldset,.buttons,.user-info{min-width:0}
img,video,canvas{max-width:100%}
input,select,textarea{max-width:100%;min-width:0}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.message,.comment-content,.profile-bio,.official-blocks,.user-info,.request-box{overflow-wrap:anywhere}
.live-tile{position:relative;overflow:hidden;isolation:isolate}
.not-found{max-width:620px;margin:0 auto;min-height:calc(100dvh - 160px);padding:54px 24px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}
.not-found-art{width:min(290px,100%);height:200px;position:relative;display:grid;place-items:center;margin-bottom:26px;border:1px solid #a78bfa26;border-radius:48px;background:radial-gradient(ellipse at 30% 20%,#8b5cf638,transparent 65%),linear-gradient(145deg,#181a2c,#0b0d16);box-shadow:0 24px 80px #0004}
.not-found-art>span{font-size:92px;font-weight:900;letter-spacing:-8px;color:#c4b5fd;text-shadow:5px 5px #ff2e6333}
.not-found-art>i{position:absolute;top:16px;right:24px;color:#ff709c;font-size:30px;font-style:normal}
.not-found-art>b{position:absolute;bottom:16px;left:24px;border:1px solid #ffffff26;border-radius:50%;width:34px;height:34px;line-height:32px;color:#67d5ff}
.not-found .eyebrow{font-size:10px;letter-spacing:.18em;color:#a78bfa;font-weight:800}
.not-found h1{font-size:clamp(23px,3vw,34px);line-height:1.3;letter-spacing:-.035em;margin:14px 0;overflow-wrap:anywhere}
.not-found p{color:#94a3b8;max-width:400px;margin:0 0 26px;line-height:1.75}
.not-found .buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.message.pending small,.comment-row:has([disabled]) .comment-meta>span{color:#c4b5fd}
@media(max-width:700px){
 input,textarea,select{font-size:16px!important}
 .buttons{flex-wrap:wrap}
 .btn,.icon-btn{min-height:42px}
 .tabs{max-width:100%;overflow-x:auto;flex-shrink:0;scrollbar-width:thin}
 .tabs>a,.tabs>button{flex-shrink:0;white-space:nowrap}
 .dialog-body{padding:16px;overflow-wrap:anywhere}
 .profile-top{align-items:flex-start;gap:16px}
 .profile-top>div{min-width:0;flex:1}
 .profile-top h1,.profile-top h2,.chat-head a{overflow-wrap:anywhere}
 .profile-top .buttons{gap:8px}
 .profile-links{display:flex;flex-wrap:wrap;max-width:100%;overflow-wrap:anywhere}
 .comment-form form,.message-form{display:flex;gap:8px;min-width:0}
 .comment-form input,.message-form input{flex:1;width:0;min-width:0}
 .comments-list{overscroll-behavior:contain}
 .chat-body,.chat-layout,.messages{min-width:0;min-height:0}
 .message{max-width:90%}
 .feed-header{gap:8px}
 .feed-header .buttons{justify-content:flex-end}
 .live-top>div{min-width:0;flex:1;overflow-wrap:anywhere}
 .live-controls{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}
 .live-controls .btn{flex-shrink:0}
 .composer-fields,.album-composer,.settings-panel,.wallet-page,.studio-panel{max-width:100%;min-width:0}
 .studio-toolbar{flex-wrap:wrap;gap:12px}
 .studio-toolbar label{min-width:0;max-width:100%}
 .not-found{padding:32px 16px;min-height:calc(100dvh - 140px)}
 .not-found-art{height:160px;width:240px;border-radius:36px}
 .not-found-art>span{font-size:78px}
 #page-header{flex-wrap:wrap;height:auto;min-height:65px;gap:12px}
 #page-header h1{font-size:24px;overflow-wrap:anywhere}
 .toolbar,.filters,.form-actions,.composer-footer{flex-wrap:wrap;max-width:100%}
 .toolbar>*,.filters>*{min-width:0;max-width:100%}
 .table-wrap,.table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .site-header{gap:10px;padding-inline:16px}
 .site-header .web-link{padding:10px 12px;white-space:nowrap}
 .section{padding-inline:20px}
 .site-footer{overflow-wrap:anywhere}
}
@media(max-width:540px){
 .app-header .logo{flex-shrink:0}
 .app-header:not(.search-open) #search-form{width:30px!important;flex:0 0 30px!important;overflow:visible}
 #header-actions{flex-shrink:0}
 #header-actions>a[href="/upload"]{font-size:0;width:38px;min-width:38px;padding:8px;gap:0}
 #header-actions>a[href="/upload"] svg{width:20px;height:20px}
 .app-header.search-open #search-form{z-index:2}
}
@media(max-width:380px){
 .app-header{padding-inline:8px;gap:6px}
 #header-actions{gap:4px}
 #header-actions .btn{padding-inline:10px;font-size:11px}
 #header-actions .download-app{font-size:0!important;width:36px;min-width:36px!important;padding:8px!important}
 #header-actions .download-app::before{content:'↓';font-size:20px}
 #header-actions>a[href="/upload"]{font-size:0}
 .profile-top{gap:12px}
 .profile-top .profile-avatar-button .avatar{width:70px;height:70px}
 .profile-top .buttons .btn{padding-inline:10px;font-size:12px}
 .profile-stats{gap:14px}
 .feed-tabs a{padding-inline:10px}
 .feed-header>button{padding-inline:8px}
 .live-top .btn{padding-inline:10px}
 .not-found .buttons{width:100%}
 .not-found .buttons a{width:100%}
}
@media(max-height:500px) and (orientation:landscape){
 .comments-dialog{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
 .not-found{padding-block:20px}
 .not-found-art{display:none}
 .live-room{min-height:300px}
}
@supports(padding:max(0px)){
 @media(max-width:700px){
  .sidebar{padding-bottom:max(4px,env(safe-area-inset-bottom))}
  .comment-form,.message-form{padding-bottom:max(10px,env(safe-area-inset-bottom))}
 }
}
