:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Noto Sans JP','Hiragino Kaku Gothic ProN',Meiryo,sans-serif;color:#1c2c42;background:#f4f7fb;font-size:14px}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer}.shell{display:flex;min-height:100vh}.sidebar{width:236px;flex:none;background:#102238;color:white;padding:28px 15px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;padding:2px 9px 38px;font-size:18px}.brand small{display:block;color:#8fa8c0;font-size:9px;letter-spacing:1.7px;margin-top:3px}.brandicon{width:40px;height:40px;border-radius:12px;background:#3b78e7;display:grid;place-items:center;font-size:28px}.side-label{font-size:10px;letter-spacing:2px;color:#6e88a6;margin:0 12px 13px}.nav{display:block;text-align:left;background:transparent;color:#a9bbd0;border:0;padding:15px;border-radius:10px;margin-bottom:5px;font-weight:600}.nav.active{background:#24446a;color:white}.side-note{margin-top:auto;border-top:1px solid #2b405a;padding:22px 10px 0;color:#c8d5e5;font-size:12px;line-height:1.8}.side-note small{color:#7e9bb6}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#2fc58e;margin-right:5px}main{flex:1;min-width:0}header{height:72px;background:white;border-bottom:1px solid #e5eaf1;padding:0 38px;display:flex;align-items:center;justify-content:space-between}.crumb{color:#7d8ba0;font-size:12px}.crumb span{margin:0 10px}.crumb strong{color:#263b53}.header-right{display:flex;align-items:center;gap:18px}.avatar{background:#e9f0ff;color:#3566bb;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;font-size:11px;font-weight:800}.tag{font-size:11px;border-radius:20px;padding:7px 12px}.neutral{background:#edf2f8;color:#5b6d83}.content{max-width:1700px;margin:auto;padding:34px 36px 55px}.hidden{display:none!important}.heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:25px}.eyebrow{font-size:10px;color:#4481df;font-weight:800;letter-spacing:2px;margin-bottom:7px}h1{font-size:27px;letter-spacing:-.7px;margin:0 0 7px}p{margin:0;color:#8492a4;line-height:1.6}.outline{background:white;border:1px solid #dbe4ef;border-radius:9px;padding:11px 16px;color:#41546c;font-weight:700}.switchbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.tabs{display:flex;background:#e9eef6;padding:4px;border-radius:11px;gap:4px}.tab{border:0;background:transparent;padding:11px 20px;border-radius:8px;color:#71829a;font-weight:800}.tab span{font-weight:400;font-size:11px;margin-left:4px}.tab.active{background:white;color:#255db8;box-shadow:0 1px 6px #18345812}.hint{font-size:12px;color:#71839b}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:25px}.stat{background:white;border:1px solid #e8edf4;border-radius:14px;padding:19px 22px;box-shadow:0 3px 16px #1d3d6110}.stat>span{font-size:12px;font-weight:700;color:#74859a}.stat div{margin:10px 0 5px}.stat strong{font-size:32px;letter-spacing:-1px}.stat div small{margin-left:5px;color:#6c7f95}.stat>small{font-size:11px;color:#a1adba}.buildings{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(600px,2.2fr);gap:20px;align-items:start}.building{border-radius:17px;border:1px solid #e5ebf2;padding:20px;background:white;min-width:0;box-shadow:0 4px 20px #1d3d610a}.sakura{border-top:4px solid #eb91b4}.hills{border-top:4px solid #6f9fea}.building-title{display:flex;align-items:center;gap:11px;padding-bottom:18px;border-bottom:1px solid #edf1f5;margin-bottom:16px}.building-title h2{margin:0;font-size:19px}.building-title p{font-size:9px;letter-spacing:1.5px}.building-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;font-size:23px;background:#fff0f6;color:#d86d9a}.hills .building-mark{background:#edf4ff;color:#5489d9}.building-pill{margin-left:auto;border-radius:20px;background:#f1f4f8;color:#71849c;font-size:10px;padding:6px 9px}.apartment{border:1px solid #e5eaf0;border-radius:11px;padding:11px;margin-bottom:12px;background:#fff}.apartment-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:4px}.apartment-num{font-size:16px;font-weight:850;color:#263a53}.occupancy{font-size:10px;color:#77889c;white-space:nowrap}.room-grid{display:grid;grid-template-columns:repeat(var(--cols,2),minmax(0,1fr));gap:8px}.room{border:1px solid #e7edf3;background:#fafcfe;border-radius:9px;padding:9px;min-width:0}.room-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;gap:3px}.room-head b{font-size:11px}.count{font-size:10px;color:#8090a5;white-space:nowrap}.person{display:flex;align-items:center;gap:7px;margin-bottom:7px;min-width:0}.person:last-child{margin-bottom:0}.photo{width:34px;height:40px;flex:none;object-fit:cover;object-position:center 25%;border-radius:6px;border:1px solid #e3e8ee;background:#e9eef4}.photo-placeholder{display:grid;place-items:center;color:#a0acba;font-size:20px}.person-details{min-width:0}.person-name{font-size:10px;font-weight:700;overflow-wrap:anywhere;line-height:1.3}.workplace{display:inline-block;margin-top:4px;padding:3px 5px;border-radius:4px;font-size:9px;line-height:1.3;overflow-wrap:anywhere}.vacant{color:#a5b0bf;font-size:10px;border:1px dashed #d8e0ea;padding:8px;border-radius:6px;text-align:center;margin-top:6px}.not-rented{font-size:10px;color:#ad8790;background:#fff2f3;border-radius:5px;padding:4px 6px}.hills-plan{display:grid;grid-template-columns:minmax(0,1.3fr) 32px minmax(0,1fr);gap:9px}.hills-plan .room-grid{--cols:3}.hills-right .room-grid{--cols:2}.hills-plan .apartment{padding:9px}.hills-plan .room{padding:7px}.hills-plan .photo{width:29px;height:35px}.hills-plan .person{gap:5px}.hills-plan .person-name{font-size:9px}.hills-plan .workplace{font-size:8px}.corridor{background:#e9edf2;border:1px dashed #c8d1de;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#8b9bad;font-weight:800;font-size:12px;min-height:400px}.legend{background:white;border:1px solid #e8edf4;border-radius:12px;padding:18px 20px;margin-top:20px;display:flex;align-items:center;gap:20px;flex-wrap:wrap}.legend>b{font-size:12px}.legend>div{display:flex;gap:8px;flex-wrap:wrap}.legend .workplace{font-size:11px;padding:6px 10px;margin:0}.footnote{font-size:11px;color:#9aa6b6;margin-top:18px}.schedule-intro{background:#eaf2ff;border:1px solid #d7e6ff;padding:22px;border-radius:14px;margin-bottom:20px}.schedule-intro strong{font-size:17px}.schedule-intro p{margin-top:8px;color:#647f9d}.schedule-card{display:flex;align-items:start;gap:20px;background:white;border:1px solid #e6edf5;border-radius:12px;padding:20px;margin-bottom:12px}.date-box{flex:none;background:#edf3ff;color:#3164ae;border-radius:9px;padding:12px 15px;font-weight:800;min-width:90px;text-align:center}.schedule-body{flex:1}.schedule-body h3{margin:0 0 9px;font-size:16px}.schedule-body ul{margin:0;padding-left:20px;color:#687d95;line-height:1.9}.schedule-check{accent-color:#3378db;width:18px;height:18px;margin-top:15px}.schedule-card.done{opacity:.6}@media(max-width:1350px){.buildings{grid-template-columns:1fr}.hills-plan{grid-template-columns:minmax(0,1.2fr) 40px minmax(0,1fr)}.hills-plan .person-name{font-size:11px}.hills-plan .workplace{font-size:9px}}@media(max-width:800px){.sidebar{width:66px;padding:20px 8px}.brand{padding:0 0 30px;justify-content:center}.brand>div:last-child,.side-label,.side-note{display:none}.nav{font-size:0;padding:16px 5px;text-align:center}.nav:first-letter{font-size:20px}header{padding:0 17px;height:60px}.content{padding:24px 14px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.stat{padding:14px}.stat strong{font-size:26px}.heading{align-items:start}.heading h1{font-size:21px}.hills-plan{grid-template-columns:1fr}.corridor{min-height:32px;flex-direction:row}.hills-plan .room-grid{--cols:3}.hills-right .room-grid{--cols:2}.hint{display:none}}@media(max-width:480px){.sidebar{width:50px}.brandicon{width:33px;height:33px}.building{padding:11px}.hills-plan .room-grid{--cols:1}.hills-right .room-grid{--cols:1}.room-grid{--cols:1!important}.room{padding:10px}.hills-plan .photo{width:36px;height:42px}.hills-plan .person-name{font-size:12px}.hills-plan .workplace{font-size:10px}.heading .actions{display:none}.tab{padding:10px 12px}.schedule-card{gap:10px;padding:13px}.date-box{min-width:60px;padding:9px 5px;font-size:11px}}@media print{.sidebar,header,.switchbar,.actions,.schedule-check{display:none!important}.content{padding:0}.buildings{grid-template-columns:1fr 2fr}.building{break-inside:avoid}.hills-plan .room-grid{--cols:3}.hills-right .room-grid{--cols:2}body{background:white}}

/* Click-to-enlarge portraits */
.zoomable-photo{cursor:zoom-in;transition:transform .15s ease,box-shadow .15s ease}.zoomable-photo:hover{transform:scale(1.08);box-shadow:0 2px 9px #0002}.zoomable-photo:focus-visible{outline:3px solid #4388e9;outline-offset:3px}.photo-lightbox[hidden]{display:none!important}.photo-lightbox{position:fixed;inset:0;z-index:9999;background:rgba(9,19,35,.86);display:flex;align-items:center;justify-content:center;padding:24px;overflow:auto}.lightbox-open{overflow:hidden}.lightbox-panel{position:relative;max-width:min(92vw,650px);width:max-content;text-align:center;color:white}.lightbox-panel img{display:block;max-width:90vw;max-height:76vh;width:auto;height:auto;object-fit:contain;border-radius:12px;background:#e7edf4;box-shadow:0 12px 45px #0007}.lightbox-close{position:absolute;top:-18px;right:-18px;width:42px;height:42px;border:0;border-radius:50%;background:white;color:#182b43;font-size:30px;line-height:1;box-shadow:0 4px 16px #0005}.lightbox-name{font-size:18px;font-weight:700;margin-top:16px}.lightbox-tip{font-size:11px;color:#d5dce8;margin-top:8px}@media(max-width:480px){.photo-lightbox{padding:16px}.lightbox-close{right:0;top:-44px}.lightbox-panel img{max-width:92vw;max-height:72vh}}@media print{.photo-lightbox{display:none!important}}

/* One-sheet housing plan print layout (A3 landscape). */
@page { size: A3 landscape; margin: 7mm; }
@media print {
  html, body { width: 100%; margin: 0 !important; padding: 0 !important; background: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .shell { display: block !important; min-height: 0 !important; }
  main { width: 100% !important; }
  .sidebar, header, .switchbar, .actions, .schedule-check, .stats, .footnote, .photo-lightbox { display: none !important; }
  #layoutPage:not(.hidden) { display: block !important; }
  .content { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .heading { margin: 0 0 3mm !important; }
  .heading h1 { font-size: 18pt !important; margin: 0 !important; }
  .heading p, .eyebrow { display: none !important; }
  .buildings { display: grid !important; grid-template-columns: minmax(0, .78fr) minmax(0, 2.22fr) !important; gap: 3mm !important; align-items: start !important; }
  .building { box-shadow: none !important; border-radius: 2mm !important; padding: 2mm !important; break-inside: avoid !important; }
  .building-title { padding-bottom: 2mm !important; margin-bottom: 2mm !important; }
  .building-title h2 { font-size: 13pt !important; }
  .building-mark { width: 8mm !important; height: 8mm !important; }
  .hills-plan { grid-template-columns: minmax(0,1.3fr) 7mm minmax(0,1fr) !important; gap: 1.5mm !important; }
  .hills-plan .room-grid { --cols: 3 !important; }
  .hills-right .room-grid { --cols: 2 !important; }
  .room-grid { grid-template-columns: repeat(var(--cols,2), minmax(0,1fr)) !important; gap: 1.2mm !important; }
  .apartment, .hills-plan .apartment { padding: 1.7mm !important; margin-bottom: 1.7mm !important; break-inside: avoid !important; }
  .apartment-top { margin-bottom: 1.5mm !important; }
  .room, .hills-plan .room { padding: 1.3mm !important; break-inside: avoid !important; }
  .room-head { margin-bottom: 1.5mm !important; }
  .person, .hills-plan .person { gap: 1mm !important; margin-bottom: 1.5mm !important; }
  .photo, .hills-plan .photo { width: 8mm !important; height: 10mm !important; }
  .person-name, .hills-plan .person-name { font-size: 7pt !important; line-height: 1.15 !important; }
  .workplace, .hills-plan .workplace { font-size: 6.5pt !important; margin-top: .5mm !important; padding: .5mm 1mm !important; }
  .room-head b, .count, .occupancy { font-size: 7pt !important; }
  .vacant { padding: 1mm !important; font-size: 7pt !important; margin-top: 1mm !important; }
  .corridor { min-height: 0 !important; }
  .legend { margin-top: 2mm !important; padding: 2mm !important; break-inside: avoid !important; }
  .legend .workplace { font-size: 7pt !important; padding: 1mm 2mm !important; }
  .schedule-card { break-inside: avoid !important; }
}

/* Schedule is visible in print only when the AFTER plan is selected. */
.print-schedule { display:none; }
@media print {
  #schedulePage { display:none !important; }
  .print-schedule { display:none !important; }
  body.print-after #layoutPage:not(.hidden) .print-schedule {
    display:block !important; margin-top:2.5mm !important; padding-top:1.5mm !important;
    border-top:1px solid #b9c8da; break-inside:avoid !important;
  }
  .print-schedule h2 { font-size:10pt !important; margin:0 0 1.5mm !important; }
  .print-schedule h2 small { font-size:8pt; color:#6b7788; }
  #printScheduleItems { display:grid !important; grid-template-columns:repeat(5,minmax(0,1fr)) !important; gap:1.5mm !important; }
  .print-schedule-item { border:1px solid #dce5f0; border-radius:1mm; padding:1.5mm; min-width:0; background:#f8fbff; }
  .print-schedule-item b { display:block; font-size:7pt; line-height:1.3; margin-bottom:1mm; }
  .print-schedule-item ul { padding-left:3mm; margin:0; font-size:6.4pt; line-height:1.35; color:#40546a; }
  .print-schedule-item li { margin-bottom:.4mm; }
}

.lang-toggle{cursor:pointer;white-space:nowrap;font-weight:700;padding:8px 12px;border-radius:10px}.header-right{gap:10px}@media(max-width:600px){.lang-toggle{font-size:12px;padding:7px}.header-right .tag.neutral{display:none}}@media print{#langToggle{display:none!important}}

/* Admin & chat */
[hidden]{display:none!important}.chat-messages{display:flex;flex-direction:column;gap:10px;max-height:55vh;overflow:auto;padding:12px;background:#f5f8fc;border-radius:12px;margin:20px 0}.chat-item{background:white;border:1px solid #e1e7f0;border-radius:12px;padding:12px;overflow-wrap:anywhere}.chat-meta{font-size:12px;color:#64748b}.chat-item p{white-space:pre-wrap;margin:8px 0}.chat-item button{padding:5px 10px}.edit-panel{display:flex;flex-direction:column;gap:9px;background:#fff;border:1px solid #e1e7f0;border-radius:12px;padding:16px;margin:12px 0}.edit-panel input,.edit-panel textarea,.editor-room select{font:inherit;padding:9px;border:1px solid #cbd5e1;border-radius:7px;max-width:100%;width:100%;box-sizing:border-box}.edit-panel button,.admin-actions button{background:#225ca8;color:white;border:0;border-radius:8px;padding:10px 16px;cursor:pointer}.editor-apartment{background:white;border:1px solid #e1e7f0;border-radius:10px;padding:12px;margin:8px 0}.editor-room{display:grid;grid-template-columns:70px 1fr 1fr;gap:8px;align-items:center;margin-top:8px}.admin-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}@media(max-width:650px){.editor-room{grid-template-columns:1fr 1fr}.editor-room span{grid-column:1/-1}}@media print{#chatPage,#adminPage{display:none!important}}

/* Topbar admin entry, responsive */
.topbar-admin{cursor:pointer;white-space:nowrap;padding:8px 12px;font-size:12px}
@media(max-width:600px){.header-right{gap:5px}.topbar-admin{padding:7px 8px;font-size:11px}.header-right .avatar{display:none}}
@media print{#topbarAdminButton{display:none!important}}

/* In-page moving schedule editor */
.schedule-inline-panel{margin:18px 0;padding:16px;background:#fff;border:1px solid #d9e4f0;border-radius:14px}
.schedule-inline-panel[hidden],#scheduleInlineEditBtn[hidden]{display:none!important}
.schedule-inline-row{margin:0 0 12px}.schedule-inline-row input,.schedule-inline-row textarea{width:100%;max-width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:8px}
.schedule-inline-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:14px}
@media print{#scheduleInlineEditBtn,.schedule-inline-panel{display:none!important}}

/* Larger portrait and before/after housing details (desktop and mobile). */
.photo-lightbox .lightbox-panel{width:min(1040px,96vw);max-width:1040px;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(280px,.95fr);gap:24px;align-items:center;text-align:left}
.photo-lightbox .lightbox-panel>img{width:100%;height:auto;max-width:100%;max-height:82vh;object-fit:contain;border-radius:14px}
.photo-lightbox .lightbox-info{min-width:0;max-height:83vh;overflow:auto}
.photo-lightbox .lightbox-name{font-size:clamp(19px,2vw,27px);line-height:1.45;margin:0 0 18px;overflow-wrap:anywhere}
.photo-lightbox .lightbox-details{display:grid;gap:12px}
.photo-lightbox .lightbox-plan-card{background:#fff;color:#182b43;padding:16px;border-radius:13px;text-align:left}
.photo-lightbox .lightbox-plan-card h3{font-size:17px;margin:0 0 12px;color:#225ca8}
.photo-lightbox .lightbox-plan-card dl{margin:0;display:grid;gap:5px}
.photo-lightbox .lightbox-plan-card dt{font-size:12px;color:#64748b;margin-top:6px}
.photo-lightbox .lightbox-plan-card dd{font-size:15px;font-weight:700;margin:0;overflow-wrap:anywhere}
.photo-lightbox .lightbox-tip{grid-column:1/-1;text-align:center;margin:0}
@media(max-width:720px){.photo-lightbox .lightbox-panel{display:flex;flex-direction:column;gap:12px;max-height:92vh;overflow:auto;align-items:stretch}.photo-lightbox .lightbox-panel>img{max-height:45vh;width:auto;max-width:100%;align-self:center}.photo-lightbox .lightbox-info{max-height:none}.photo-lightbox .lightbox-name{margin:0 0 10px}.photo-lightbox .lightbox-close{right:0;top:0;z-index:1}.photo-lightbox .lightbox-plan-card{padding:12px}}
@media print{.photo-lightbox{display:none!important}}

/* Visual refresh 2026-11: preserve floor-plan DOM, room order and print geometry. */
:root{color:#20344b;background:#f2f5fa}
body{background:linear-gradient(180deg,#f7f9fd 0%,#eef3f9 100%);min-height:100vh}
.sidebar{background:linear-gradient(175deg,#142c49 0%,#102137 100%);box-shadow:8px 0 28px rgba(19,44,74,.07)}
.brandicon{background:linear-gradient(135deg,#4089e9,#255ab7);box-shadow:0 5px 15px #0002}
.nav{transition:background .18s,color .18s,transform .18s;border:1px solid transparent}
.nav:hover{background:#24415e;color:#fff;transform:translateX(2px)}
.nav.active{background:#2b507c;color:#fff;border-color:#44688d;box-shadow:inset 3px 0 #76b7ff}
header{background:rgba(255,255,255,.97);box-shadow:0 2px 18px rgba(23,52,85,.035);border-bottom-color:#e3eaf3}
.content{padding-top:30px}
h1{color:#192f49;font-weight:800;letter-spacing:-.5px}
.eyebrow{color:#2e6bc1}
.outline{border-color:#d5e0ee;box-shadow:0 1px 2px #1a35500b;transition:background .15s,border-color .15s}
.outline:hover{background:#edf4fd;border-color:#a9c4e6}
.tabs{background:#e5edf7;border:1px solid #dbe5f1}
.tab.active{color:#1c579d;box-shadow:0 2px 9px #234f831c}
.stat{border-color:#dfe8f3;box-shadow:0 5px 20px rgba(31,63,98,.055);border-radius:15px;position:relative;overflow:hidden}
.stat::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#5e9de6}
.stat:nth-child(2)::before{background:#2eb89c}.stat:nth-child(3)::before{background:#d8a448}.stat:nth-child(4)::before{background:#9b83d6}
.stat strong{color:#203b5b}
.building{border:1px solid #dfe7f1;border-radius:17px;box-shadow:0 9px 28px rgba(28,59,92,.07)}
.building.sakura{border-top:5px solid #d87da6}.building.hills{border-top:5px solid #5989d4}
.building-title{border-bottom-color:#e5ecf5}
.apartment{background:#f9fbfe;border-color:#dce5f0;border-radius:12px;box-shadow:0 2px 8px rgba(25,51,80,.025)}
.apartment-num{background:#e7effa;color:#26568e;border-radius:8px;padding:5px 10px;font-size:15px;letter-spacing:.3px}
.room{position:relative;border-width:1px;border-style:solid;border-radius:10px;box-shadow:0 2px 7px rgba(29,56,84,.035);transition:border-color .15s,box-shadow .15s}
.room:hover{box-shadow:0 4px 13px rgba(27,61,92,.12)}
/* Distinct room colors, repeated consistently in each apartment. */
.room-grid>.room:nth-child(1){background:#eaf5ff;border-color:#9bc9f1;border-left:4px solid #4b97d5}
.room-grid>.room:nth-child(2){background:#eaf8f1;border-color:#9edac2;border-left:4px solid #35a67d}
.room-grid>.room:nth-child(3){background:#fff5e8;border-color:#f0d09a;border-left:4px solid #df9b35}
.room-head{border-bottom:1px solid rgba(40,75,110,.10);padding-bottom:7px}
.room-head b{color:#234768;font-weight:800}
.room-grid>.room:nth-child(2) .room-head b{color:#237556}
.room-grid>.room:nth-child(3) .room-head b{color:#97601c}
.count{background:rgba(255,255,255,.7);border:1px solid rgba(70,99,126,.12);border-radius:99px;padding:2px 5px;color:#5d7185}
.person{background:rgba(255,255,255,.68);border-radius:7px;padding:4px;margin-bottom:5px}
.person-name{color:#253b50}
.photo{border-color:#cbd9e6;box-shadow:0 1px 3px #24425c16}
.vacant{background:rgba(255,255,255,.6);border-color:#b7cbdc;color:#75869a}
.corridor{background:repeating-linear-gradient(135deg,#eef2f7,#eef2f7 9px,#e6ecf4 9px,#e6ecf4 18px);border-color:#b7c6d8;color:#6b7f96}
.legend{border-color:#dce5f0;box-shadow:0 3px 14px #1839580b}
.schedule-card,.schedule-intro,.chat-item,.edit-panel{box-shadow:0 3px 14px #1d3d6109}
.schedule-card{border-color:#dce6f2}
@media print{
 body{background:#fff!important}
 .building,.apartment,.room,.stat,.person{box-shadow:none!important}
 .room-grid>.room:nth-child(1){background:#eaf5ff!important}
 .room-grid>.room:nth-child(2){background:#eaf8f1!important}
 .room-grid>.room:nth-child(3){background:#fff5e8!important}
 .person{padding:0!important;background:transparent!important}
 .room-head{padding-bottom:0!important}
 .apartment-num{padding:0!important;background:transparent!important}
}

/* Moving timeline and team chat — no change to floor-plan grid or printing */
#schedulePage .heading,#chatPage .heading{background:linear-gradient(110deg,#133456,#1c5785);color:#fff;padding:28px 30px;border-radius:19px;margin-bottom:20px;box-shadow:0 12px 32px #153b611f}
#schedulePage .heading h1,#chatPage .heading h1{color:#fff}
#schedulePage .heading p,#chatPage .heading p{color:#d3e6f5}
#schedulePage .heading .eyebrow{color:#9bd8ff}
#schedulePage .schedule-intro{background:#fff;border:1px solid #dce7f2;border-left:5px solid #2682b9;box-shadow:0 5px 22px #25466b0d}
#scheduleList{position:relative;padding-left:24px;margin:26px 0 0 10px}
#scheduleList:before{content:"";position:absolute;top:14px;bottom:30px;left:9px;width:3px;border-radius:9px;background:linear-gradient(#2e91c5,#d3e7f7)}
#scheduleList .schedule-card{position:relative;gap:20px;border-radius:15px;box-shadow:0 5px 18px #19385a0a;padding:21px 23px;transition:border-color .2s,box-shadow .2s}
#scheduleList .schedule-card:before{content:"";position:absolute;left:-23px;top:28px;width:13px;height:13px;border-radius:50%;background:#2485ba;border:3px solid #fff;box-shadow:0 0 0 2px #bcdcf0}
#scheduleList .schedule-card:hover{border-color:#a9cce7;box-shadow:0 8px 28px #19385a18}
#scheduleList .date-box{background:#e7f3fc;color:#135d8d;border:1px solid #cbe5f7;border-radius:10px;min-width:105px}
#scheduleList .schedule-body h3{color:#1b3855;font-size:17px}
#scheduleList .schedule-body li{padding-bottom:3px}
#scheduleList .schedule-check{width:20px;height:20px;cursor:pointer}
#schedulePage .schedule-inline-panel{border-radius:16px;box-shadow:0 9px 30px #153b6112}
#chatPage .chat-workspace{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(270px,.85fr);gap:18px;align-items:start}
#chatPage .chat-conversation,#chatPage .chat-compose{background:#fff;border:1px solid #e0e8f1;border-radius:17px;box-shadow:0 6px 24px #153b610d;overflow:hidden}
#chatPage .chat-section-heading{padding:17px 20px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #e9eef4;color:#1b3956}
#chatPage .chat-section-heading small{margin-left:auto;color:#8192a4;font-size:11px}
#chatPage .chat-online-dot{width:10px;height:10px;border-radius:50%;background:#22b78a;box-shadow:0 0 0 4px #e2f8f0}
#chatPage .chat-messages{margin:0;border-radius:0;background:#f6f9fd;max-height:65vh;min-height:350px;padding:18px;gap:12px}
#chatPage .chat-item{border-radius:12px;border:1px solid #e0e9f3;box-shadow:0 2px 8px #183b5a08;padding:13px 16px;max-width:90%}
#chatPage .chat-meta{font-size:11px;font-weight:700;color:#3b7399}
#chatPage .chat-item p{color:#293f56;line-height:1.65}
#chatPage .chat-compose{margin:0;padding:22px;gap:12px}
#chatPage .chat-compose-heading{font-size:17px;font-weight:800;color:#173a5c;padding-bottom:12px;border-bottom:1px solid #e6edf5}
#chatPage .chat-compose label{font-weight:700;font-size:12px;color:#47627b}
#chatPage .chat-compose input,#chatPage .chat-compose textarea{border-radius:10px;background:#f9fbfe;padding:12px}
#chatPage #chatSend{background:#1b6a9b;padding:13px;border-radius:10px;font-weight:800}
#chatPage #chatSend:hover{background:#155781}
.photo-admin-tools{grid-column:1/-1;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;padding:8px 0}
.photo-admin-tools[hidden]{display:none!important}
.photo-admin-tools label,.photo-admin-tools button{background:#fff;color:#163e60;border:0;border-radius:9px;padding:11px 17px;font-weight:800;cursor:pointer}
.photo-admin-tools button{background:#2676aa;color:white}
.photo-admin-tools button:disabled{opacity:.5;cursor:not-allowed}
.photo-admin-tools span{color:#fff;font-size:12px}
@media(max-width:850px){#chatPage .chat-workspace{grid-template-columns:1fr}#chatPage .chat-messages{min-height:240px;max-height:45vh}}
@media(max-width:600px){#schedulePage .heading,#chatPage .heading{padding:20px 17px}#scheduleList{padding-left:16px;margin-left:7px}#scheduleList:before{left:5px}#scheduleList .schedule-card:before{left:-18px}#scheduleList .schedule-card{flex-wrap:wrap;gap:10px}#scheduleList .date-box{min-width:80px}#scheduleList .schedule-body{flex-basis:65%}}
@media print{#chatPage{display:none!important}#scheduleList:before,#scheduleList .schedule-card:before{display:none!important}#schedulePage .heading{background:white!important;color:#111!important;box-shadow:none!important}}

/* Allow adding photos for trainees without a portrait */
.photo-placeholder.zoomable-photo{cursor:zoom-in;display:inline-flex;align-items:center;justify-content:center}
.photo-placeholder.zoomable-photo:hover{outline:2px solid #3b82f6;outline-offset:2px}
#lightboxImage[hidden]{display:none!important}

/* Responsive refinement: do not reorder the housing floor-plan rooms. */
html{overflow-x:hidden;-webkit-text-size-adjust:100%}
body,.shell,main{max-width:100%;min-width:0}
button,input,textarea{max-width:100%}
button{touch-action:manipulation}
.content,.building,.apartment,.room,.chat-workspace,.schedule-card{min-width:0}
@media (min-width:801px) and (max-width:1199px){
 .sidebar{width:205px;padding-inline:10px}
 header{padding-inline:22px}
 .content{padding-inline:20px}
 .header-right{gap:9px}
}
@media (max-width:800px){
 .shell{display:block;padding-bottom:76px}
 .sidebar{position:fixed;inset:auto 0 0 0;z-index:900;width:100%;height:66px;padding:6px 8px;display:flex;flex-direction:row;justify-content:space-around;align-items:stretch;box-shadow:0 -4px 20px #10223826}
 .sidebar .brand,.sidebar .side-label,.sidebar .side-note{display:none!important}
 .sidebar .nav{flex:1;display:flex;align-items:center;justify-content:center;min-width:0;margin:0 3px;padding:8px 4px;font-size:12px!important;line-height:1.25;text-align:center;white-space:normal;overflow-wrap:anywhere;border-radius:9px;transform:none!important}
 .sidebar .nav.active{box-shadow:inset 0 3px #76b7ff}
 header{height:auto;min-height:60px;padding:10px 14px;gap:8px;flex-wrap:wrap}
 .header-right{gap:7px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
 .header-right .outline{padding:9px 10px;font-size:12px}
 .crumb{min-width:0}
 .content{padding:18px 12px 30px}
 .heading{flex-wrap:wrap}
 .heading .actions{display:flex!important}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .buildings{grid-template-columns:minmax(0,1fr)}
 .hills-plan{grid-template-columns:minmax(0,1fr)}
 .hills-plan .room-grid{--cols:3}
 .hills-right .room-grid{--cols:2}
 .corridor{min-height:38px;flex-direction:row}
 .photo-lightbox{padding:12px}
 .photo-lightbox .lightbox-panel{width:min(100%,680px);max-width:100%;max-height:calc(100dvh - 24px);overflow:auto}
 .photo-lightbox .lightbox-panel>img{max-width:100%;max-height:40dvh}
 #chatPage .chat-workspace{grid-template-columns:minmax(0,1fr)}
 #chatPage .chat-messages{min-height:220px;max-height:45dvh}
}
@media (max-width:520px){
 .content{padding-inline:10px}
 .heading h1{font-size:20px}
 .building{padding:11px}
 .room-grid,.hills-plan .room-grid,.hills-right .room-grid{--cols:1!important}
 .room{padding:10px}
 .hills-plan .photo{width:36px;height:42px}
 .hills-plan .person-name{font-size:12px}
 .hills-plan .workplace{font-size:10px}
 .switchbar{gap:8px;flex-wrap:wrap}
 .tab{padding:10px 11px}
 .stat{padding:12px}
 .stat strong{font-size:25px}
 #schedulePage .heading,#chatPage .heading{padding:19px 15px}
 #scheduleList .schedule-card{padding:13px;gap:9px}
 #scheduleList .date-box{min-width:76px}
 #chatPage .chat-compose{padding:15px}
 .photo-lightbox .lightbox-plan-card{padding:11px}
}
@media (max-width:350px){.sidebar .nav{font-size:11px!important}.header-right .outline{font-size:11px;padding:7px}.avatar{display:none}}
@media print{.shell{display:flex!important;padding-bottom:0!important}.sidebar{display:none!important}header{display:none!important}.content{padding:0!important}.buildings{grid-template-columns:1fr 2fr!important}.hills-plan{grid-template-columns:minmax(0,1.3fr) 32px minmax(0,1fr)!important}.hills-plan .room-grid{--cols:3!important}.hills-right .room-grid{--cols:2!important}}

/* Roommate information in photo profile */
.lightbox-plan-card .roommate-value{font-weight:700;overflow-wrap:anywhere}

/* Mobile navigation redesign: presentation only; floor-plan and print untouched */
@media screen and (max-width:800px){
 body{background:#f4f7fb}
 .shell{padding-bottom:calc(86px + env(safe-area-inset-bottom,0px))}
 header{position:sticky;top:0;z-index:750;min-height:68px;padding:10px 15px;display:flex;flex-wrap:nowrap;align-items:center;gap:8px;background:rgba(255,255,255,.97);border-bottom:1px solid #e1e9f3;box-shadow:0 5px 22px #102e4c0c;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
 header::before{content:'CM';flex:0 0 39px;height:39px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#1c75ad,#173b67);color:#fff;font-size:13px;font-weight:900;letter-spacing:.3px;box-shadow:0 4px 12px #195b9230}
 header .crumb{display:none}
 header .header-right{margin-left:auto;flex:1;min-width:0;display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:7px}
 header .avatar{display:none}
 header .header-right .outline{border:1px solid #dce7f1;border-radius:11px;background:#f5f8fc;color:#254660;min-height:39px;padding:8px 10px;font-size:11px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 header #topbarAdminButton{max-width:46%;display:flex;align-items:center;justify-content:center;gap:6px}
 header #langToggle{max-width:48%}
 .sidebar{position:fixed;inset:auto 0 0 0;z-index:900;width:100%;height:calc(75px + env(safe-area-inset-bottom,0px));padding:7px 8px calc(7px + env(safe-area-inset-bottom,0px));display:flex;align-items:stretch;justify-content:space-around;background:rgba(255,255,255,.98);border-top:1px solid #dce7f1;box-shadow:0 -6px 26px #193b5917;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px)}
 .sidebar .nav{position:relative;flex:1;min-width:0;margin:0 3px;padding:7px 3px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:transparent;color:#60778c;border:0;border-radius:13px;font-size:11px!important;font-weight:750;line-height:1.15;white-space:normal;overflow-wrap:anywhere;box-shadow:none!important;transform:none!important;transition:background .18s,color .18s}
 .sidebar .nav::before{content:'';display:block;width:23px;height:23px;flex:none;background-color:currentColor;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}
 .sidebar .nav.active{background:#e8f3fd;color:#176da5;border:0;box-shadow:none!important}
 .sidebar .nav.active::after{content:'';position:absolute;top:3px;left:calc(50% - 13px);width:26px;height:3px;border-radius:9px;background:#2486c2}
 .sidebar .nav:hover{background:#edf5fb;color:#176da5}
 .content{padding-bottom:22px}
}
@media screen and (max-width:370px){header{padding-inline:9px;gap:5px}header::before{flex-basis:34px;height:34px;font-size:11px}header .header-right{gap:4px}header .header-right .outline{font-size:10px;padding:7px 6px}.sidebar .nav{font-size:10px!important}}
@media screen and (max-width:800px){.sidebar .nav[data-page="layout"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E")}}
@media screen and (max-width:800px){.sidebar .nav[data-page="schedule"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M16%203v4M8%203v4M3%2010h18M8%2015h3M8%2018h6%22%2F%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M16%203v4M8%203v4M3%2010h18M8%2015h3M8%2018h6%22%2F%3E%3C%2Fsvg%3E")}}
@media screen and (max-width:800px){.sidebar .nav[data-page="chat"]::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2011.5a8.5%208.5%200%200%201-8.5%208.5%209%209%200%200%201-4-.95L3%2021l1.95-5.5A9%209%200%201%201%2021%2011.5Z%22%2F%3E%3Cpath%20d%3D%22M8%2011h8M8%2014h5%22%2F%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2011.5a8.5%208.5%200%200%201-8.5%208.5%209%209%200%200%201-4-.95L3%2021l1.95-5.5A9%209%200%201%201%2021%2011.5Z%22%2F%3E%3Cpath%20d%3D%22M8%2011h8M8%2014h5%22%2F%3E%3C%2Fsvg%3E")}}
@media screen and (max-width:800px){header #topbarAdminButton::before{content:"";display:inline-block;flex:none;width:15px;height:15px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat}}

/* Admin workplace editor inside trainee photo details */
.workplace-admin-tools{margin:12px 0;padding:16px;border:1px solid #cbdbea;border-radius:14px;background:#f7faff;color:#243b53}
.workplace-admin-tools[hidden]{display:none!important}
.workplace-admin-tools h3{margin:0 0 12px;font-size:1rem}
.workplace-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.workplace-editor-grid label{display:flex;flex-direction:column;gap:6px;font-size:.86rem;font-weight:600}
.workplace-editor-grid select{width:100%;min-width:0;border:1px solid #b8ccdf;border-radius:9px;background:white;padding:10px;font:inherit}
#workplaceSaveButton{border:0;border-radius:9px;padding:10px 16px;background:#176b9e;color:#fff;cursor:pointer;font-weight:700}
#workplaceSaveButton:disabled{opacity:.6;cursor:wait}
#workplaceSaveStatus{display:block;margin-top:8px;font-size:.85rem}
@media(max-width:600px){.workplace-editor-grid{grid-template-columns:1fr}.workplace-admin-tools{padding:12px}}


/* HOUSING MANAGEMENT SUBMENU V1 */
#housingMenuToggle {
  width: 100%;
  cursor: pointer;
}
#housingSubmenu[hidden] {
  display: none !important;
}
#housingSubmenu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#housingSubmenu .housing-subnav {
  display: block;
  padding: 10px 12px;
  margin: 0;
  font-size: 13px;
  text-decoration: none;
  color: #b9cce0;
}
#housingSubmenu .housing-subnav:hover {
  background: #24415e;
  color: white;
}
@media (max-width: 768px) {
  #housingMenuToggle {
    width: auto;
  }
  #housingSubmenu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 8px;
    width: min(250px, 90vw);
    padding: 10px;
    background: #142c49;
    border-radius: 14px;
    box-shadow: 0 8px 30px #10223840;
    z-index: 1000;
  }
  #housingSubmenu .housing-subnav {
    display: block;
    flex: none;
    width: 100%;
    padding: 12px;
    text-align: left;
    color: white;
    font-size: 13px !important;
  }
  #housingSubmenu .housing-subnav::before {
    display: none;
  }
}
