/* Rookberry brand layer. Drawing symbols deliberately retain their technical colors. */
:root {
 --bg:#f4f5f6;--surface:#fff;--raised:#f8f9fa;--canvas:#e9ecf0;
 --ink:#202328;--muted:#636971;--border:#dce0e5;--hover:#edf0f3;
 --accent:#bd2633;--accent-hover:#a91e2b;--accent-text:#b92431;--accent-soft:#fff0f1;
 --signal:#ff3036;--focus:#be2937;--shadow:0 12px 30px #18202b0b;
 --warning-bg:#fff4d9;--warning-ink:#805b06;--success:#287258;
 font-family:"Segoe UI Variable","Segoe UI",Arial,sans-serif;
 color:var(--ink);background:var(--bg);font-size:14px;
}
:root[data-theme="dark"] {
 --bg:#17191c;--surface:#1e2024;--raised:#26292e;--canvas:#282c32;
 --ink:#f4f4f2;--muted:#b0b5bf;--border:#3a3e46;--hover:#2d3037;
 --accent:#bd2633;--accent-hover:#a91e2b;--accent-text:#ff8188;--accent-soft:#39252b;
 --focus:#ff8188;--shadow:0 12px 30px #00000024;
 --warning-bg:#3b3220;--warning-ink:#f3cf7e;--success:#84cbae;
}
body{background:var(--bg);color:var(--ink)}
button{background:var(--surface);color:var(--ink);border-color:var(--border);border-radius:7px;font-weight:500}
button:hover{background:var(--hover)}
button.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:650}
button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
button.quiet:hover{background:var(--hover)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,svg:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
input,select,textarea{color:var(--ink);background:var(--surface);border-color:var(--border)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
input[type=checkbox]{accent-color:var(--accent)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.app-header{height:76px;padding:0 30px;gap:24px;background:var(--surface);border-color:var(--border)}
.brand{gap:9px;color:var(--ink)}
.brand-symbol{background:var(--accent);width:37px;height:40px;border-radius:10px 10px 10px 3px;color:#fff}
.brand-symbol svg{width:37px;height:37px}
.brand strong{font-size:27px;font-weight:800;letter-spacing:-1px}
.brand-period{color:var(--signal)}
.prototype-label{background:transparent;color:var(--muted);border-left:1px solid var(--border);border-radius:0;padding:5px 0 5px 22px;font-size:12px}
.header-actions{align-items:center;gap:8px}
.header-actions button{min-height:38px}
.theme-toggle{display:flex;align-items:center;gap:8px;margin-right:10px;font-size:12px}
.theme-moon{width:17px;height:17px}
.theme-switch{display:block;width:28px;height:16px;border-radius:12px;background:#9199a5;padding:3px}
.theme-switch::after{content:"";display:block;background:white;width:10px;height:10px;border-radius:50%;transition:transform .14s}
.theme-toggle[aria-checked=true] .theme-switch{background:var(--accent)}
.theme-toggle[aria-checked=true] .theme-switch::after{transform:translateX(12px)}

/* Home: the plan is the focal point; the library remains compact and useful. */
.home-dashboard{max-width:1420px;padding:38px 48px 28px}
.home-heading{margin-bottom:27px;align-items:center}
.home-heading h1{font-size:36px;font-weight:750;letter-spacing:-1.25px;margin:0 0 7px;line-height:1.15}
.home-heading p{font-size:14px;color:var(--muted);margin:0}
.home-heading>button{min-height:44px;padding:10px 17px;border-radius:7px}
.home-heading>button span{font-size:21px;vertical-align:-1px;margin-right:4px;font-weight:400}
.home-launch{display:grid;grid-template-columns:minmax(0,1fr) 244px;gap:20px;margin-bottom:37px}
.home-continue{display:grid;grid-template-columns:minmax(210px,.9fr) minmax(260px,1.2fr);gap:0;min-height:280px;margin:0;padding:0;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow)}
.resume-copy{padding:29px 26px;min-width:0}
.resume-label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}
.resume-dot{width:6px;height:6px;background:var(--signal);border-radius:50%}
.home-continue h2{font-size:24px;letter-spacing:-.65px;font-weight:700;line-height:1.2;margin:14px 0 9px}
.home-continue p{font-size:12px;color:var(--muted);line-height:1.65;margin:0 0 19px}
.resume-metrics{display:flex;gap:23px;margin:0 0 25px}
.resume-metrics>div{display:flex;flex-direction:column-reverse;gap:4px}
.resume-metrics dt{font-size:11px;color:var(--muted)}
.resume-metrics dd{margin:0;font-size:23px;font-weight:650;letter-spacing:-.6px}
.home-continue button{margin:0;min-height:41px;display:inline-flex;align-items:center;gap:15px;font-size:13px}
.home-continue button svg{width:17px;height:17px}
.home-current-thumb{align-self:stretch;position:relative;height:auto;min-height:260px;border:0;border-left:1px solid var(--border);border-radius:0;background:#f8f9fb;display:grid;place-items:center;overflow:hidden;color:#626975}
.home-current-thumb img{width:100%;height:100%;position:absolute;inset:0;object-fit:contain;padding:17px 13px 35px}
.preview-caption{position:absolute;bottom:12px;right:14px;font-size:11px;color:#616b7c;background:#fff;border:1px solid #dde2e9;border-radius:4px;padding:3px 8px}
.home-plan-art{display:flex;align-items:center;background:#f8f9fb;padding:25px;border-left:1px solid var(--border)}
.home-start{padding:23px 24px;border-radius:12px;border:1px dashed var(--border);display:flex;flex-direction:column;align-items:flex-start}
.upload-art{width:39px;height:39px;color:var(--accent-text);margin-bottom:8px}
.home-start h2{font-size:19px;font-weight:650;letter-spacing:-.35px;margin:5px 0 10px}
.home-start p{font-size:12px;line-height:1.7;color:var(--muted);margin:0 0 18px}
.home-start button{margin-top:auto;width:100%;min-height:38px;font-size:13px}
.home-start small{font-size:10px;color:var(--muted);align-self:center;margin-top:9px}
.home-section-head{align-items:center;margin-bottom:18px}
.home-section-head h2{font-size:21px;font-weight:650;letter-spacing:-.4px;display:flex;align-items:center;gap:10px}
.library-count{border:1px solid var(--border);font-size:11px;line-height:20px;padding:0 6px;border-radius:5px;min-width:24px;text-align:center;font-weight:500;color:var(--muted);letter-spacing:0}
.home-section-head p{font-size:12px;color:var(--muted);margin:5px 0 0}
.home-search{position:relative;display:block;flex:0 1 290px;color:var(--muted)}
.home-search svg{position:absolute;left:12px;top:12px;width:17px;height:17px;pointer-events:none}
.home-search input{width:100%;min-width:0;padding:11px 12px 11px 37px;font-size:12px;background:var(--surface);color:var(--ink);border-color:var(--border);border-radius:7px}
.home-project-grid{display:flex;flex-direction:column;gap:0;background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden}
.home-project-card{display:grid;grid-template-columns:76px minmax(0,1fr) 84px 123px 65px;align-items:center;gap:20px;min-height:96px;padding:15px 22px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:var(--surface);box-shadow:none}
.home-project-card:last-child{border-bottom:0}
.home-project-card:hover{background:var(--hover);border-color:var(--border)}
.home-project-card:focus-visible{outline-offset:-4px}
.home-thumbnail{height:56px;width:76px;border:1px solid #dde2e9;border-radius:4px;background:#f8f9fb;color:#778190;overflow:hidden}
.home-thumbnail img{padding:3px;object-fit:contain;max-height:56px}
.home-thumbnail svg{width:27px;height:33px}
.home-card-text{padding:0;display:flex;flex-direction:column;gap:7px;min-width:0}
.home-card-text strong{font-size:14px;font-weight:650;overflow-wrap:anywhere}
.home-card-text>span{color:var(--muted);font-size:12px;font-weight:400;overflow-wrap:anywhere;line-height:1.5}
.home-card-quantity{font-size:16px;font-weight:600;display:flex;flex-direction:column;gap:5px}
.home-card-quantity small{font-size:11px;font-weight:400;color:var(--muted)}
.home-card-saved{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.home-source{position:static;display:inline-block;padding:3px 7px;border-radius:4px;background:var(--raised);color:var(--muted);border:1px solid var(--border);font-size:10px;font-weight:500}
.home-card-saved time{font-size:11px;color:var(--muted);font-weight:400}
.home-card-open{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0;font-size:12px;font-weight:600;color:var(--accent-text)}
.home-card-open svg{width:16px;height:16px}
.home-empty{border:0;background:var(--surface);padding:35px 20px;color:var(--muted);font-size:13px}
.home-empty h3{color:var(--ink)}
.home-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:18px;margin-top:8px;border:0}
.home-utilities{display:flex;align-items:center;gap:8px}
.home-utilities>span{width:1px;height:13px;background:var(--border)}
.home-bottom button{margin:0;font-size:12px;color:var(--muted);padding:7px 0;min-height:36px}
.home-bottom p{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin:0}
.local-indicator{width:5px;height:5px;border-radius:50%;background:var(--success);margin-right:2px}

/* Editor and dialogs share the theme without recoloring engineering symbols. */
.workspace{height:calc(100dvh - 76px)}
.project-panel,.properties-panel,.drawing-header,.status-bar{background:var(--surface);border-color:var(--border)}
.project-heading h1{font-weight:700;letter-spacing:-.3px}
.drawing-header{background:var(--raised)}
.drawing-header h2{font-weight:650}
.text-button,.upload-button span,.status-bar button,.readout.total b{color:var(--accent-text)}
.text-button:hover{background:transparent;text-decoration:underline}
.upload-button{background:var(--raised)}
.floor-button.active{background:var(--accent-soft);color:var(--accent-text);box-shadow:inset 3px 0 var(--accent)}
.floor-count{border-color:var(--border)}
.sample-tag{background:var(--raised);color:var(--muted)}
.canvas-shell{background:var(--canvas)}
#grid circle{fill:var(--border)}
.toolbar{background:var(--surface);border-color:var(--border);box-shadow:var(--shadow);border-radius:10px}
.tool{color:var(--muted);background:transparent}
.tool.active,.tool.active:hover{background:var(--accent-soft);color:var(--accent-text)}
.tool:hover{background:var(--hover)}
.tool-help,.edit-strip,.zoom-controls{background:var(--surface);border-color:var(--border);color:var(--muted);box-shadow:var(--shadow)}
.edit-strip select{border:1px solid var(--border);border-radius:4px}
.scale-state,.field,.status-bar{color:var(--muted)}
.field input,.field select,.field textarea{background:var(--raised);border-color:var(--border);color:var(--ink)}
.field input:focus,.field select:focus,.field textarea:focus{background:var(--surface)}
.note-box{background:var(--raised);color:var(--muted)}
.note-box.warning-box{background:var(--warning-bg);color:var(--warning-ink)}
.danger,.recovery-controls .save-error{color:var(--accent-text)}
.recovery-controls{color:var(--success)}
.recovery-list small,.furniture-library small,.properties-panel .selection-list{color:var(--muted)}
.furniture-library button{background:var(--raised)}
.furniture-library button:hover{background:var(--hover);border-color:var(--accent-text)}
.furniture-library svg{background:#f6f7f9;border-radius:6px;padding:5px;color:#526275}
.route-chip{background:#edf2ff;color:#255bdd}
dialog{background:var(--surface);color:var(--ink);border-color:var(--border);box-shadow:0 24px 90px #0005;border-radius:12px}
dialog::backdrop{background:#050a1280}
dialog.sheet-modal{background:var(--canvas)}
.modal-head,.modal-foot{background:var(--surface);border-color:var(--border)}
.modal-body p{color:var(--muted)}
.modal-head h2{letter-spacing:-.45px;font-weight:650}
.page-card{background:var(--raised);border-color:var(--border)}
.page-card:has(input:checked){border-color:var(--accent)}
th{background:var(--raised);color:var(--muted)}
.toast{background:var(--ink);color:var(--surface);box-shadow:0 8px 25px #0003}
.sheet-paper{--ink:#243249;--muted:#66758c;--border:#dfe5ee;--red:#d7454f;color:#243249;background:#fff;color-scheme:light}
.sheet-paper th{background:#f4f7fb;color:#607089}
.sheet-paper td{color:#243249;border-color:#dfe5ee}
.sheet-paper .schedule-total{color:#66758c}

@media(min-width:1500px){.home-launch{grid-template-columns:minmax(0,1fr) 280px}.home-continue{min-height:315px}.resume-copy{padding:34px}.home-start{padding:28px}}
@media(max-width:1150px){.app-header{padding:0 22px;gap:18px}.prototype-label{display:none}.home-dashboard{padding:32px}.home-launch{grid-template-columns:minmax(0,1fr) 220px;gap:16px}.home-continue{grid-template-columns:minmax(205px,1fr) minmax(180px,1fr)}.resume-copy{padding:24px 22px}.home-start{padding:20px}.home-current-thumb img{padding:15px 6px 35px}.theme-toggle{margin-right:0}.home-card-saved{min-width:0}}
@media(max-width:940px){.app-header{gap:10px;padding:0 18px}.brand strong{font-size:24px}.header-actions{gap:3px}.theme-toggle>span:not(.theme-switch){display:none}.home-dashboard{padding:30px 24px}.home-launch{grid-template-columns:minmax(0,1fr) 205px}.home-continue{grid-template-columns:1fr}.home-current-thumb,.home-plan-art{min-height:175px;border-left:0;border-top:1px solid var(--border);grid-row:1}.resume-copy{padding:24px}.resume-metrics{gap:30px}.home-start{justify-content:center}.home-start button{margin-top:8px}.home-project-card{grid-template-columns:65px minmax(0,1fr) 65px 105px 50px;gap:15px;padding:15px}.home-thumbnail{width:65px;height:52px}.home-bottom{align-items:flex-start}.home-bottom p{max-width:290px;flex-wrap:wrap}.workspace{height:auto;min-height:calc(100dvh - 76px)}}
@media(max-width:700px){.home-launch{grid-template-columns:1fr}.home-continue{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.home-current-thumb,.home-plan-art{grid-row:auto;min-height:240px;border-top:0;border-left:1px solid var(--border)}.home-start{display:grid;grid-template-columns:40px minmax(0,1fr) auto;column-gap:12px;align-items:center;padding:17px 20px}.upload-art{grid-row:1/3;margin:0}.home-start h2{font-size:16px;margin:0}.home-start p{display:none}.home-start small{grid-column:2;grid-row:2;margin:5px 0 0;align-self:start;justify-self:start}.home-start button{grid-column:3;grid-row:1/3;width:auto;margin:0}.home-card-quantity{display:none}.home-project-card{grid-template-columns:58px minmax(0,1fr) 103px 40px;gap:12px}.home-thumbnail{width:58px}.home-card-open{font-size:0}.home-card-open svg{width:19px}.home-bottom{flex-direction:column;gap:8px}.home-bottom p{max-width:none}}
@media(max-width:600px){.app-header{height:auto;min-height:105px;padding:12px 14px;gap:10px}.home-view .app-header{min-height:72px;flex-wrap:nowrap}.brand-symbol{width:31px;height:34px}.brand-symbol svg{width:31px;height:31px}.brand strong{font-size:24px}.header-actions{gap:2px}.header-actions button{padding:7px 9px;font-size:12px}.theme-toggle{gap:6px}.theme-moon{display:none}.home-view .theme-toggle{padding:7px}.home-view .header-actions #load-project{font-size:11px;padding:7px}.home-heading{flex-direction:row;gap:15px;margin-bottom:23px}.home-heading h1{font-size:29px;letter-spacing:-1px}.home-heading p{font-size:12px;max-width:200px;line-height:1.5}.home-heading>button{font-size:12px;min-height:40px;padding:7px 11px;align-self:center}.home-heading>button span{display:none}.home-dashboard{padding:25px 16px}.home-continue{grid-template-columns:1fr}.resume-copy{padding:24px}.home-current-thumb,.home-plan-art{display:grid;grid-row:1;min-height:180px;border:0;border-bottom:1px solid var(--border)}.home-current-thumb img{padding:12px 10px 28px}.home-continue h2{font-size:24px;max-width:none}.resume-metrics{margin-bottom:20px}.home-launch{margin-bottom:28px}.home-section-head{gap:16px;flex-direction:column;align-items:stretch}.home-section-head h2{font-size:20px}.home-search{flex:auto}.home-project-card{grid-template-columns:49px minmax(0,1fr) 70px;gap:12px;padding:14px 12px}.home-thumbnail{width:49px;height:48px}.home-card-text strong{font-size:13px}.home-card-text>span{font-size:11px}.home-card-saved{gap:6px;align-items:flex-end}.home-source{font-size:9px;padding:2px 4px;white-space:nowrap}.home-card-saved time{font-size:9px;text-align:right}.home-card-open{display:none}.home-start{padding:17px 14px}.home-start h2{font-size:15px}.home-start button{font-size:12px;padding:7px 10px}.home-bottom{margin:5px 0 0;padding:13px 2px 0}.home-bottom p{font-size:10px;gap:4px}.workspace{height:auto}.drawing-header{padding:0 12px}.header-actions{justify-content:space-between}.properties-panel{max-height:none}.modal-head{gap:10px}.modal-head h2{font-size:18px}.sheet-tools{gap:5px}}
@media(max-width:600px){.theme-moon{display:block;width:15px;height:15px}}
@media(max-width:360px){.home-view .brand strong{font-size:21px}.home-view .brand{gap:6px}.home-view .header-actions #load-project{padding:7px 5px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
@media print{dialog.sheet-modal{background:#fff!important}.sheet-paper{color:#243249!important;background:#fff!important}body{background:#fff!important}}
