/* Phone layout: one thumb-level surface, leaving the world in view. */
@media (max-width:700px), (max-width:950px) and (max-height:500px), (max-height:500px) and (pointer:coarse) {
 :root{--mobile-edge:12px;--mobile-bottom:max(24px,env(safe-area-inset-bottom));--control-edge:max(12px,env(safe-area-inset-right))}
 :root[dir=rtl]{--control-edge:max(12px,env(safe-area-inset-left))}
 html,body{overscroll-behavior:none}
 .language-control,.music-control,.camera-control{top:calc(env(safe-area-inset-top) + 10px);width:44px;height:44px;box-shadow:0 3px 12px #233c3412}
 .language-trigger{width:44px;height:44px;box-shadow:none}
 .music-control,.camera-control{padding:12px}
 .music-control{inset-inline-end:calc(var(--control-edge) + 46px)}
 .camera-control{inset-inline-end:calc(var(--control-edge) + 92px)}
 .music-control svg,.camera-control svg{width:17px;height:17px}
 .language-trigger,.music-control,.camera-control{border:4px solid transparent;background:#fffdf6ed;background-clip:padding-box;box-shadow:none}
 .music-control,.camera-control{padding:9px}
 .language-control{box-shadow:none}
 .language-menu{top:calc(100% + 8px);grid-template-columns:repeat(5,44px);padding:6px;gap:2px;border-radius:16px;max-height:calc(var(--ui-viewport-height,100dvh) - 80px);overflow:auto}
 .language-option{width:44px;height:44px;border-radius:12px}
 .language-flag,#language-current .language-flag{width:25px;height:17px}
 .search-panel{bottom:calc(var(--mobile-bottom) + var(--keyboard-inset,0px));width:min(260px,calc(100% - 48px - env(safe-area-inset-left) - env(safe-area-inset-right)));gap:8px;z-index:4}
 .searching .search-panel{width:min(320px,calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)))}
 .search-bar,[dir=rtl] .search-bar{min-height:44px;height:44px;padding:0 6px 0 14px;padding-inline:12px 4px;gap:7px;border-radius:16px;background:#fffdf6;box-shadow:0 4px 18px #233c341c;backdrop-filter:none}
 .search-bar:focus-within{box-shadow:0 4px 18px #233c341c;border-color:#a7b9a4}
 #search{height:42px;font-size:16px;letter-spacing:0}
 #search::placeholder{font-size:14px}
 .search-icon{width:16px;height:16px}
 #clear-search,#clear-follow{width:44px;height:44px;min-width:44px;min-height:44px;font-size:20px}
 .shortcut,.escape-key{display:none}
 .search-popover{bottom:calc(100% + 8px);max-height:calc(var(--ui-viewport-height,100dvh) - 138px);padding:8px 4px 4px;border-radius:16px;box-shadow:0 6px 24px #233c341c;backdrop-filter:none;background:#fffdf6;overscroll-behavior:contain;scrollbar-width:thin}
 .popover-heading{padding:2px 10px 6px;font-size:10px;letter-spacing:1px}
 .hint{font-size:11px;margin:5px 10px 8px;line-height:1.45}
 #results button{gap:9px;min-height:50px;padding:7px 9px;border-radius:12px}
 .resident-avatar{width:30px;height:30px;border-radius:10px;font-size:11px}
 #results strong{font-size:13px;line-height:1.3}#results small{font-size:11px;margin-top:2px}.result-arrow{font-size:15px;padding-inline:3px}
 .search-popover:has(#results:not(:empty)) .hint,.search-popover:has(#results:empty) .popover-heading{display:none}
 .following{font-size:11px;padding:0 0 0 12px;padding-inline:12px 0;gap:7px;min-height:44px;backdrop-filter:none}
 .connection{font-size:11px;padding:6px 10px}
 .inspecting .search-panel,.inspecting .analytics-privacy{display:none}
 .resident-profile{top:auto;bottom:max(12px,env(safe-area-inset-bottom));inset-inline-start:max(12px,env(safe-area-inset-left));width:calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));max-width:none;max-height:calc(var(--ui-viewport-height,100dvh) - env(safe-area-inset-top) - 78px);padding:16px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;border-radius:24px;box-shadow:0 8px 32px #233c3426;backdrop-filter:none;background:#fffdf6;scrollbar-width:thin;overscroll-behavior:contain}
 .profile-eyebrow{display:none}
 .profile-close{top:5px;inset-inline-end:5px;width:44px;height:44px;font-size:23px}
 .profile-identity{grid-column:1/-1;gap:12px;padding-inline-end:32px}
 .profile-avatar{width:60px;height:60px;border-radius:18px}
 .profile-identity h2{font-size:18px;line-height:1.25;letter-spacing:-.2px}
 .profile-identity p{font-size:11px;margin-top:4px}
 .profile-activity{grid-column:1/-1;margin:0;padding:0;border:0;font-size:11px;gap:6px;line-height:1.5}
 .profile-activity>span:first-child{width:5px;height:5px}
 .profile-facts{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding-top:12px;border-top:1px solid #e6e9dc}
 .profile-facts>div{display:block;min-width:0}
 .profile-facts dt{font-size:10px;line-height:1.4;margin-bottom:4px}
 .profile-facts dd{font-size:12px;line-height:1.4;text-align:start;overflow-wrap:anywhere}
 .profile-note{grid-column:1;margin:0;font-size:10px;line-height:1.5;align-self:center;max-width:230px}
 .profile-follow{grid-column:2;align-self:center;min-height:44px;padding:8px 14px;font-size:12px;gap:7px;border-radius:16px}
 .profile-follow svg{width:15px;height:15px}
 .resident-hover{display:none!important}
 .touch-help{bottom:calc(var(--mobile-bottom) + 60px);width:230px;max-width:calc(100% - 48px);padding:8px 10px;font-size:11px;line-height:1.5;border-radius:14px;box-shadow:none}
 .loading{padding:24px}.loading h1{font-size:18px}.loading p{font-size:12px;max-width:240px}
 #retry{min-height:44px;padding:8px 18px;font-size:12px}
 .empty{top:calc(env(safe-area-inset-top) + 68px);max-width:calc(100% - 40px);font-size:12px;padding:10px 14px}
 .site-version{display:none}
 .analytics-privacy{font-size:10px;bottom:0;left:max(8px,env(safe-area-inset-left));padding:5px 7px;background:none;line-height:14px}
 .keyboard-open .language-control,.keyboard-open .music-control,.keyboard-open .camera-control,.keyboard-open .touch-help,.keyboard-open .analytics-privacy{display:none}
 .keyboard-open .search-panel{bottom:calc(var(--keyboard-inset,0px) + 8px)}
}
@media (max-width:950px) and (max-height:500px), (max-height:500px) and (pointer:coarse) {
 .resident-profile{width:min(350px,calc(100% - 180px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-height:calc(var(--ui-viewport-height,100dvh) - 24px);bottom:12px;gap:9px;padding:14px}
 .search-panel{width:260px}.touch-help{display:none}
}
