/* One bounded workspace: desktop columns, mobile panel/map views. */
html,body{max-width:100%;min-width:0}
button,input,select,textarea{font:inherit}
.shell{height:100vh;height:100dvh;min-height:0;grid-template-columns:250px minmax(0,1fr);overflow:hidden}
.nav{min-height:0;overflow:auto}.nav .brand{flex-shrink:0}.menu{flex-shrink:0}.user{padding-bottom:12px}
.content,.content.maintainer-content{height:100%;min-width:0;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}
/* The hidden mobile switch must not move the workspace into an auto-sized row. */
.content>.top{grid-row:1}.content>.mobile-view-switch{grid-row:2}.content>.workspace{grid-row:3}
.top,.maintainer-content .top{min-height:64px;gap:10px;padding:10px 16px;flex-wrap:wrap;min-width:0}
.heading-group{flex:1;min-width:0;overflow-wrap:anywhere}.heading-group h1{white-space:normal;margin:0}
#status{max-width:100%;overflow-wrap:anywhere}
.workspace,.maintainer-content .workspace{height:100%;min-width:0;min-height:0;grid-template-columns:340px minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden}
.side{min-width:0;min-height:0;overscroll-behavior:contain;overflow:auto;overflow-wrap:anywhere}
.map-panel{position:relative;min-width:0;min-height:0;height:100%;isolation:isolate}
#map{width:100%;height:100%;min-height:0;min-width:0}
.access-workspace .map-panel{display:none}
.mobile-only,.mobile-view-switch,.nav-scrim{display:none}
.maint-grid{grid-template-columns:repeat(auto-fit,minmax(min(290px,100%),1fr))}
.side input:not([type=checkbox]):not([type=radio]),.side select,.side textarea{max-width:100%;min-width:0}
.history-fields{display:grid;gap:8px}.history-fields label{display:grid;gap:4px;font-size:13px;color:var(--muted)}
.history-fields input{width:100%;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--text)}
.history-tools{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.history-tools button,.history-notice button{padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);cursor:pointer}
.history-layers label{display:flex;gap:8px;align-items:center;min-height:36px}.history-layers input{width:18px;height:18px;margin:0}
.history-notice{background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:10px;padding:12px;line-height:1.5;cursor:default}
.history-notice p{margin:4px 0 8px;font-size:13px}.history-notice[data-tone=warning]{border-left-color:#f59e0b}.history-notice[data-tone=error]{border-left-color:#fb7185}
.history-notice[hidden]{display:none}
#historyMapNotice{position:absolute;z-index:1000;top:12px;left:52px;right:12px;max-width:440px;max-height:45%;overflow:auto;box-shadow:0 4px 18px #0005}
#historyMapNotice b{font-size:14px;display:block}
#historyMapNotice details{margin:4px 0}#historyMapNotice summary{cursor:pointer;color:var(--muted);font-size:13px;min-height:28px;padding:4px 0}
#historyMapNotice button{margin-top:4px;min-height:40px}
.modal{max-height:90vh;max-height:90dvh;overflow:auto;overflow-wrap:anywhere}.modal-actions{flex-wrap:wrap}.modal-actions button{min-height:42px}
@media(max-width:1100px) and (min-width:851px){.shell{grid-template-columns:210px minmax(0,1fr)}.workspace{grid-template-columns:300px minmax(0,1fr)}.nav{padding:12px}}
@media(max-width:850px){
 .shell{grid-template-columns:minmax(0,1fr)}
 .shell>.nav{display:none;position:fixed;inset:0 auto 0 0;width:min(300px,88vw);height:100vh;height:100dvh;z-index:2100;padding:16px;background:var(--bg)}
 .shell.menu-open>.nav{display:flex}
 .nav .brand .words,.nav .user{display:block}.nav .menu .label{display:inline}.nav .menu button{text-align:left;min-height:44px}
 .nav .user{margin-top:24px}.nav .brand{margin-top:8px;margin-bottom:14px}.nav .mark{flex-shrink:0}
 .nav-close{align-self:flex-end}
 .mobile-only{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);cursor:pointer}
 .shell.menu-open>.nav-scrim{display:block;position:fixed;inset:0;border:0;background:#0009;z-index:2000}
 .top,.maintainer-content .top{padding:8px 12px;gap:6px 10px;min-height:0}
 .heading-group h1{font-size:18px}.heading-group{gap:2px 8px}.heading-group nav{font-size:12px}
 #status{flex-basis:100%;font-size:11px;padding-left:54px;line-height:1.3}
 .mobile-view-switch:not([hidden]){display:flex;gap:6px;padding:6px 12px 10px;border-bottom:1px solid var(--line)}
 .mobile-view-switch button{flex:1;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--muted);font-weight:600;cursor:pointer}
 .mobile-view-switch button[aria-pressed=true]{background:var(--primary);color:white;border-color:var(--primary)}
 .workspace,.maintainer-content .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 .workspace .side{order:initial;padding:12px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
 .workspace:not(.access-workspace) .map-panel{display:none}
 .content[data-mobile-view=map] .workspace:not(.access-workspace) .side{display:none}
 .content[data-mobile-view=map] .workspace:not(.access-workspace) .map-panel{display:block}
 .access-workspace .side{display:block}
 .side input:not([type=checkbox]):not([type=radio]),.side select,.side textarea{font-size:16px}
 .side .primary{min-height:44px}.maint-tabs button{min-height:44px}
 .modal-row{grid-template-columns:minmax(0,1fr)}.modal{width:calc(100vw - 24px);padding:14px}
 .login{width:calc(100% - 24px);margin:6vh auto;padding:20px}.login .brand .words{display:block}
 .access-toolbar,.access-toolbar label{min-width:0;max-width:100%}.access-toolbar input{width:100%}
 #historyMapNotice{top:10px;right:10px;left:54px;max-height:44%;padding:9px}
}
