.tool-chevron{font-size:18px;line-height:1;margin-left:4px;color:#275f3e}
.brand[aria-haspopup="menu"]{cursor:pointer}
.brand[aria-haspopup="menu"]:focus-visible,.mobile-brand-tool-trigger:focus-visible,.mobile-editor-tool-trigger:focus-visible{outline:3px solid #397451;outline-offset:3px}
.tool-selector{position:fixed;z-index:200;min-width:205px;padding:5px;border:1px solid #dce2dd;border-radius:12px;background:#fff;color:#142019;box-shadow:0 12px 35px #14201930}
.tool-selector[hidden]{display:none}
.tool-selector button,#mobile-app .tool-selector button{display:block;width:100%;min-height:48px;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left;font:inherit;font-size:13px;cursor:pointer;touch-action:manipulation}
.tool-selector button:hover,.tool-selector button:focus-visible{background:#edf4ef}
.mobile-brand-tool-trigger,.mobile-editor-tool-trigger{display:none}
.vo-service-footer{position:fixed;z-index:9;right:14px;bottom:8px;display:flex;gap:8px;max-width:70%;padding:4px 7px;border-radius:7px;background:#ffffffdf;color:#516058;font-size:9px;line-height:1.25;pointer-events:none}
.desktop-field-count-controls{grid-column:1/-1;padding:6px 10px 10px;border-top:1px solid #dce2dd}
.desktop-field-count-action,.mobile-counts-link{border:1px solid #cbd8ce;border-radius:9px;background:#edf4ef;color:#183f28;font:inherit;font-size:12px;font-weight:700;padding:8px 10px;cursor:pointer}
.desktop-field-count-summary{display:grid;grid-template-columns:1fr auto;gap:3px 12px;margin-top:6px;font-size:11px}
.desktop-field-count-summary strong,.desktop-field-count-summary small{grid-column:1/-1}
.desktop-field-count-summary span{grid-column:1/-1}
.mobile-counts-link{display:block;width:100%;margin:12px 0;text-align:left}
.topbar-actions>#desktop-counts-trigger{min-height:36px;padding:0 14px;border:1px solid #dce2dd;border-radius:999px;background:#fff;color:#183f28;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
#desktop-counts-panel{position:fixed;z-index:100;top:64px;right:105px;min-width:230px;max-width:320px;padding:13px;border:1px solid #dce2dd;border-radius:12px;background:#fff;box-shadow:0 14px 35px #14201930;color:#142019}
#desktop-counts-panel[hidden]{display:none}
#desktop-counts-panel{max-height:calc(100dvh - 90px);overflow:auto;max-width:370px}
.counts-summary-list{margin-top:9px;padding-top:6px;border-top:1px solid #dce2dd}
.counts-summary-item{display:grid;gap:4px;padding:9px 0}
.counts-summary-item small{color:#516058;font-size:11px}
#desktop-counts-panel label{display:grid;gap:4px;margin:9px 0;font-size:12px}
#desktop-counts-panel input{width:100%;box-sizing:border-box;padding:8px;border:1px solid #cbd8ce;border-radius:7px;font:inherit}
#desktop-counts-panel button{display:block;width:100%;margin-top:6px;padding:9px;border:0;border-radius:7px;background:#edf4ef;color:#183f28;font:inherit;font-size:12px;text-align:left;cursor:pointer}
@media(max-width:800px), (max-width:1100px) and (pointer:coarse){
  .topbar-actions>#desktop-counts-trigger,#desktop-counts-panel{display:none}
  .mobile-brand{pointer-events:auto!important}
  .mobile-brand-tool-trigger{display:flex;align-items:center;padding:0;border:0;background:transparent;cursor:pointer}
  .mobile-brand-tool-trigger img{width:145px;height:45px;object-fit:contain}
  .mobile-editor-tool-trigger{display:flex;align-items:center;padding:5px;border:0;border-radius:10px;background:#fff;cursor:pointer}
  .mobile-editor-tool-trigger img{width:66px;height:24px;object-fit:contain}
  .mobile-editor-top strong{min-width:0}
  body.mobile-app-active[data-mobile-screen="editor"] #mobile-app .mobile-brand{display:none}
  body.mobile-app-active[data-mobile-screen="editor"] #mobile-app .mobile-editor-top{grid-template-columns:auto auto minmax(0,1fr) auto}
  .vo-service-footer{bottom:calc(75px + env(safe-area-inset-bottom));right:10px;flex-direction:column;gap:0;max-width:45%;font-size:8px}
  body[data-mobile-screen="editor"] .vo-service-footer,body[data-mobile-screen="parameters"] .vo-service-footer{display:none}
}

/* A single fitted brand control keeps the tool selector clear of the field
   title. Scope beats the older mobile shell's generic button/span rules. */
@media screen{
 #mobile-app[data-screen]>.mobile-brand{top:calc(8px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:70px;max-width:calc(100% - 82px);display:flex;align-items:center;gap:6px;pointer-events:auto}
 #mobile-app:not([data-screen="map"])>.mobile-brand{display:none}
 #mobile-app[data-screen] .mobile-brand-tool-trigger{display:flex;flex:0 0 auto;align-items:center;justify-content:flex-start;gap:4px;height:44px;min-height:44px;max-width:160px;padding:5px 8px;border:1px solid #dce5de;border-radius:12px;background:#fffffff2;color:#21462e;box-shadow:0 3px 14px #17302319}
 #mobile-app[data-screen] .mobile-brand>img,#mobile-app[data-screen] .mobile-brand-tool-trigger img{flex:none;width:116px;height:32px;padding:0;background:transparent;border-radius:0;box-shadow:none;object-fit:contain}
 #mobile-app[data-screen] .mobile-brand .tool-chevron,#mobile-app[data-screen] .mobile-editor-tool-trigger .tool-chevron{display:block;flex:0 0 14px;width:14px;min-width:14px;max-width:14px;margin:0;padding:0;border-radius:0;background:transparent;color:inherit;font-size:18px;line-height:1;letter-spacing:0;box-shadow:none;text-align:center}
 #mobile-app[data-screen] .mobile-brand>.mobile-release-label{display:block;flex:0 1 auto;min-width:0;max-width:58px;margin:0;padding:3px 5px;border-radius:6px;background:#fffffff0;color:#47604e;font-size:7px;line-height:1.25;font-weight:600;letter-spacing:0;white-space:normal;overflow-wrap:anywhere;box-shadow:none}
 #mobile-app[data-screen] .mobile-brand>.mobile-release-label:empty{display:none}
 #mobile-app[data-screen="editor"] .mobile-editor-tool-trigger{display:flex;grid-column:1;grid-row:1;justify-self:start;align-items:center;justify-content:flex-start;gap:4px;width:auto;max-width:146px;height:44px;min-height:44px;padding:5px 8px;border:1px solid #dce5de;border-radius:12px;background:#fffffff2;color:#21462e;box-shadow:0 3px 14px #17302319}
 #mobile-app[data-screen="editor"] .mobile-editor-tool-trigger img{width:104px;height:32px;object-fit:contain}
 #mobile-app[data-screen] .tool-selector{max-width:calc(100% - 24px);width:218px}
 html[data-theme="dark"] #mobile-app[data-screen] :is(.mobile-brand-tool-trigger,.mobile-editor-tool-trigger){background:#f7faf5;color:#21462e;border-color:#dde8de}
 html[data-theme="dark"] #mobile-app[data-screen] .mobile-brand>.mobile-release-label{background:#203b2b;color:#d7e6da}
}
