.cd-themed .room-stage{background:var(--cd-background-image),var(--cd-background)}
.cd-themed .room-stage{background:var(--cd-wall-image),var(--cd-background-image),var(--cd-wall)}
.cd-themed .room-stage::before{background:var(--cd-floor-image),var(--cd-floor)}
.cd-themed .seat-area{background:var(--cd-floor-image),var(--cd-floor);background-size:cover}
.cd-themed .desk-top{background:var(--cd-desk-image),linear-gradient(170deg,rgba(255,255,255,.15),transparent),var(--cd-desk);border-color:color-mix(in srgb,var(--cd-desk),#37210f 30%);box-shadow:0 7px 0 color-mix(in srgb,var(--cd-desk),#24170f 30%),0 11px 15px #0003}
.cd-themed .chair{background:var(--cd-chair-image),var(--cd-chair)}
.cd-themed .desk-number{background:var(--cd-accent);color:white}
.cd-themed .room-side{border-left-color:var(--cd-accent)}
.cd-themed[data-cd-theme="night"] .room-stage{color:#ecf1eb}
.cd-themed[data-cd-theme="forest"] .room-stage{background:var(--cd-window-image) right top/220px auto no-repeat,var(--cd-wall)}
#desk-grid.cd-layout{display:block;height:100%;transform:none;width:min(100%,1100px)}
#desk-grid.cd-layout .seat{position:absolute;width:100px;height:84px;min-height:0;transform:translate(-50%,-50%) scale(var(--seat-scale,.85));transform-origin:center;cursor:pointer}
#desk-grid.cd-layout .seat.disabled{cursor:pointer}
.cd-overlay{position:fixed;inset:0;z-index:100050;background:#17261bd0;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));backdrop-filter:blur(6px)}
.cd-dialog{width:min(750px,100%);max-height:calc(100dvh - 40px);background:#fafbf7;color:#29382e;border:1px solid #dce4d8;border-radius:22px;box-shadow:0 24px 85px #0004;display:flex;flex-direction:column;overflow:hidden;font-family:inherit}
.cd-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;background:#edf2e7;border-bottom:1px solid #dfe7d9;flex:none}.cd-dialog h2{font-size:21px;margin:4px 0 0}.cd-dialog header small{font-size:11px;color:#74826b;letter-spacing:2px}.cd-dialog button{font:inherit;cursor:pointer;background:#f2f5ed;border:1px solid #dbe3d4;color:#40583e;border-radius:9px;padding:9px 13px;min-height:40px}.cd-dialog>header button{font-size:26px;padding:2px 12px;background:transparent}.cd-body{overflow:auto;overscroll-behavior:contain;padding:22px 24px}.cd-body::-webkit-scrollbar{width:6px}.cd-body::-webkit-scrollbar-thumb{background:#aabb9d;border-radius:8px}.cd-dialog .cd-primary{background:#52734c;color:white;border-color:#52734c}.cd-error{margin:0;padding:0 24px 12px;min-height:24px;color:#a34832;font-size:13px;overflow-wrap:anywhere}.cd-error:empty{min-height:0;padding-bottom:0}.cd-body h3{margin:0 0 10px;font-size:19px}.cd-room-heading p{color:#78856f}.cd-facts{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.cd-facts div{background:#eff3e8;padding:14px;border-radius:11px}.cd-facts small{display:block;color:#76816d;margin-bottom:9px}.cd-facts b{font-size:15px;overflow-wrap:anywhere}.cd-goal-link{display:flex!important;align-items:center;justify-content:space-between;width:100%;padding:16px!important;gap:10px}.cd-hint{font-size:12px;color:#77836f;line-height:1.8}.cd-info-announcement,.cd-add-announcement{background:#f4efdf!important;border:1px solid #e7ddbe!important;border-radius:12px;padding:18px;margin:18px 0}.cd-info-announcement h3{font-size:15px}.cd-info-announcement p,.cd-announcement p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;margin:10px 0}.cd-info-announcement small,.cd-announcement small{color:#837961;font-size:11px}.cd-actions{display:flex;gap:10px;margin-top:24px;flex-wrap:wrap}.cd-tabs{display:flex;gap:5px;margin-bottom:24px;overflow:auto;padding-bottom:5px}.cd-tabs button{white-space:nowrap;flex-shrink:0;background:transparent;border-color:transparent;font-size:13px}.cd-tabs .active{color:#476b3e;background:#e4eddd;border-color:#cfdec3}.cd-body label{display:flex;flex-direction:column;gap:8px;margin:16px 0;color:#5b6c52;font-size:14px}.cd-body input:not([type="radio"]),.cd-body select,.cd-body textarea{font:inherit;padding:11px 12px;border:1px solid #d7dfcf;border-radius:9px;background:#fff;color:#30432d;width:100%;box-sizing:border-box}.cd-body textarea{resize:vertical;min-height:120px;max-height:300px}.cd-seat-preview{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;max-width:420px;margin:26px auto;padding:22px;background:#ebe1cf;border-radius:14px}.cd-seat-preview span{background:#b48d60;color:white;text-align:center;padding:5px 0;border-radius:4px;font-size:11px;box-shadow:0 4px #866744}.cd-seat-preview[data-layout="library"]{column-gap:20px}.cd-seat-preview[data-layout="discussion"]{grid-template-columns:repeat(4,1fr)}.cd-seat-preview[data-layout="around"]{border:24px solid #e2d2b6}.cd-theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.cd-theme-grid label{position:relative;display:block;padding:8px;border:2px solid #e2e8db;border-radius:12px;margin:0;cursor:pointer}.cd-theme-grid label:has(input:checked){border-color:#67875a;box-shadow:0 0 0 2px #dfead9}.cd-theme-option input{position:absolute;right:12px;bottom:12px;accent-color:#537347}.cd-theme-option b{display:block;padding:10px 4px 3px;font-size:13px}.cd-theme-preview{display:block;height:75px;background:linear-gradient(to bottom,var(--preview-bg) 55%,var(--preview-floor) 55%);border-radius:6px;position:relative}.cd-theme-preview:after{content:"";position:absolute;inset:48% 24% 26%;border-radius:3px;background:var(--preview-desk);box-shadow:0 4px #0002}.cd-editor-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;border-top:1px solid #e1e7d9;padding-top:18px;margin-top:24px}.cd-editor-footer span{font-size:11px;color:#87927e}.cd-display-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.cd-display-heading button{font-size:12px}.cd-edit-shelf,.cd-shelf{position:relative;height:270px;background:repeating-linear-gradient(to bottom,#eee6d5 0,#eee6d5 32%,#b5a080 33%,#b5a080 34%);border-radius:12px;margin-top:16px;overflow:hidden}.cd-slot,.cd-edit-item,.cd-exhibit{position:absolute;transform:translate(-50%,-50%);text-align:center;width:21%;}.cd-edit-shelf .cd-slot{width:38px;height:38px;min-height:38px;padding:0;border:1px dashed #bcaa8b;background:#fff7;opacity:.8;color:#a2967d}.cd-edit-shelf .cd-edit-item{padding:5px 2px;border:2px solid transparent;background:#faf7eecc;min-height:65px;font-size:10px;box-shadow:0 2px 6px #574c2c18}.cd-edit-shelf .cd-edit-item.selected{border-color:#66805b;background:#eaf1df}.cd-exhibit{font-size:10px;line-height:1.35;color:#584a32;pointer-events:none}.cd-exhibit img,.cd-edit-item img{height:48px;width:64px;max-width:100%;object-fit:contain;display:block;margin:auto}.cd-exhibit span,.cd-edit-item span{display:block;overflow-wrap:anywhere}.cd-exhibit b{display:block;font-size:11px}.cd-medal,.cd-team-mark{font-style:normal;display:block;font-size:28px;height:39px;color:#67875c}.cd-medal.cd-level-1{color:#ad733e}.cd-medal.cd-level-2{color:#818d98}.cd-medal.cd-level-3{color:#c99831}.cd-placement-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-height:50px;margin:12px 0;font-size:12px}.cd-placement-tools button{font-size:11px;padding:6px 9px}.cd-placement-tools b{margin-right:auto}.cd-announcement{border-left:3px solid #b7a065;padding-left:12px;margin-bottom:14px;font-size:12px}.cd-showcase .cd-shelf{height:230px}.cd-showcase h2{font-size:14px}.cd-reload{margin-top:16px}
@media(max-width:600px){.cd-dialog{border-radius:16px;max-height:calc(100dvh - 32px)}.cd-dialog>header{padding:16px}.cd-body{padding:16px}.cd-facts{grid-template-columns:repeat(2,1fr);gap:8px}.cd-theme-grid{grid-template-columns:repeat(2,1fr)}.cd-goal-link{font-size:12px!important}.cd-editor-footer{flex-wrap:wrap}.cd-editor-footer button{flex:1}.cd-tabs{gap:0}.cd-tabs button{padding:8px 10px}.cd-exhibit img,.cd-edit-item img{height:40px}.cd-edit-shelf{height:255px}#desk-grid.cd-layout .seat{--seat-scale:.55}}
@media(max-height:500px){.cd-dialog{max-height:calc(100dvh - 24px)}.cd-overlay{padding:10px}.cd-dialog>header{padding:8px 16px}.cd-dialog h2{font-size:17px}}

.cd-themed .room-stage{background:var(--cd-window-image) right 65px top 6px/180px 100px no-repeat,var(--cd-wall-image) center/cover,var(--cd-background-image) center/cover,var(--cd-wall)}
#classroom-team-settings{position:absolute;left:18px;top:68px;z-index:9;border-radius:20px;font-size:12px;min-height:34px;box-shadow:0 4px 14px #0001}
.cd-seat-preview{position:relative;display:block;height:210px;padding:0;border:0!important;box-sizing:border-box}.cd-seat-preview span{position:absolute;transform:translate(-50%,-50%);width:22px;font-size:9px}
.cd-seat-preview[data-layout="around"]:before,#desk-grid.cd-layout[data-layout="around"]:before{content:"";position:absolute;left:21%;top:28%;width:58%;height:44%;border-radius:30%;background:var(--cd-desk,#b48d60);opacity:.32;box-shadow:0 7px #0002}
#desk-grid.cd-layout[data-layout="library"]:before{content:"";position:absolute;left:46%;width:8%;top:8%;bottom:8%;border-left:1px dashed #fff5;border-right:1px dashed #fff5}
@media(max-width:600px){#classroom-team-settings{left:14px;top:66px}.cd-theme-preview{height:62px}.cd-themed .room-stage{background-size:120px 70px,cover,cover,auto}}
.cd-themed .room-stage{width:calc(100% - 300px)}
body.panel-collapsed .cd-themed .room-stage{width:100%}
.cd-themed .seat-area{width:100%;margin-left:0;margin-right:0}
.cd-themed .top-strip{padding-top:108px;width:min(1180px,100%)}
@media(min-width:901px) and (max-width:1250px){.cd-themed .top-strip{grid-template-columns:minmax(170px,.7fr) minmax(360px,1.3fr);height:auto}.cd-themed .timer-card{grid-column:1/-1;min-height:220px}}
@media(max-width:900px){.cd-themed .room-stage{width:100%}.cd-themed .top-strip{grid-template-columns:1fr;padding-top:108px}}

.cd-medal svg{width:32px;height:32px;padding:5px;border:1px solid currentColor;border-radius:50%;background:#fff7;box-shadow:0 2px 3px #0001}.cd-exhibit .cd-medal img,.cd-edit-item .cd-medal img{height:32px;width:32px}.cd-showcase .cd-exhibit{overflow-wrap:anywhere}.cd-team-exhibit{background:#f5f1e7c9;border-radius:7px;padding:3px}

.cd-themed .room-brand,.cd-themed #classroom-team-settings,.cd-themed .toggle-side{position:fixed}
.cd-themed .room-brand{top:max(16px,env(safe-area-inset-top));left:max(14px,env(safe-area-inset-left))}
.cd-themed #classroom-team-settings{left:max(14px,env(safe-area-inset-left));top:calc(max(16px,env(safe-area-inset-top)) + 52px)}
.cd-themed .toggle-side{right:max(14px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top))}
.cd-themed .cd-chat-card{position:sticky;bottom:0;z-index:13;background:#fffaf2;box-shadow:0 -5px 20px #57462c1a;margin-bottom:env(safe-area-inset-bottom)}
.cd-themed .cd-chat-card{bottom:calc(82px + env(safe-area-inset-bottom));margin-bottom:0}
.cd-themed .room-side{padding-bottom:calc(90px + env(safe-area-inset-bottom))}

/* Keep the complete pomodoro controls inside their classroom board. */
body.todo-mode .timer-card{display:flex;flex-direction:column;justify-content:center;gap:0;padding:10px 12px;overflow:visible}
body.todo-mode #pomodoro-timer-panel:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);gap:6px;min-width:0}
body.todo-mode #pomo-timeshow{min-height:58px!important;padding:5px 6px;font-size:clamp(1.8rem,2.8vw,2.8rem)!important;line-height:1}
body.todo-mode #pomodoro-timer-panel>.progress{height:8px;min-height:8px}
body.todo-mode #pomodoro-timer-panel>label{margin:0!important;display:flex!important;align-items:center;gap:5px;min-width:0;font-size:12px!important;line-height:1.4;flex-wrap:wrap}
body.todo-mode #footprint-project{width:0;flex:1;min-width:0;max-width:100%;padding:3px 5px!important;min-height:28px}
body.todo-mode .pomo-controls{gap:5px;grid-template-columns:repeat(3,minmax(0,1fr))}
body.todo-mode .pomo-controls>button{min-height:30px;padding:3px 2px;font-size:13px;line-height:1.4}
body.todo-mode .pomo-settings{gap:5px;line-height:1.4}
body.todo-mode .pomo-settings label{margin:0;gap:2px}
body.todo-mode .pomo-settings input[type=number]{min-height:28px;height:28px;font-size:13px;line-height:1.4}
body.todo-mode .pomo-checks{gap:4px 8px;line-height:1.4;min-height:28px}
body.todo-mode .pomo-checks label{margin:0;white-space:nowrap}
body.todo-mode .pomo-record-pop{top:auto;bottom:calc(100% + 4px);max-width:min(168px,70vw)}
@media(min-width:901px){body.todo-mode .timer-card{container-type:size}body.todo-mode #pomo-timeshow{min-height:clamp(40px,23cqh,58px)!important}body.todo-mode #pomodoro-timer-panel:not([hidden]){gap:clamp(3px,2cqh,6px)}}
@media(max-width:900px){body.todo-mode .timer-card{height:auto;min-height:250px;padding:12px}}

.cd-design-group+ .cd-design-group{margin-top:28px;padding-top:24px;border-top:1px solid #dce4d6}.cd-design-group>h3{font-size:16px;margin-bottom:14px}.cd-scene-thumbnail{display:block;width:100%;height:100px;object-fit:cover;border-radius:7px}.cd-theme-option:has(input:disabled){opacity:.5;cursor:not-allowed}.cd-original-layout{margin-top:20px}.cd-original-layout[hidden]{display:none}.cd-dialog [data-cd-panel="basic"] select{max-width:240px}
