body header.dp-app-header{flex-wrap:wrap;height:auto!important;min-height:52px;overflow:visible!important}body header.dp-app-header button:not(.dp-button-icon-only){box-sizing:border-box!important;height:36px!important;min-height:36px!important;max-height:36px!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;flex-shrink:0}body header.dp-app-header .dp-top-controls{display:inline-flex!important;align-items:center;gap:6px;flex:none;white-space:nowrap}body header.dp-app-header button.dp-header-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;position:static!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important;padding:0!important;margin:0!important;border:1px solid var(--line)!important;border-radius:5px!important;background:var(--dp-header-button-bg,var(--bg2))!important;color:var(--text)!important;font:18px/1 var(--ui-font)!important;box-shadow:none!important}body button[data-open-settings]::before,body button[data-open-settings]::after,body button.dp-header-icon::before,body button.dp-header-icon::after{content:none!important;display:none!important}body header.dp-app-header button.dp-header-icon:hover{border-color:var(--green)!important;color:var(--green)!important}body .project-actions,body .photo-project-actions{display:flex!important;flex-wrap:wrap;gap:4px}body .project-actions button,body .photo-project-actions button{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;flex:0 0 auto!important;min-width:max-content!important}body .workshop-dialog button,body .workshop-dialog a,body .kit-settings button:not(.settings-close),body .workshop-header-links button{background:var(--bg2)!important;color:var(--text)!important;border:1px solid var(--line)!important;white-space:nowrap;word-break:normal;overflow-wrap:normal}body .workshop-dialog button:hover,body .kit-settings button:hover{border-color:var(--green)!important}body .workshop-dialog .workshop-tabs button[aria-pressed=true]{background:var(--green)!important;color:var(--accent-text,#162013)!important}body .kit-settings .theme-card[aria-pressed=true]{border-color:var(--green)!important;outline:1px solid var(--green)}.workshop-header-links{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-right:6px}.workshop-header-links button{font:12px var(--ui-font)!important;padding:0 10px!important;border-radius:5px;white-space:nowrap!important}.settings-shortcuts{border-top:1px solid var(--line);padding-top:14px;margin:18px 0}.settings-shortcuts>summary{font-weight:bold;cursor:pointer}.settings-shortcuts table{width:100%;border-collapse:collapse;margin-top:12px}.settings-shortcuts th,.settings-shortcuts td{padding:8px 3px;border-bottom:1px solid var(--line);font-size:11px;text-align:left;overflow-wrap:anywhere}.settings-shortcuts td button{padding:6px!important;margin:2px;font-size:11px!important}.settings-shortcuts input[type=search]{width:100%;padding:9px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:5px}.settings-shortcuts [data-shortcut-status]{color:var(--text);font-size:12px}.settings-shortcut-scroll{max-height:360px;overflow:auto}.kit-settings:has(.settings-shortcuts[open]){width:min(800px,calc(100vw - 32px))!important}.kit-settings .workshop-controls{display:flex;flex-wrap:wrap;gap:6px}.command-binding-footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;border-top:1px solid var(--line);font:11px var(--ui-font);color:var(--muted)}.command-binding-footer button{font:12px var(--ui-font)!important;padding:7px 10px!important;min-height:32px!important;background:var(--bg2)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:5px;white-space:nowrap}.command-binding-footer span{flex:1;min-width:120px}@media(max-width:800px){body header.dp-app-header button:not(.dp-button-icon-only){height:44px!important;min-height:44px!important;max-height:44px!important}body header.dp-app-header button.dp-header-icon{width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;max-height:44px!important}body header.dp-app-header{gap:6px;padding:7px!important}body.workshop-app>main>header.dp-app-header{display:flex;flex-wrap:wrap!important;align-items:center;height:auto!important;min-height:58px}body.workshop-app>main>header.dp-app-header>.header-right{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;width:100%;font-size:0}body .workshop-header-links{margin:0;gap:6px;flex:1;min-width:0}body .workshop-header-links button{font-size:11px!important;padding:0 8px!important}body .dp-app-header .header-buttons,body .dp-app-header .header-actions{display:flex;align-items:center;flex-wrap:wrap;gap:5px;overflow:visible!important}.kit-settings .settings-shortcuts th,.kit-settings .settings-shortcuts td{font-size:11px}.settings-shortcuts td button{padding:5px!important}}

body .project-row [data-project-action],body .photo-project [data-photo-project-action],body .note-heading button{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;flex-shrink:0}.command-dialog:has(.command-binding-footer) .command-results{max-height:min(42dvh,calc(100dvh - 250px))}

/* Phone headers share the same reachable icon group without widening the app. */
@media(max-width:850px){
body.mobile-ui.photo-app{grid-template-columns:minmax(0,1fr)}
body.mobile-ui.photo-app .photo-header,body.mobile-ui.photo-app .photo-body{min-width:0;width:100%;max-width:100%}
body.mobile-ui.photo-app .photo-header .header-buttons{min-width:0;flex-shrink:1;flex-wrap:wrap}
body.mobile-ui.photo-app .photo-header .brand{min-width:0;flex:1;overflow:hidden}
body.mobile-ui header.dp-app-header .dp-top-controls{gap:4px}
body.mobile-ui header.dp-app-header .header-buttons,body.mobile-ui header.dp-app-header .header-actions{gap:4px}
}
@media(max-width:480px){
body.mobile-ui.photo-app .photo-header .brand-word,body.mobile-ui.cut-app .app-header .brand-word{display:none}
body.mobile-ui.photo-app .photo-header .brand,body.mobile-ui.cut-app .app-header .brand{flex:none;width:28px;overflow:hidden}
body.mobile-ui.photo-app .photo-header .header-buttons{flex-wrap:nowrap}
body.mobile-ui.photo-app .photo-header #savePhoto{display:none!important}
}

@media(max-width:360px){body.mobile-ui.photo-app .photo-header #redoPhoto{display:none!important}}

@media(max-width:480px){
 body.mobile-ui.photo-app .photo-header .photo-brand{flex:0 1 30px}
 body.mobile-ui:is(.photo-app,.cut-app) header.dp-app-header .dp-top-controls [aria-label="Local workspace"],
 body.mobile-ui:is(.photo-app,.cut-app) header.dp-app-header .dp-top-controls [data-open-settings],
 body.recorder-app header.dp-app-header .dp-top-controls :is([aria-label="Local workspace"],[data-open-settings],#recorderCommands){display:none!important}
}

/* Use the same control height for app-header fields and buttons. */
body header.dp-app-header{--dp-header-control-height:36px}
body header.dp-app-header :is(select,input:not([type=checkbox],[type=radio],[type=range],[type=hidden],[type=file],[type=color])){box-sizing:border-box;block-size:var(--dp-header-control-height)!important;min-block-size:var(--dp-header-control-height)!important;max-block-size:var(--dp-header-control-height)!important;align-self:center}
body header.dp-app-header :is(#appSettings,.chess-mode-bar select){border:1px solid var(--line);border-radius:5px;background-color:var(--dp-header-button-bg,var(--bg2));color:var(--text);padding-inline:10px;font:13px var(--ui-font,system-ui)}
body header.dp-app-header :is(#appSettings,.chess-mode-bar select):hover{border-color:var(--green)}
@media(max-width:800px){body header.dp-app-header{--dp-header-control-height:44px}}

/* Export stays on the same control baseline as adjacent actions. */
body header.dp-app-header button:is(#exportBtn,#exportPhoto,#pdfExport,#dawExport,#scannerExport,[id$="Export"],[id^="export"]):not(.dp-button-icon-only){box-sizing:border-box!important;display:inline-flex;align-items:center;justify-content:center;block-size:var(--dp-header-control-height)!important;min-block-size:var(--dp-header-control-height)!important;max-block-size:var(--dp-header-control-height)!important;padding-block:0!important;align-self:center}
