:root{color-scheme:light;--bg:#f4f6f2;--paper:#fff;--ink:#20352c;--muted:#63756c;--line:#dce5df;--green:#287458;--light:#e4f2e9;--danger:#a34343;--shadow:0 6px 24px #24372c09}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}header{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:16px max(20px,calc((100vw - 1060px)/2));background:var(--paper);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none;font-size:21px;letter-spacing:-.7px}.brand b{color:var(--green)}.brandmark{background:var(--green);color:white;display:grid;place-items:center;width:42px;height:42px;border-radius:14px;font-size:27px}.brand small{font-size:9px;letter-spacing:1.6px;font-weight:700;color:var(--muted);display:block}nav{display:flex;gap:14px;align-items:center;flex-wrap:wrap;font-size:14px}nav a,.back{color:var(--green);font-weight:650;text-decoration:none}nav form{margin:0}main{max-width:1100px;margin:0 auto;padding:32px 20px 48px;min-height:75vh}h1{font-size:clamp(29px,5vw,46px);line-height:1.13;letter-spacing:-1.6px;margin:8px 0 12px}h2{font-size:21px;line-height:1.3;margin:10px 0 14px}p{color:var(--muted);margin:8px 0 20px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;color:var(--green)}.panel{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:20px;margin:14px 0;box-shadow:var(--shadow)}.login{max-width:460px;margin:24px auto}.categorygrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.categorygrid .panel{margin:0}.categoryicon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:var(--light);color:var(--green);font-size:27px}.category:nth-child(2) .categoryicon{background:#e8eef9;color:#45649d}.category:nth-child(3) .categoryicon{background:#fff1df;color:#996325}.category:nth-child(4) .categoryicon{background:#f0eafa;color:#775995}button,.button{font:inherit;font-weight:650;cursor:pointer;border:1px solid var(--line);border-radius:10px;padding:11px 15px;background:var(--paper);color:var(--ink);text-decoration:none;display:inline-block;text-align:center;min-height:44px}button:hover,.button:hover{border-color:var(--green)}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #6ea991;outline-offset:3px}button:disabled{opacity:.42;cursor:not-allowed}.primary{background:var(--green);color:#fff;border-color:var(--green)}.quiet{background:transparent;color:var(--green)}.danger{color:var(--danger);border-color:#ecd2d2;background:#fff9f9}.program{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;margin:6px 0;background:#f8faf8}.program span{color:var(--green)}.category .button{display:block;margin:7px 0}.active{border:2px solid #92bca5}.active .button{margin-top:12px}.progress{height:10px;background:#e6ebe7;border-radius:999px;overflow:hidden;margin:12px 0 5px}.progress span{display:block;height:100%;background:#459c72;border-radius:999px;transition:width .25s}small{display:block;color:var(--muted);font-size:12px}.floor{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;border:4px solid #536a5d;border-radius:12px;background:#536a5d;overflow:hidden}.room{grid-column:span 2;display:flex;flex-direction:column;justify-content:center;min-height:150px;padding:16px;background:white;color:var(--ink);text-decoration:none;border:2px solid transparent;min-width:0}.room:nth-child(5n+1),.room:nth-child(5n+2){grid-column:span 3}.room:hover{border-color:#459c72}.room.complete{background:#d9f0e0}.room.empty{background:#ecefed;color:#6b756e}.roomicon{font-size:27px;color:var(--green)}.room small{font-size:11px}.tasks{display:grid;gap:9px;margin:18px 0}.task button{display:flex;align-items:center;text-align:left;width:100%;gap:13px;padding:14px;background:white}.task .check{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border:1px solid var(--line);border-radius:50%;font-size:20px}.task.optional button{background:#e9ecea;color:#78837c}.task.optional:not(.done) b{text-decoration:none}.task.done button{background:#e0f3e5;border-color:#95c7a6}.task.done .check{background:var(--green);color:white}.actions,.inline{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.inline input{flex:1;min-width:140px}.notice{padding:13px 16px;margin-bottom:16px;border:1px solid #b7d6c3;background:var(--light);border-radius:10px;font-weight:600}label{display:block;font-weight:600;margin:12px 0}input:not([type=checkbox]){width:100%;font:inherit;padding:12px;border:1px solid #cbd9ce;border-radius:9px;background:#fff;color:var(--ink);display:block;margin-top:5px}input[type=checkbox]{accent-color:var(--green);width:18px;height:18px;flex-shrink:0}form .primary{margin-top:10px}.login button{width:100%}.checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.checks label{margin:0;font-size:14px;display:flex;align-items:center;gap:6px;font-weight:450}summary{cursor:pointer;font-weight:700;font-size:17px}.sub{padding:12px;border:1px solid var(--line);border-radius:10px;margin:10px 0}.sub summary{font-size:15px}.sub form{margin-top:10px}hr{border:0;border-top:1px solid var(--line);margin:18px 0}.historyitem{padding:10px 0;border-top:1px solid var(--line)}footer{text-align:center;color:var(--muted);font-size:12px;padding:18px}.back{display:inline-block;margin:12px 0}.muted{color:var(--muted)}@media(max-width:600px){main{padding:24px 14px 34px}header{padding:14px}nav{gap:12px}.categorygrid{grid-template-columns:1fr;gap:12px}.panel{padding:16px}.floor{grid-template-columns:repeat(2,minmax(0,1fr))}.room,.room:nth-child(5n+1),.room:nth-child(5n+2){grid-column:span 1;padding:12px;min-height:130px}.room:last-child:nth-child(odd){grid-column:span 2}.checks{grid-template-columns:1fr}.actions form{flex:1}.actions button{width:100%}}

/* 1.0.1: original six-room plan, including on mobile. */
.floor.plan{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:4fr 3fr 3fr;aspect-ratio:1.18;min-height:320px;gap:3px;border-width:3px;max-width:760px;margin:0 auto;}
.floor.plan .room{min-height:0;min-width:0;padding:clamp(5px,1.7vw,18px);align-items:center;text-align:center;gap:4px;overflow-wrap:anywhere;}
.floor.plan .room b{font-size:clamp(12px,2.1vw,20px);line-height:1.2;}
.floor.plan .roomicon{font-size:clamp(19px,3vw,34px);line-height:1.2;}
.floor.plan .room .progress{width:100%;max-width:170px;height:7px;margin:5px 0 0;}
.floor.plan .room small{font-size:clamp(10px,1.4vw,12px);line-height:1.25;}
.floor.plan .slot-bath{grid-area:1 / 1 / 2 / 3;}
.floor.plan .slot-hall{grid-area:1 / 3 / 2 / 5;}
.floor.plan .slot-kitchen{grid-area:1 / 5 / 2 / 7;}
.floor.plan .slot-living{grid-area:2 / 1 / 4 / 4;}
.floor.plan .slot-office{grid-area:2 / 4 / 3 / 7;}
.floor.plan .slot-bed{grid-area:3 / 4 / 4 / 7;}
.extra-rooms{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;}
.extra-rooms .room{grid-column:auto;border:1px solid var(--line);border-radius:12px;}
@media(max-width:600px){.floor.plan{min-height:310px;}.floor.plan .room{padding:5px;}}

/* 1.0.2: compact sound toggle */
.sound-toggle{display:inline-grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;font-size:23px;line-height:1}

/* 1.0.4: separate task groups. */
.task-group{margin-top:24px}.task-group h3{font-size:17px;margin:0 0 8px}.task-group .tasks{margin:8px 0 18px}.task-group+.task-group{border-top:1px solid var(--line);padding-top:18px}.task.optional.done button{color:var(--ink)}
/* 2.0: family accounts and editable floor plans */
.contextline{font-size:13px;font-weight:650;color:var(--green);margin-bottom:16px}.custom-plan,.design-grid,.template-preview{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:repeat(12,minmax(0,1fr));aspect-ratio:1.18;max-width:760px;margin:12px auto;gap:2px;border:3px solid #536a5d;border-radius:10px;overflow:hidden;background:#dce5df;min-height:320px}.custom-plan .room{min-height:0;min-width:0;padding:4px;align-items:center;text-align:center;overflow:hidden;overflow-wrap:anywhere;gap:2px}.custom-plan .room b{font-size:clamp(10px,2.1vw,18px);line-height:1.1}.custom-plan .roomicon{font-size:clamp(15px,3vw,30px);line-height:1}.custom-plan .room .progress{width:90%;height:5px;margin:2px 0}.custom-plan .room small{font-size:clamp(9px,1.3vw,11px);line-height:1.1}.custom-plan .room.complete{background:#bce6c7}.design-grid{touch-action:none;background-color:#f5f8f6;background-image:linear-gradient(to right,#cfdbd3 1px,transparent 1px),linear-gradient(to bottom,#cfdbd3 1px,transparent 1px);background-size:calc(100% / 12) calc(100% / 12);gap:0}.design-room,.template-preview span{background:#e2efe7;border:1px solid #709783;border-radius:4px;min-width:0;min-height:0;padding:3px;font-size:clamp(10px,2vw,16px);overflow:hidden;overflow-wrap:anywhere;line-height:1.1;display:grid;place-items:center;touch-action:none}.design-room.selected{background:#b2d8be;outline:2px solid #245e42;z-index:2}.design-room.invalid{background:#ffd8d5;border-color:#a34343}.design-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}select,textarea{width:100%;font:inherit;padding:10px;border:1px solid #cbd9ce;border-radius:9px;background:#fff;color:var(--ink)}textarea{font-family:monospace;font-size:13px;resize:vertical}select{display:block;margin-top:5px}.template-preview{max-width:360px;min-height:0}.panel form+form{margin-top:10px}@media(max-width:600px){.design-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.custom-plan,.design-grid{min-height:300px}}

/* 2.1: stacked levels and arbitrary orthogonal grid shapes */
.level-layout{display:flex;align-items:flex-start;gap:12px;min-width:0}.level-content{flex:1;min-width:0}.level-stack{flex:0 0 106px;display:flex;flex-direction:column;gap:0;align-items:stretch;padding:13px 3px 6px 0}.level-tab{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:8px 4px 11px;min-height:62px;background:#fff;border:1px solid #aebfb4;border-bottom:5px solid #9aada1;border-radius:8px;box-shadow:0 3px 0 #536a5d18;overflow-wrap:anywhere;line-height:1.15;font-size:12px;margin-top:-3px;transform:skewY(-3deg)}.level-tab>*{transform:skewY(3deg)}.level-tab.selected{border-color:var(--green);outline:2px solid var(--green);z-index:2;transform:translateX(5px) skewY(-3deg)}.level-tab.complete{background:#bce6c7}.level-tab.empty{background:#ecefed;color:#6b756e}.level-icon{font-size:20px;line-height:1}.level-tab small{font-size:10px}.level-content h3{margin:0 0 4px}.level-progress{font-size:13px;margin:6px 0 12px}.shape-plan{width:100%;height:auto;max-width:760px;display:block;margin:10px auto;background:#f1f5f2;background-image:linear-gradient(to right,#dce5df 1px,transparent 1px),linear-gradient(to bottom,#dce5df 1px,transparent 1px);background-size:calc(100% / 12) calc(100% / 12);border:2px solid #536a5d;border-radius:9px}.shape-room .shape-fill{fill:#fff}.shape-room.complete .shape-fill{fill:#bce6c7}.shape-room.empty .shape-fill{fill:#e2e6e3}.shape-room .shape-edge{fill:none;stroke:#536a5d;stroke-width:1.5;pointer-events:none}.shape-room text{text-anchor:middle;fill:#20352c;font-weight:650;pointer-events:none}.shape-room.empty text{fill:#69756d}a.shape-room:hover .shape-fill,a.shape-room:focus-visible .shape-fill{fill:#d1e8da;stroke:#287458;stroke-width:.7}.preview-level{display:inline-block;width:min(100%,210px);vertical-align:top;margin:8px}.preview-level .shape-plan{margin:3px 0}.level-manage{border-top:1px solid var(--line);padding:8px 0}.level-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.level-actions form+form{margin-top:0}.level-actions button{font-size:13px;padding:7px}.design-grid{position:relative;aspect-ratio:1;min-height:0;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:repeat(12,minmax(0,1fr));border:2px solid #536a5d;margin:8px auto;gap:0}.paint-cell{min-width:0;min-height:0;padding:0;border:1px solid #d5e0d9;border-radius:0;background:#f5f8f6;grid-row:auto;grid-column:auto;touch-action:none}.paint-cell.occupied{background:#e2efe7;border-color:#cddfd3}.paint-cell.selected{background:#b2d8be;border-color:#98c1a6}.paint-cell.invalid{background:#ffd8d5}.paint-cell.edge-left{border-left:2px solid #709783}.paint-cell.edge-right{border-right:2px solid #709783}.paint-cell.edge-top{border-top:2px solid #709783}.paint-cell.edge-bottom{border-bottom:2px solid #709783}.paint-label{grid-area:1/1;pointer-events:none;z-index:2;display:grid;place-items:center;min-width:0;overflow:hidden;text-align:center;font-weight:650;line-height:1;overflow-wrap:anywhere;color:#20352c}.design-modes{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.design-modes button{flex:1;font-size:13px;padding:8px}.design-modes button[aria-pressed=true]{background:var(--green);color:white}.design-grid button:focus-visible{outline-offset:-2px;z-index:3}.design-grid .paint-cell{grid-column:auto;grid-row:auto}.level-content .extra-rooms{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
@media(max-width:600px){.level-layout{gap:7px}.level-stack{flex-basis:60px}.level-tab{font-size:10px;padding:5px 2px 8px;min-height:49px}.level-tab small{font-size:9px}.level-icon{font-size:16px}.design-modes button{font-size:12px;padding:6px}.design-grid{min-height:0}.paint-label{font-size:9px}.level-content h3{font-size:14px}}
/* 2.1.1: original app emblem and overlapping floor transitions */
.brandmark{display:block;width:48px;height:48px;object-fit:contain;background:#fff;border-radius:12px;border:1px solid var(--line);flex:none}
.sound-toggle{min-width:48px;min-height:44px;font-size:23px;line-height:1;touch-action:manipulation}
.level-content{position:relative;overflow:hidden;isolation:isolate}.level-stage{display:flow-root;position:relative;min-width:0}.level-stage.floor-outgoing{position:absolute;inset:0 auto auto 0;width:100%;pointer-events:none;z-index:2}.level-stage.floor-incoming{z-index:1}
@media(prefers-reduced-motion:reduce){.level-stage,.level-tab{animation:none!important;transition:none!important}}

/* 2.1.2: expandable audio selector */
.sound-picker{display:flex;align-items:center;gap:0;max-width:100%;width:max-content}.sound-options{display:grid;grid-template-columns:0fr;opacity:0;transform:translateX(-10px);transition:grid-template-columns .24s cubic-bezier(.22,.7,.25,1),opacity .18s ease,transform .24s ease;pointer-events:none}.sound-picker.open .sound-options{grid-template-columns:1fr;opacity:1;transform:translateX(0);pointer-events:auto}.sound-options-inner{display:flex;gap:6px;min-width:0;overflow:hidden;padding:5px 0}.sound-picker.open .sound-options-inner{padding-left:7px;padding-right:4px}.sound-options button{flex:none;width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;font-size:23px;line-height:1;touch-action:manipulation}.sound-options button[aria-pressed=true]{background:var(--light);border-color:var(--green)}.sound-options button:focus-visible{outline-offset:-3px}.sound-picker.open #sound{background:var(--light);border-color:var(--green)}
@media(prefers-reduced-motion:reduce){.sound-options{transition:none!important;transform:none!important}}

/* 3.0.0: compact mobile header, apartment picker and greeting. */
.home-context{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;position:relative;margin-bottom:12px}
.home-context-name{min-width:0;overflow-wrap:anywhere;display:block}
.home-switch{display:grid;place-items:center;min-width:44px;min-height:44px;padding:5px 8px;border:1px solid var(--line);border-radius:11px;background:var(--paper);color:var(--green);cursor:pointer;line-height:1;box-shadow:none}
.home-cycle,.home-dropdown{margin:0;flex:none}.home-dropdown{position:relative}.home-dropdown summary{list-style:none}.home-dropdown summary::-webkit-details-marker{display:none}
.home-options{position:absolute;z-index:20;right:0;top:calc(100% + 6px);width:max-content;max-width:min(80vw,320px);padding:7px;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 24px #20352c20}.home-options form{margin:0}.home-options button{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:2px 0}.home-options button[aria-current]{background:var(--light);color:var(--green)}
.home-greeting{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px;color:var(--green);font-size:clamp(11px,3.2vw,15px);font-weight:600;margin:0 0 20px}.home-greeting em{font-style:italic}.home-greeting span{font-weight:inherit}
@media(max-width:600px){header{position:relative;gap:10px;padding:12px 14px}header .brand{max-width:calc(100% - 86px);gap:8px;font-size:clamp(16px,5vw,21px);min-height:44px;line-height:1.2}header .brandmark{width:42px;height:42px}header .brand small{font-size:8px;letter-spacing:1px}header nav{width:100%;gap:8px 12px;justify-content:flex-start}header nav .logout-form{position:absolute;right:14px;top:12px;height:44px;display:flex;align-items:center}header nav .logout-form button{font-size:12px;min-height:36px;padding:6px 9px;margin:0}header:not(:has(nav)) .brand{max-width:100%}.home-greeting{gap:4px 8px}}
@media(prefers-reduced-motion:no-preference){.home-roll-in{animation:homeRollIn .25s ease-out both}@keyframes homeRollIn{from{transform:translateY(12px);opacity:0}to{transform:translateY(0);opacity:1}}}
@media(max-width:600px){header nav{font-size:13px;gap:8px 9px}}
