/* Mobile layout: compact chrome without compressing the primary controls. */
.mobile-info{display:none}
@media(max-width:650px){
 header{display:grid!important;grid-template-columns:auto minmax(0,1fr);gap:4px 8px!important;padding:8px 14px 0!important;align-items:center}
 header .brand{font-size:18px;gap:6px;letter-spacing:-.8px;grid-row:1;grid-column:1}
 header .logo{width:23px;height:23px;flex-shrink:0}
 header .header-right{grid-row:1;grid-column:2;display:flex;justify-content:flex-end;gap:5px!important;min-width:0;margin:0;flex-wrap:nowrap}
 .header-right .theme-control{position:relative;display:grid;place-items:center;width:30px;height:44px;flex-shrink:0}
 .theme-control:before{content:'☾';font-size:24px;color:#a5b69e}
 html[data-theme=light] .theme-control:before{content:'☀';color:#42694e}
 .header-right #theme-select{position:absolute;inset:0;opacity:0;width:100%;height:100%;padding:0}
 .theme-control:focus-within{outline:2px solid #8af06a;outline-offset:0;border-radius:8px}
 .header-right .online{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
 .online .online-description{display:none}
 .header-right .login-button{height:44px;padding:0 6px;font-size:11px;border:0;background:transparent;color:#c6d0c0;white-space:nowrap}
 .header-right #login-toggle{max-width:66px;overflow:hidden;text-overflow:ellipsis}
 .header-right #my-balance,.header-right #admin-preview-toggle{display:none!important}
 header:has(#admin-preview-toggle:not([hidden])) .header-right{flex-wrap:wrap}
 header:has(#admin-preview-toggle:not([hidden])) #admin-preview-toggle{display:block!important;flex-basis:100%;height:28px}
 header .channels{grid-row:2;grid-column:1/-1;min-height:40px;height:40px!important;align-items:stretch;gap:14px;scrollbar-width:none}
 .channels button{border-radius:0;background:transparent!important;border-bottom:2px solid transparent;padding:9px 1px;font-size:12px;color:#889583}
 .channels button[aria-pressed=true]{color:#a7ee88!important;border-bottom-color:#8bdc6e}
 .tag-bar{padding:8px 14px!important;gap:8px;min-height:46px;border-bottom:0}
 #popular-tags button{border-color:transparent;background:#ffffff04;color:#94a58b;font-size:11px;padding:6px 9px}
 #popular-tags button[aria-pressed=true]{background:#8fe56d12;color:#b0e995;border-color:#8fe56d30}
 .mobile-info{display:inline-flex;gap:4px;align-items:center;justify-content:center;flex-shrink:0;min-width:44px;min-height:36px;color:#a2b197;font-size:11px;border-radius:8px}
 .community-strip{display:none!important}
 .toolbar{min-height:52px;padding:7px 14px!important;gap:6px!important;border-bottom:1px solid #ffffff08}
 .periods button{min-height:36px;padding:8px 7px!important;font-size:11px}
 #view-options{min-height:36px;background:#ffffff03;border-color:#ffffff0d;color:#a7b49f;font-size:11px}
 .intro{height:30px;padding:7px 14px!important}.intro h1{font-size:11px;font-weight:500;color:#a7b39f}
 .metric-legend{opacity:.78}
 .dock{min-height:0;padding:9px 14px calc(9px + env(safe-area-inset-bottom,0px))!important}
 .bottom{padding-bottom:85px!important}
 .stage,.view-options-open .stage{min-height:180px!important}
 html[data-theme=light] .header-right .login-button,html[data-theme=light] .mobile-info{color:#395842}
 html[data-theme=light] .channels button[aria-pressed=true]{color:#2c673b!important;border-bottom-color:#519d5a}
 html[data-theme=light] #popular-tags button{background:#203b2605;color:#57715d}
 html[data-theme=light] #popular-tags button[aria-pressed=true]{background:#dcebd9;border-color:#bed4b8;color:#2e6635}
 html[data-theme=light] #view-options{background:#fff8;border-color:#233e2914;color:#42614a}
}
@media(max-width:374px){header{padding-left:10px!important;padding-right:10px!important;column-gap:4px!important}header .brand{font-size:16px;gap:4px}header .logo{width:21px;height:21px}.header-right{gap:2px!important}.header-right .login-button{padding:0 4px}.header-right .theme-control{width:26px}.periods button{padding:8px 5px!important}}
.mobile-notice-links{display:flex;flex-direction:column;gap:8px}.mobile-notice-links button{text-align:left;padding:14px 4px;border-bottom:1px solid #84987625;line-height:1.5}

/* Focus the canvas; secondary information lives behind explicit controls. */
.community-strip,.bottom{display:none!important}
.mobile-info{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;min-height:36px;padding:0 10px;color:#9dad94;font-size:12px;border:1px solid #84987625;border-radius:10px}
.stage,.view-options-open .stage{height:var(--mobile-stage-height,calc(100dvh - 310px))!important;min-height:180px!important}
.search,#search-form{flex-wrap:nowrap!important;align-items:center;min-width:0}
#search-form input{flex:1 1 0;width:0!important;min-width:0;max-width:none}
#search-form button{flex:0 0 42px;width:42px!important;height:42px;padding:8px;display:grid;place-items:center}
#search-form button svg{width:18px;height:18px}
.mobile-tag-open{display:none}
#tag-tools-dialog form{display:flex!important;flex-wrap:nowrap;gap:8px;width:100%;max-width:none!important;margin:18px 0}
#tag-tools-dialog input{flex:1;min-width:0;width:0;border:1px solid #84987650;border-radius:10px;padding:12px;background:transparent;color:inherit}
#tag-tools-dialog form button{flex:0 0 54px;border-radius:10px;background:#8ced64;color:#14220f}
#tag-tools-dialog #tag-interest:not([hidden]){display:block;margin-top:18px;font-size:12px}
#mobile-notices .legal-links{margin-top:24px;padding-top:18px;border-top:1px solid #84987625;font-size:12px;gap:16px;justify-content:flex-start}
.view-summary{font-size:11px;color:#91a087;line-height:1.7;flex-basis:100%;padding:5px 2px}
@media(min-width:651px){.intro{min-height:34px;padding-top:6px;padding-bottom:6px}.toolbar{min-height:58px;padding-top:8px;padding-bottom:8px}.tag-bar{padding-top:8px;padding-bottom:8px}.view-summary{display:none}}
@media(max-width:650px){
 body{overflow-x:hidden;overflow-y:hidden}
 .tag-bar{min-width:0}
 .tag-bar #tag-filter-form,.view-options-open .tag-bar #tag-filter-form,.tag-bar #tag-interest{display:none!important}
 .mobile-tag-open{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;border:1px solid #84987625;color:#a2b197;font-size:17px}
 .mobile-info{padding:0 8px;min-width:48px;font-size:11px}
 .view-options-open .toolbar #search-form{display:flex!important;flex-wrap:nowrap!important;max-width:none;width:100%;flex-basis:100%;margin:4px 0 0;border-radius:12px;overflow:hidden}
 .view-options-open .toolbar .controls{display:flex!important;gap:8px;padding:4px 0 2px}
 .toolbar .controls .control{min-height:38px;border-radius:10px;background:#ffffff03;border-color:#84987625}
 .toolbar .controls .iconbtn{height:38px;width:38px;border-radius:10px}
 body:not(.compose-expanded) .compose-message{display:none!important}
 #post-list{max-height:var(--mobile-stage-height);overflow:auto;padding-bottom:12px}
}
.info-summary{margin-top:22px;padding-top:16px;border-top:1px solid #84987625;color:#899b80;font-size:11px;line-height:1.8;display:flex;flex-direction:column;gap:4px}
@media(min-width:651px){
 #search-form{width:230px;flex:1 1 180px;min-width:150px;max-width:270px}
 #popular-tags{display:flex;flex-wrap:nowrap;min-width:0;overflow-x:auto;scrollbar-width:none;flex:1}
 #popular-tags button{flex-shrink:0;white-space:nowrap}
 .tag-bar{flex-wrap:nowrap;min-height:48px}
 .tag-bar>span{white-space:nowrap;flex-shrink:0}
 #tag-filter-form{flex-shrink:0}
 .toolbar{flex-wrap:wrap}
 .periods{flex-shrink:0}
}
@media(min-width:1200px){header{height:72px;min-height:72px;padding-top:0;padding-bottom:0;flex-wrap:nowrap;gap:24px}header .channels{order:0;width:auto;flex:1;min-width:0;gap:8px}header .header-right{flex-shrink:0}}
/* iOS: keep editable text readable without focus zoom, and anchor to the keyboard. */
@media(max-width:650px){
 html body input,html body textarea,html body select,html body .dock input,html body .dock textarea,html body #search-form input{font-size:16px!important}
 .dock{bottom:var(--keyboard-inset,0px)!important;max-height:var(--editor-max-height,65dvh)!important;overscroll-behavior:contain}
 .stage,.view-options-open .stage{min-height:0!important}
}
