/* Phone and Telegram layouts, loaded after the desktop themes. */
.mobile-nav,.mobile-filter-toggle{display:none}
@media(max-width:700px){
html{scroll-padding-top:12px}body{padding-bottom:calc(76px + env(safe-area-inset-bottom));overflow-x:hidden}
main{margin:0!important;padding:16px!important;min-width:0}.sidebar{position:static!important;width:auto!important;height:auto!important;padding:14px 16px!important}.sidebar .brand{margin:0}.sidebar .nav-title,.sidebar #nav,.sidebar-bottom{display:none!important}
.topbar{gap:10px;flex-wrap:wrap;margin-bottom:16px}.top-actions{display:flex;flex-wrap:wrap;gap:6px}.top-actions button{min-height:42px;font-size:12px}.crumb{font-size:12px}
.topbar{display:none}.page-heading{padding:8px 0!important}.page-heading p{max-width:none;margin-bottom:0}.stats .stat span{min-height:36px}.stats .stat{min-height:98px}
.page-heading{margin:12px 0 18px}.page-heading h1{font-size:30px}.page-heading p{font-size:14px;line-height:1.5}.scope-stamp{display:none}.sketch-banner{display:none!important}
.stats{gap:8px;margin-bottom:16px}.stats .stat{padding:12px!important;min-height:85px}.stats .stat b{font-size:26px}.stats .stat span{font-size:12px}.stats .stat:after{display:none!important}
input,select,textarea{font-size:16px!important}button,a.quick-chip{min-height:44px;touch-action:manipulation}.search{min-height:54px;padding:6px 10px}.search input{width:100%;min-width:0}.search kbd{display:none}.search-suggestions{max-height:50dvh;overflow:auto}.search-wrap{margin-bottom:16px}
.mobile-filter-toggle{display:flex;width:100%;justify-content:space-between;align-items:center;margin-top:10px;padding:10px 12px;font-size:14px}.mobile-filter-toggle[aria-expanded="true"]{background:#eee6f5}
.search-wrap:not(.mobile-filters-open)>.filters,.search-wrap:not(.mobile-filters-open)>.result-controls{display:none!important}
.filters,.result-controls{gap:10px!important}.filters select,.result-controls label{width:100%;flex:1 1 100%;max-width:100%;min-width:0}.result-controls label{font-size:13px}.filters select,.result-controls select{min-height:44px}.favorite-filter{font-size:14px}.advanced-note{font-size:12px}
.list-top{flex-wrap:wrap;gap:8px}.list-surface{overflow-x:visible}.record-cell{min-width:0}.item-card,.table-row{overflow-wrap:anywhere}.list-coverage{font-size:11px}.quick-access summary{font-size:14px}.quick-access summary span{font-size:12px}#pagination{flex-wrap:wrap;gap:5px}
#list table,#list tbody{display:block;width:100%;min-width:0}#list thead{display:none}#list tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:14px 12px;gap:10px;border-bottom:1px solid var(--line)}#list td{display:block;padding:0;border:0;min-width:0}#list td:first-child{grid-column:1/-1}#list td.list-region{display:none}#list .record-cell b{font-size:16px}#list .record-cell small{font-size:12px}#list .record-cell .avatar{width:38px;height:38px;font-size:13px;flex-shrink:0}#list .tag{font-size:11px;white-space:normal}#list .record-cell{display:flex;align-items:center;gap:10px}
.mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:25;background:#fffcf8;border-top:1px solid #d8cfe1;padding:6px 4px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #312a4210}.mobile-nav button{display:grid;place-content:center;gap:2px;border:0;background:none;font-size:11px;padding:5px 2px;color:#625c70;min-width:0}.mobile-nav button span{font-size:20px;line-height:1.15}.mobile-nav button.active{background:#eee6f5;border-radius:12px;color:#64358d}
.detail.is-open{padding-top:var(--mini-top,0px);padding-bottom:calc(16px + env(safe-area-inset-bottom));height:100dvh}.detail.is-open #close-detail{top:calc(10px + var(--mini-top,0px));width:44px;height:44px}.detail-body p,.chain small,.detail-body .notice,.kv,.detail-link{font-size:14px!important}.tabs button{font-size:13px;white-space:nowrap;min-height:44px}.tabs{overflow-x:auto;flex-wrap:nowrap!important}.detail-head h2{font-size:25px}.detail-head{padding-top:54px}.detail-actions button{min-height:44px}.detail-body{overflow-wrap:anywhere}.finance-row{flex-wrap:wrap;gap:6px}
body.detail-open .mobile-nav{display:none}#toast{bottom:90px;max-width:90vw}
dialog#editor{width:calc(100vw - 20px);max-width:none;max-height:90dvh;padding:16px}#edit-fields label{font-size:14px}footer{font-size:11px;flex-wrap:wrap}
body.mini-app{padding-top:var(--mini-top,0px)}body.mini-app .mobile-nav{padding-bottom:calc(6px + var(--mini-bottom,env(safe-area-inset-bottom)))}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
@media(max-width:520px){.page-heading{margin:6px 0 12px}.page-heading h1{font-size:27px}.page-heading p{font-size:13px}.stats{gap:7px;margin-bottom:12px}.stats .stat{padding:9px!important;min-height:0!important}.stats .stat b{font-size:23px}.stats .stat span{min-height:0!important;font-size:11px;line-height:1.3;margin-top:4px}.stats .stat-top{min-height:0}.stats .stat small{font-size:13px}.quick-access{margin-bottom:12px}}
