:root{color-scheme:dark;--bg:#0e1714;--panel:#19241d;--border:#36453a;--text:#f3f4e9;--muted:#9bad9d;--gold:#e4c27b}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:'DM Sans',system-ui,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--gold);outline-offset:2px}.builder-head{height:74px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid var(--border);gap:20px}.builder-brand{font-size:17px;font-weight:800;letter-spacing:-.04em;white-space:nowrap}.builder-brand>span{color:var(--gold);font-size:23px;margin-right:7px}.builder-brand b{font-weight:500;color:#aabda8}.builder-head-center{display:flex;gap:8px;color:#a6bbaa;font-size:11px;align-items:center}.save-dot,.live-dot{width:7px;height:7px;border-radius:50%;background:#89cd8e;display:inline-block;box-shadow:0 0 8px #89cd8e44}.builder-head-actions{display:flex;gap:8px}button.subtle,.wide-alt{border:1px solid var(--border);background:#1a2920;color:#e8f0e4;border-radius:8px;padding:12px 14px;font-size:12px;font-weight:700}.primary{background:var(--gold)!important;color:#18251a!important;border:0!important;border-radius:8px;padding:12px 17px;font-size:12px;font-weight:800}.builder-app{height:calc(100vh - 74px);min-height:530px;display:grid;grid-template-columns:358px minmax(0,1fr)}.editor-sidebar{border-right:1px solid var(--border);min-height:0;display:flex;flex-direction:column;background:#151f19}.sidebar-title{padding:25px;border-bottom:1px solid var(--border)}.sidebar-title span{font-size:10px;letter-spacing:.19em;color:var(--gold);font-weight:800}.sidebar-title strong{display:block;font-size:25px;letter-spacing:-.04em;margin:10px 0}.sidebar-title p{font-size:12px;color:var(--muted);line-height:1.6;margin:0}.sidebar-scroll{overflow:auto;flex:1}.edit-group{padding:22px 25px;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:10px}.edit-group h2{font-size:11px;letter-spacing:.11em;color:#e6cd91;font-weight:800;margin:0 0 7px}.edit-group label{font-size:11px;color:#bfcdbd;font-weight:700;margin-top:5px}.edit-group input:not([type=file]),.edit-group textarea,.edit-group select{background:#0e1912;color:#eef3eb;border:1px solid #3b5441;border-radius:7px;width:100%;min-width:0;padding:12px;font-size:12px}.edit-group textarea{resize:vertical;line-height:1.5}.edit-group input[type=file]{font-size:11px;max-width:100%;color:#b5c7b2;padding:8px 0}.edit-group input[type=file]::file-selector-button{background:#2b3c2d;border:1px solid var(--border);color:#dde8da;border-radius:5px;padding:7px;font-size:11px;cursor:pointer}.edit-group .help{font-size:10px;line-height:1.6;color:#8fa591;margin:0}.color-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.color-row label{display:flex;align-items:center;justify-content:space-between;gap:10px}.color-row input{width:42px;height:38px;border:0;background:transparent}.toggles{display:grid;gap:11px}.toggle{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#dbe4d9;gap:10px}.toggle input{accent-color:#e4c27b;width:18px;height:18px}.wide-alt{width:100%;text-align:left;margin-top:6px}.builder-stage{display:flex;flex-direction:column;min-width:0;min-height:0}.preview-controls{height:62px;min-height:62px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:12px}.preview-controls>div:first-child{display:flex;align-items:center;gap:8px;font-size:12px}.preview-controls strong{font-size:12px}.preview-controls small{font-size:10px;color:var(--muted);margin-left:6px}.viewport-picks{display:flex;gap:4px;padding:3px;background:#1c2920;border:1px solid var(--border);border-radius:7px}.viewport-picks button{border:0;background:transparent;color:#bccfbc;padding:9px 13px;font-size:11px;border-radius:5px}.viewport-picks button.active{background:#3d5241;color:#fff}.preview-locale{font-size:10px;letter-spacing:.1em;color:var(--gold);font-weight:700}.preview-area{flex:1;overflow:auto;display:flex;justify-content:center;align-items:flex-start;padding:32px 24px;background:radial-gradient(circle at center,#2e4336,#101c16 72%)}.preview-shell{width:100%;max-width:1200px;min-height:560px;background:white;border-radius:12px;overflow:hidden;box-shadow:0 40px 90px #000a;transition:width .2s}.preview-shell.tablet{width:768px;max-width:100%}.preview-shell.mobile{width:390px;max-width:100%}.browser-title{height:32px;background:#ecede9;display:flex;align-items:center;gap:5px;padding:0 12px}.browser-title>span{width:7px;height:7px;background:#c4c9c3;border-radius:50%}.browser-title small{margin:auto;color:#718270;font-size:10px}.preview-shell iframe{width:100%;height:calc(100vh - 267px);min-height:525px;border:0;display:block;background:white}.builder-bottom{min-height:44px;padding:9px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#b1c3b1;font-size:11px;border-top:1px solid var(--border)}.green-dot{color:#80c583}.guide-dialog{padding:0;background:#15231b;color:#fff;border:1px solid #6c856c;border-radius:14px;max-width:560px;width:calc(100% - 30px);box-shadow:0 30px 120px #000c}.guide-dialog::backdrop{background:#04120edc;backdrop-filter:blur(5px)}.guide-top{padding:24px 27px;display:flex;justify-content:space-between;align-items:center;color:var(--gold);font-weight:800;font-size:11px;letter-spacing:.14em}.guide-top button{color:#fff;border:0;background:none;font-size:20px}.guide-progress{height:4px;background:#2b3e30}.guide-progress:before{content:'';display:block;width:var(--progress,20%);height:4px;background:var(--gold);transition:width .2s}.guide-content{padding:30px}.guide-content>span{font-size:46px;color:var(--gold);font-weight:800}.guide-content h2{font-size:34px;letter-spacing:-.05em;margin:8px 0 15px}.guide-content p{line-height:1.8;color:#bdd0bf;font-size:14px}.guide-tip{border-left:2px solid var(--gold);background:#22352a;padding:17px;font-size:12px;line-height:1.7;color:#e5efe3;margin-top:22px}.guide-actions{display:flex;justify-content:space-between;margin-top:28px}.guide-actions>button:first-child{background:none;border:1px solid var(--border);color:#f0f3e9;padding:12px 18px;border-radius:7px}.toast{position:fixed;bottom:20px;right:20px;background:#e3c57f;color:#122016;padding:12px 18px;border-radius:9px;box-shadow:0 14px 45px #0009;max-width:380px;display:none;z-index:100;font-size:12px;font-weight:700}.toast.visible{display:block}@media(max-width:960px){.builder-app{grid-template-columns:300px 1fr}.editor-sidebar .edit-group{padding:17px}.preview-locale,.preview-controls small{display:none}.builder-head-center{display:none}}@media(max-width:690px){.builder-head{padding:0 12px;gap:6px;height:65px}.builder-brand{font-size:13px}.builder-brand b{display:none}.builder-head-actions{gap:4px}.builder-head-actions button{font-size:10px;padding:8px}.builder-head-actions button#json-export{display:none}.builder-app{display:flex;flex-direction:column;height:auto;min-height:0}.editor-sidebar{border-right:0;border-bottom:1px solid var(--border);height:auto}.sidebar-title{padding:16px}.sidebar-scroll{display:grid;grid-template-columns:1fr;overflow:visible}.edit-group{padding:16px}.builder-stage{min-height:650px}.preview-controls{padding:0 10px}.viewport-picks button{padding:8px;font-size:10px}.preview-area{padding:15px 6px;min-height:625px}.preview-shell iframe{height:610px}.builder-bottom{flex-wrap:wrap;font-size:10px}.guide-dialog{max-height:90vh;overflow:auto}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

#pages fieldset{border:1px solid #58685e;padding:.7rem;margin:.5rem 0;border-radius:7px}
#pages button,#add-page,#undo,#redo{padding:.4rem .55rem;margin:.2rem;border:1px solid #58685e;border-radius:5px;background:transparent;color:inherit}
:focus-visible{outline:2px solid #e9c782;outline-offset:3px}
#template-gallery{display:grid;grid-template-columns:1fr 1fr;gap:.35rem;margin-block:.75rem}
#template-gallery a{display:block;border:1px solid currentColor;border-radius:.4rem;padding:.4rem;color:inherit;font-size:.8rem}
#catalogue fieldset{margin:.65rem 0;padding:.6rem;min-width:0;border:1px solid #66757a;border-radius:.5rem}#catalogue button{margin:.25rem .25rem 0 0}#catalogue legend{font-weight:700}

html,body{font-family:var(--brand-body,system-ui),sans-serif}
.builder-head{background:#e9eee4;color:#26332a;border-color:#a4b2a3}
.builder-brand b,.builder-head-center{color:#354f3c}
.builder-brand>span{color:#49614e}
.builder-head .primary{background:#e4ed93!important}
.editor-sidebar{background:#1a2721}
.sidebar-title{padding:14px 20px}
.sidebar-title strong{font-family:var(--brand-display,Georgia),serif;font-weight:400;font-size:2rem;margin:0}
.workspace-links{display:flex;flex-wrap:wrap;gap:.15rem .5rem;padding:.5rem .8rem;border-block-end:1px solid var(--border);background:#28392e}
.workspace-links a{font-size:.87rem;display:inline-flex;align-items:center;padding:.15rem .33rem;min-height:2.5rem;text-decoration:underline;text-underline-offset:.25em}
.workspace-links a:focus-visible{outline:2px solid var(--gold)}
.edit-group h2{font-size:.95rem;letter-spacing:.02em}
.edit-group label{font-size:.82rem}
.edit-group :is(input,textarea,select){font-size:.88rem}
.preview-area{background:#d8e0d5;background-image:radial-gradient(#8e9b8a 1px,transparent 1px);background-size:20px 20px}
.preview-controls{color:#213229;background:#e9eee4}
.preview-controls small{color:#4a5c50}
.preview-page-label{display:flex;align-items:center;gap:.35rem;font-size:.82rem}
.preview-page-label select{max-width:13rem;padding:.35rem;color:#20332a;background:#f3f6ed;border:1px solid #8f9a8c;border-radius:.2rem}
#template-gallery a{display:grid;gap:.22rem;padding:.3rem}
#template-gallery img{width:100%;height:auto;aspect-ratio:1.6;object-fit:cover}
.mobile-workspace{display:none}
@media(max-width:690px){
 .builder-head{height:auto;padding:.55rem .6rem;gap:.4rem}
 .builder-head-actions{gap:.3rem;flex-wrap:wrap}
 .builder-head-actions button{padding:.45rem;min-height:2.75rem}
 .mobile-workspace{display:flex;padding:.4rem;background:#e9eee4;gap:.4rem}
 .mobile-workspace button{flex:1;color:#26332a;background:#f3f6ed;min-height:2.75rem;border:1px solid #758779}
 .mobile-workspace button[aria-pressed=true]{color:#1c2d1d;background:#e4ed93}
 .builder-app[data-workspace-view=preview] .editor-sidebar,.builder-app[data-workspace-view=edit] .builder-stage{display:none}
 .builder-app{display:block;min-height:0;height:auto}
 .preview-controls{flex-wrap:wrap;padding:.55rem;gap:.55rem}
 .preview-page-label select{width:100%;max-width:11rem}
 .sidebar-scroll{overflow:visible}
 .builder-stage .preview-area{min-height:0}
}
@media(max-width:960px){.preview-controls{flex-wrap:wrap;gap:.45rem}.preview-page-label{min-width:0}.preview-page-label select{width:min(11rem,54vw)}}
#workspace-project>button{color:#e8eee3;background:#273830;border:1px solid #597263;border-radius:.3rem;min-height:2.4rem;padding:.3rem .55rem}
#workspace-project>button:disabled{opacity:.55}
#room-fields .room-actions{display:flex;flex-wrap:wrap;gap:.25rem}
#room-fields fieldset legend{font-weight:700}
#room-fields details img{width:100%;max-height:11rem;object-fit:cover;display:block;margin-block:.65rem}
#room-fields button,#room-fields summary{min-height:2.75rem}
.preview-controls{flex-wrap:wrap;gap:.5rem}
.preview-controls #edit-current-page{padding:.4rem .7rem;min-height:2.75rem}
#media-library summary{font-weight:700;padding:.55rem 0}
#media-library-fields{display:grid;gap:.52rem}
#media-library-fields img{width:100%;height:10rem;object-fit:cover;border-radius:.25rem}
#media-library-fields button{min-height:2.65rem}
