.mobile-menu-toggle,.mobile-status,.mobile-label{display:none}
.site-header .logo{display:flex;align-items:center;gap:20px}
.site-header .logo img{display:block;width:160px;height:auto;max-height:none;margin-block:-22px;object-fit:contain}
.site-header .logo span{margin-left:0}
#auth-dialog{width:min(480px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;padding:0}
#auth-dialog>.dialog-close{z-index:1}
#auth-dialog .auth{display:block;margin:0;border:0;border-radius:10px}
#auth-dialog .auth-photo{display:none}
#auth-dialog .auth-form{padding:32px}
#auth-dialog .auth h1{font-size:29px}
#auth-dialog .auth .eyebrow{margin-bottom:10px}
#leave-editor-dialog .button-row{display:grid;gap:10px}
#leave-editor-dialog .button-row .text-button{text-align:center;min-height:40px}
@media(max-width:650px){
  body[data-route=editor] .site-header{position:sticky;top:0;z-index:30;min-height:54px;height:54px;padding:8px 14px;gap:8px;background:#f7f5eff5;backdrop-filter:blur(12px)}
  body[data-route=editor] .site-header .logo{font-size:27px}
  body[data-route=editor] .mobile-menu-toggle{display:grid;place-items:center;width:42px;height:40px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink);font-size:21px}
  body[data-route=editor] .site-header>nav{display:none}
  body[data-route=editor][data-menu-open=true] .site-header>nav{display:flex;position:absolute;top:100%;left:0;right:0;background:var(--cream);border-bottom:1px solid var(--line);box-shadow:0 10px 20px #0000000c;padding:16px;flex-wrap:wrap;gap:18px;font-size:13px}
  body[data-route=editor] .site-header>nav>a{display:block}
  body[data-route=editor]{height:100dvh;overflow:hidden}
  body[data-route=editor] .editor-page{padding:0;height:calc(100dvh - 54px);display:flex;flex-direction:column}
  body[data-route=editor] .editor-toolbar{flex:none}
  body[data-route=editor] .editor-toolbar{position:sticky;top:54px;z-index:20;display:flex;align-items:center;flex-wrap:nowrap;gap:8px;min-height:54px;margin:0;padding:7px 12px;background:#faf9f5f5;border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}
  body[data-route=editor] .editor-title{min-width:0;flex:1}
  body[data-route=editor] .editor-title .breadcrumb,body[data-route=editor] #project-heading{display:none}
  body[data-route=editor] .editor-toolbar .button-row{width:auto;gap:7px;flex-shrink:0}
  body[data-route=editor] .editor-toolbar .button.small{min-height:40px;padding:9px 12px;font-size:12px;flex:none}
  body[data-route=editor] .desktop-label,body[data-route=editor] .desktop-status{display:none}
  body[data-route=editor] .mobile-label,body[data-route=editor] .mobile-status{display:inline}
  body[data-route=editor] #save-status{display:flex;align-items:center;gap:6px;font-size:10px;line-height:1.4}
  body[data-route=editor] #save-status:before{content:'';width:6px;height:6px;border-radius:50%;background:#9b9d92;flex-shrink:0}
  body[data-route=editor] #save-status[data-state=dirty]:before{background:#c3942d}
  body[data-route=editor] #save-status[data-state=saved]:before{background:#4e7957}
  body[data-route=editor] #editor-frame{flex:1;min-height:0;height:0!important;border:0;border-radius:0;display:block;width:100%}
  body[data-route=editor] .draft-note{display:none}
  body[data-route=editor] .site-footer{display:none}
  #auth-dialog .auth-form{padding:28px 22px}
  #auth-dialog .auth h1{font-size:27px}
  dialog form,.dialog-content{padding:26px 22px}
}

@media(max-width:650px){
  .site-header{position:relative;z-index:30;min-height:54px;height:54px;padding:8px 14px;gap:8px}
  .site-header .logo{font-size:27px}
  .site-header .logo img{width:130px;margin-block:-18px}
  .mobile-menu-toggle{display:grid;place-items:center;width:42px;height:40px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink);font-size:21px}
  .site-header>nav{display:none}
  body[data-menu-open=true] .site-header>nav{display:flex;position:absolute;top:100%;left:0;right:0;background:var(--cream);border-bottom:1px solid var(--line);box-shadow:0 10px 20px #0000000c;padding:16px;flex-wrap:wrap;gap:18px;font-size:13px}
  body[data-menu-open=true] .site-header>nav>a{display:block}
  .welcome{min-height:calc(100svh - 54px)}
}
