:root{color-scheme:light;font:16px/1.5 system-ui,sans-serif;color:#142939;background:#f3f6f7}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
header{background:#102a40;color:#fff;padding:1.35rem max(1.25rem,calc((100vw - 1500px)/2));display:flex;justify-content:space-between;align-items:center;gap:1rem}
h1,h2,p{margin:0}
h1{font-size:clamp(1.15rem,3vw,1.8rem)}
header a{color:inherit;text-decoration:none}
header a:hover{text-decoration:underline}
.brand{font-size:.875rem;letter-spacing:.04em;color:#a6e2cf}
nav,.actions{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}
main{max-width:1532px;margin:auto;padding:1rem}
.workspace{display:grid;grid-template-columns:minmax(210px,270px) minmax(0,1fr);gap:1rem}
aside,.editor,dialog{background:white;border:1px solid #d5e0e5;border-radius:12px;padding:1rem}
aside{align-self:start}
label{display:block;font-weight:650;font-size:.88rem;margin:.5rem 0 .25rem}
input,select,textarea,button{font:inherit}
input,select,textarea{width:100%;border:1px solid #b7c8d1;border-radius:6px;padding:.5rem;background:white;color:inherit}
button{border:1px solid transparent;border-radius:7px;background:#126447;color:white;font-weight:650;padding:.5rem .75rem;cursor:pointer}
button:disabled{opacity:.5;cursor:default}
button.secondary{color:#19394c;background:#eef3f6;border-color:#d5e0e5}
button[aria-current="true"],button[aria-pressed="true"]{background:#d7eee6;color:#124c39;border-color:#96c9b8}
#files{display:grid;gap:.2rem;max-height:58vh;overflow:auto;margin:.65rem 0}
#files button{text-align:left;overflow-wrap:anywhere;font-weight:500}
.toolbar{display:flex;justify-content:space-between;gap:.8rem;flex-wrap:wrap;padding-bottom:.8rem;border-bottom:1px solid #d5e0e5}
.path{font-weight:750;overflow-wrap:anywhere}
#status{font-size:.9rem;color:#35546a}
#status[data-error="true"]{color:#a12727}
.file-actions{padding:.75rem 0}
iframe{width:100%;height:66vh;border:1px solid #d5e0e5;border-radius:6px}
#asset img{display:block;max-width:100%;max-height:55vh;margin:1rem 0}
dialog{max-width:min(90vw,540px)}
dialog .actions{margin-top:1rem}
dialog::backdrop{background:#14293988}
@media(max-width:720px){.workspace{grid-template-columns:1fr}#files{max-height:23vh}header{align-items:flex-start}}

#visualTools { padding: .5rem 1rem; background: #eef4fa; }
#visualTools p { margin: .45rem 0; }
#inspector { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
#inspector label { flex: 1 1 15rem; }
#inspector input { display: block; width: 100%; }
#previewFrame { width: 100%; height: 74vh; min-height: 480px; background: white; }
#files { max-height: 65vh; overflow: auto; }
#previewFrame[hidden], #inspector[hidden], #visualTools[hidden] { display: none; }
.login { max-width: 430px; margin: 4rem auto; padding: 2rem; }
.login input { display: block; width: 100%; margin: .5rem 0 1rem; }
header form { display: inline; }
