.tool-window{position:fixed;inset:auto 24px 24px auto;width:min(600px,calc(100vw - 32px));height:min(760px,calc(100dvh - 100px));min-width:300px;min-height:260px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);z-index:90;display:flex;flex-direction:column;background:var(--surface,#191c1e);color:var(--text,#eee);border:1px solid var(--line);border-radius:20px;box-shadow:0 12px 64px #0006;overflow:hidden;resize:both}
.tool-window[hidden]{display:none}.tool-window-bar{display:flex;align-items:center;gap:2px;padding:6px;border-bottom:1px solid var(--line);flex:none}.tool-window button{display:grid;place-items:center;min-width:44px;min-height:var(--control-min,48px);padding:8px;margin:0;background:transparent;color:inherit;border:0;border-radius:12px}.tool-window button:hover,.tool-window button:focus-visible{background:var(--surface)}.tool-window .tool-window-drag{flex:1;display:block;text-align:left;font:600 16px system-ui,sans-serif;cursor:move;touch-action:none;min-width:0}.tool-window iframe{width:100%;flex:1;min-height:0;border:0;background:var(--surface,#191c1e)}.tool-window .icon{width:22px;height:22px}.tool-window-moving iframe{pointer-events:none}.tool-window-message{margin:0;padding:8px 16px;font-size:14px}.tool-window-message[hidden]{display:none}
html.tool-embedded .ui-header,html.tool-embedded .ui-bottom-nav,html.tool-embedded .bottom-nav,html.tool-embedded .ui-mobile-nav{display:none!important}html.tool-embedded body{padding:0!important}html.tool-embedded main,html.tool-embedded #app{margin:0!important;padding:16px!important;max-width:none!important;width:100%!important}html.tool-embedded .android-install{display:none!important}html.tool-embedded .profile-label{display:none}
.home-start{grid-template-columns:1fr!important}.home-start>.card{max-width:720px;width:100%;box-sizing:border-box}
@media(max-width:600px){.tool-window{inset:76px 8px 80px 8px;width:calc(100vw - 16px);height:calc(100dvh - 156px);min-width:0;resize:none;border-radius:16px}.ui-header-actions{gap:2px}.tool-window .tool-window-drag{cursor:default}}
/* A drawing uses the page width; expanded mode keeps the main navigation visible. */
body.measure-open #app{max-width:none;padding:16px 24px}body.measure-open .measure-viewport{height:calc(100dvh - 260px);min-height:340px}body.measure-open .measure-mark-list{max-height:240px;overflow:auto}.measure-expanded #surface{position:fixed;inset:var(--viewer-top,76px) 12px var(--viewer-bottom,12px);z-index:40;background:var(--surface,#191c1e);display:flex;flex-direction:column;padding:8px;border:1px solid var(--line);border-radius:14px}.measure-expanded #surface>.measure-viewport{flex:1;height:auto;min-height:0}.measure-expanded #surface>.measure-toolbar{flex:none;margin:0 0 8px;position:static}.measure-expanded #surface>:not(.measure-viewport):not(.measure-toolbar):not(.measure-pages):not(dialog){display:none!important}.measure-expanded #surface>.measure-pages{flex:none;margin:0}.measure-toolbar .viewer-expand{margin-left:auto;min-width:48px;min-height:48px}.measure-toolbar .viewer-expand svg{width:22px;height:22px}.measure-open .measure-pages[hidden]{display:none}
@media(max-width:600px){body.measure-open #app{padding:12px}body.measure-open .measure-viewport{height:calc(100dvh - 310px);min-height:300px}.measure-expanded #surface{left:4px;right:4px;padding:4px}.measure-toolbar{gap:4px!important}.measure-toolbar button{padding:8px!important;min-height:var(--control-min,48px)}.measure-expanded #surface>.measure-viewport{min-height:0}}
.linear-print-dialog[open]{width:calc(100vw - 24px);max-width:none;height:calc(100dvh - 24px);max-height:none;display:flex;flex-wrap:wrap;align-content:flex-start;gap:6px;padding:12px}.linear-print-dialog[open] iframe{width:100%;height:calc(100% - 76px);flex:1 0 100%;margin:0}

html.tool-embedded #surface>.back{display:none}html.tool-embedded .tool-window{display:none}
@media(max-width:380px){.ui-header:has([data-tool-window]) .merolad-brand-image{display:none!important}.ui-header:has([data-tool-window]) .brand-compact{display:block!important}.ui-header-actions .ui-icon-button{width:48px;height:48px}}

.measure-expanded #notice:not([hidden]){position:fixed;left:24px;right:24px;top:var(--viewer-top,76px);z-index:60;max-height:100px;overflow:auto;box-shadow:var(--shadow)}

/* Audit82: short zoom captions retain a full touch target. */
.measure-toolbar button{min-width:48px}

