:root{font:18px/1.6 system-ui,sans-serif;color:#24382f;background:#f5f1e7}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}
.toolbar{background:#213b32;color:#fff8e9;padding:.8rem max(1rem,calc((100% - 1160px)/2));}
.brand{display:flex;flex-wrap:wrap;gap:.25rem 1rem;align-items:baseline}
.brand b{font:700 1.5rem Georgia,serif}
.brand span,.toolbar p{font-size:.85rem}
.toolbar p{margin:.25rem 0 .55rem}
.toolbar #status:empty{display:none}
main{max-width:1160px;margin:0 auto;padding:.8rem 1rem 2rem}
.page-heading,.toolbar-actions,.tool-row{display:flex;align-items:center;gap:.45rem .7rem;flex-wrap:wrap}
.page-heading{justify-content:space-between;margin:.3rem 0 .65rem}
h1,h2{line-height:1.35;margin:.2rem 0}
h1{font-size:clamp(1.3rem,3vw,1.9rem)}
h2{font-size:1.2rem}
#page-state{font-size:.85rem;color:#465a4d}
button,input,textarea,select{font:inherit;color:inherit}
button{min-height:46px;padding:.35rem .85rem;background:#fffaf1;border:1px solid #607367;border-radius:5px;color:#24382f;font-weight:650;cursor:pointer}
button:hover{background:#e2ebdd}
button.primary{background:#28674a;color:white;border-color:#28674a}
button.primary:hover{background:#194e36}
.toolbar button.primary{background:#ecce8d;color:#1b352a;border-color:#ecce8d}
button.danger{background:#863a2e;color:#fff;border-color:#863a2e}
button:disabled{opacity:.55;cursor:default}
:focus-visible{outline:3px solid #ae5b25;outline-offset:2px}
#editing-tools{background:#e8efe5;border:1px solid #b7c4b3;padding:.6rem .8rem;margin-bottom:.6rem}
#prompt{margin:0 0 .45rem}
label{display:block;font-weight:650}
textarea,input,select{max-width:100%;padding:.4rem .6rem;background:#fffdf7;border:1px solid #687d70;border-radius:4px}
textarea{width:100%;display:block;margin:.2rem 0 .45rem;resize:vertical}
#layout{display:block;width:100%;min-height:48vh;height:74vh;border:1px solid #c3c4b7;background:#fffdf7}
#lookup{margin:1rem 0}
.page-list{list-style:none;margin:.4rem 0 1rem;padding:0}
.page-list li{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;gap:.55rem;padding:.65rem;border-bottom:1px solid #cfcbbf;background:#fffbf3}
.page-list li>div{display:grid;gap:.1rem}
.page-list small{color:#4c5b51}
.page-list a{color:#245d44;font-weight:700;text-underline-offset:.2em}
#trash{background:#eee7dc;padding:.4rem .7rem}
summary{cursor:pointer}
dialog{max-width:min(32rem,calc(100% - 2rem));width:100%;border:1px solid #677e70;border-radius:7px;background:#fff8ed;color:#24382f;padding:1.1rem}
dialog::backdrop{background:#14251ed0}
dialog label{margin:.7rem 0 .2rem}
dialog select,dialog input{width:100%}
dialog .tool-row{margin-top:1rem;justify-content:flex-end}


.parts{display:flex;flex-wrap:wrap;gap:.35rem .6rem}
.editor-part,.part-ghost{display:inline-flex;align-items:center;gap:.45rem;min-height:44px;padding:.25rem .65rem;border:1px dashed #5c806d;border-radius:7px;background:#fffdf5;color:#244c38;font:650 .9rem/1.25 system-ui,sans-serif;white-space:nowrap}
.editor-part{cursor:grab;touch-action:none;user-select:none}
.editor-part:active{cursor:grabbing}
.editor-part[aria-pressed="true"]{background:#d4e8d8;border-style:solid}
.part-icon{display:inline-flex;align-items:stretch;gap:2px;width:24px;height:18px;justify-content:center;color:#356f51}
.part-icon i{flex:1;border:1px solid currentColor;border-radius:1px}
.part-text{font:700 18px/18px Georgia,serif}
.part-photo{border:1px solid currentColor;border-radius:2px;position:relative;overflow:hidden}
.part-photo::after{content:"";position:absolute;inset:6px 2px -5px;transform:rotate(-43deg);background:currentColor;border-radius:2px}
.part-ghost{position:fixed;z-index:10000;pointer-events:none;transform:translate(-50%,-50%) rotate(-4deg);box-shadow:0 8px 20px #263e3250;border-style:solid}

.part-table{border:1px solid currentColor;border-radius:2px;background:linear-gradient(90deg,transparent 48%,currentColor 48% 52%,transparent 52%),linear-gradient(transparent 47%,currentColor 47% 53%,transparent 53%)}

.toolbar-actions :is(#edit,#delete-page,#delete-reason){margin-inline-start:auto}
#move-dialog,#create-dialog{max-width:min(45rem,calc(100% - 1rem));max-height:calc(100% - 1rem)}
.sitemap-picker{max-height:45vh;overflow:auto;padding:.65rem;border:1px solid #aebfb0;background:#fffdf7}
.sitemap-location{min-height:1.5em;font-weight:650;overflow-wrap:anywhere}

.part-video{align-items:center;border:1px solid currentColor;border-radius:3px;font-size:.65rem}
.video-source{justify-content:flex-start!important}
.video-source button[aria-pressed=true]{background:#28674a;border-color:#28674a;color:#fff}
#video-error{color:#873a31;margin:.4rem 0}
#video-error:empty{display:none}
#studio-public:not([hidden]){display:inline-flex;align-items:center;min-height:44px;margin-top:.65rem;padding:.35rem .85rem;border-radius:5px;background:#fffdf7;color:#214d3d;font-weight:700;text-decoration:none}
#studio-public:hover{background:#e8f0e9}
#studio-login-form button{margin:.7rem .3rem}

.page-delete-reason{font-size:.85rem;line-height:1.45;max-width:30rem}
