body.portal-aligned .map-layout{grid-template-columns:minmax(0,1fr) 386px;max-width:none;align-items:stretch}
.map-timeline-panel{display:flex;flex-direction:column;min-width:0;min-height:610px;max-height:820px;height:clamp(610px,calc(100dvh - 300px),820px);overflow:hidden}
.map-room-selector{padding:13px 18px 10px;border-bottom:1px solid var(--line,#e4e9ed);display:flex;flex-direction:column;gap:4px}
.map-room-selector label{font-size:10px;color:#7f8b94;letter-spacing:.5px}.map-room-selector select{border:0;background:white;font-size:22px;font-weight:600;color:#303b42;width:100%;padding:0;min-height:29px}.map-room-selector small{font-size:10px;color:#93a0a9}
.map-room-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:10px 18px;gap:8px;border-bottom:1px solid var(--line,#e4e9ed)}.map-room-actions>span{font-size:11px}.map-state-busy{color:#966016}.map-state-free{color:#44775a}.map-room-actions>span:before{content:'●';margin-right:5px;font-size:8px}.map-room-actions .button{font-size:14px!important;min-height:44px;padding:11px 20px!important;white-space:nowrap}.map-room-actions .button svg{width:18px;height:18px}.map-room-actions [aria-disabled=true]{opacity:.5;pointer-events:none}
.map-agenda{display:flex;flex-direction:column;min-height:0;flex:1;padding:13px 16px 0}.map-agenda-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.map-agenda-title h2{font-size:15px;margin:0}.map-agenda-title>span{font-size:11px;color:#87959f}.map-agenda-date{display:flex;justify-content:space-between;gap:6px;font-size:10px;color:#8b98a2;margin:7px 0 10px}.map-agenda-date>span:last-child{color:#438da5;white-space:nowrap}
#map-schedule{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.map-timeline{position:relative;display:flex;flex-direction:column;gap:5px;justify-content:space-evenly;flex:1;min-height:0;padding-left:20px}
.map-timeline:before{content:'';position:absolute;left:6px;top:0;bottom:0;width:3px;background:linear-gradient(to bottom,#a4b2bd 0px,#a4b2bd var(--rail-past-stop,0px),var(--rail-now-color,#a4b2bd) var(--rail-past-stop,0px),var(--rail-now-color,#a4b2bd) var(--rail-now-stop,100%),#3894ad var(--rail-now-stop,100%),#3894ad 100%)}
.map-timeline-event{position:relative;display:flex;align-items:center;gap:9px;flex-shrink:0;border:1px solid #a9cfdc;border-left:3px solid #368da6;border-radius:6px;background:#e2f1f6;color:#23576a;padding:8px 10px;min-height:61px;text-decoration:none;box-shadow:0 2px 5px #28677e08}
a.map-timeline-event:hover{background:#d4eaf2;border-color:#388ca5;color:#23576a}.map-event-info{min-width:0;flex:1}.map-event-top{display:flex;align-items:center;justify-content:space-between;gap:6px}.map-event-time{font-size:12px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}.map-event-state{font-size:9px;white-space:nowrap}.map-event-title{display:block;font-size:12px;font-weight:600;line-height:1.4;margin-top:3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.map-event-meta{display:block;font-size:10px;line-height:1.4;margin-top:3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#52788a}.map-event-arrow{font-size:18px;color:#3c7c94;align-self:center}.map-event-marker{position:absolute;left:-20px;top:50%;transform:translateY(-50%);width:12px;height:12px;border:3px solid #fff;border-radius:50%;background:#398fa7;box-shadow:0 0 0 1px #71aabd;z-index:1}.map-timeline-event.is-past{background:#e6ebef;border-color:#cbd4db;border-left-color:#94a3af;color:#576977;box-shadow:none}.is-past .map-event-title{color:#5f707c;font-weight:500}.is-past .map-event-meta{color:#748592}.is-past .map-event-marker{background:#a2afb9;box-shadow:0 0 0 1px #bec8d0}
.map-timeline-event.is-current{background:#ffedc5;border:1px solid #dba743;border-left:4px solid #bb7c10;box-shadow:0 3px 12px #b47a1720;color:#70480e;min-height:75px}.is-current .map-event-title{font-size:13px;font-weight:650;color:#70480e}.is-current .map-event-meta{color:#8b671e}.is-current .map-event-state{background:#d9a238;color:white;padding:3px 7px;border-radius:3px;font-weight:650}.is-current .map-event-marker{left:-22px;width:16px;height:16px;background:#cd921f;border:4px solid #fff7e6;box-shadow:0 0 0 2px #d9a743}.is-next .map-event-state{color:#25758c;font-weight:600}
.map-now-divider{display:flex;align-items:center;gap:6px;font-size:9px;color:#98600d;font-weight:650;letter-spacing:.6px;min-height:15px;flex:none}.map-now-divider:before{content:'';width:5px;height:5px;background:#bf8118;border-radius:50%;flex:none}.map-now-divider:after{content:'';height:2px;background:#d9a342;flex:1}.map-all-day{display:flex;justify-content:space-between;align-items:center;width:100%;flex:none;border:1px solid #bcd6df;border-radius:5px;background:white;color:#3b8198;font:inherit;font-size:11px;padding:8px 10px;margin:9px 0 12px;cursor:pointer}.map-all-day:disabled{opacity:.5;cursor:default}.map-no-current,.map-empty{padding:12px 10px;color:#66808a;font-size:12px;line-height:1.5}.map-no-current{background:#edf8f1;border:1px dashed #bfdac8;border-radius:5px;margin:0}.map-event-release{font-size:9px;color:#667b85;display:block;margin-top:3px}
.map-day-dialog{position:fixed;inset:0 0 0 auto;margin:0;width:460px;max-width:95vw;height:100dvh;max-height:100dvh;border:0;border-left:1px solid #dce5eb;border-radius:0;background:white;padding:0;color:#39464f}.map-day-dialog[open]{display:flex;flex-direction:column}.map-day-dialog::backdrop{background:#24394766;backdrop-filter:blur(3px)}.map-day-dialog header{display:flex;align-items:center;justify-content:space-between;padding:22px;border-bottom:1px solid #e4e9ed;flex:none}.map-day-dialog header small{color:#7f8b94;font-size:11px}.map-day-dialog header h2{font-size:20px;margin:7px 0 0}.map-day-dialog footer{padding:15px 22px;border-top:1px solid #e4e9ed;font-size:11px;color:#7f8b94;flex:none}#map-day-list{overflow:auto;padding:18px 22px;min-height:0;flex:1;display:flex;flex-direction:column;gap:10px}#map-day-list .map-event-marker{display:none}
@media(min-width:1800px){body.portal-aligned .map-layout{grid-template-columns:minmax(0,1fr) 430px}.map-timeline-event{min-height:75px}.map-timeline-event.is-current{min-height:88px}.map-event-title{font-size:13px}.map-event-meta{font-size:11px}}
@media(max-width:1100px){body.portal-aligned .map-layout{grid-template-columns:minmax(0,1fr) 350px;gap:16px}.map-event-title{font-size:11px}.map-event-meta{font-size:9px}.is-current .map-event-title{font-size:12px}.map-room-actions{padding-inline:14px}.map-agenda{padding-inline:14px}}
@media(max-width:850px){body.portal-aligned .map-layout{grid-template-columns:1fr}.map-timeline-panel{height:620px;min-height:620px}.map-layout>.map-timeline-panel{margin-top:0}}
/* Match both panels and reserve enough height for five full rows at wide viewports. */
body.portal-aligned .map-layout{--map-panel-height:clamp(620px,calc(100dvh - 300px),820px)}
body.portal-aligned .map-layout>.panel:first-child{height:var(--map-panel-height);display:flex;flex-direction:column}
body.portal-aligned .map-layout>.panel:first-child>.panel-heading,body.portal-aligned .map-layout>.panel:first-child>.map-toolbar,body.portal-aligned .map-layout>.panel:first-child>.calendar-bottom{flex:none}
body.portal-aligned .map-layout .floorplan{width:min(calc(100% - 28px),calc((var(--map-panel-height) - 195px)*789/829));margin:auto;flex:none}
body.portal-aligned .map-layout .floorplan .map-room.selected{outline:0;border:2px solid #438da5;box-shadow:0 0 0 3px #438da514}
.map-timeline-panel{height:var(--map-panel-height);min-height:var(--map-panel-height);position:static}
@media(min-width:1800px){body.portal-aligned .map-layout{--map-panel-height:clamp(710px,calc(100dvh - 300px),820px)}}
@media(max-width:850px){body.portal-aligned .map-layout{--map-panel-height:620px}body.portal-aligned .map-layout .floorplan{width:min(calc(100% - 28px),400px)}}
/* Explicit line boxes avoid inherited portal line-height enlarging the rows. */
.map-event-top{line-height:1.25}.map-event-title{line-height:1.35}.map-event-meta{line-height:1.3}.map-room-selector select{line-height:1.3}
body.portal-aligned .map-layout{--map-panel-height:clamp(670px,calc(100dvh - 300px),820px)}
@media(min-width:1800px){body.portal-aligned .map-layout{--map-panel-height:clamp(710px,calc(100dvh - 300px),820px)}}
@media(max-width:850px){body.portal-aligned .map-layout{--map-panel-height:670px}}
.map-free-state{padding:15px 13px;border:1px solid #b5d7c5;border-left:3px solid #599f7b;border-radius:6px;background:#eaf6ef;color:#34694d;flex:none}.map-free-state strong{display:block;font-size:13px;font-weight:600;line-height:1.4}.map-free-state span{display:block;font-size:11px;line-height:1.5;margin-top:4px;color:#5d826c}

/* Rail transitions follow actual card geometry rather than fixed percentages. */
.map-timeline[data-now-state=busy]{--rail-now-color:#d39424;--rail-now-text:#98600d}
.map-timeline[data-now-state=free]{--rail-now-color:#599f7b;--rail-now-text:#44775a}
.map-timeline[data-now-state=unknown]{--rail-now-color:#a4b2bd;--rail-now-text:#6c7c88}
.map-timeline .map-now-divider{color:var(--rail-now-text,#6c7c88)}
.map-timeline .map-now-divider:before,.map-timeline .map-now-divider:after{background:var(--rail-now-color,#a4b2bd)}
/* Five reserved slots keep the present block centered for sparse days too. */
.map-timeline{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr) minmax(110px,1.3fr) minmax(0,1fr) minmax(0,1fr);gap:6px;align-content:stretch;justify-content:normal}
.map-timeline-slot{display:flex;align-items:center;min-height:0;min-width:0}.map-timeline-slot>.map-timeline-event{width:100%}
.map-timeline-center{display:grid;grid-template-rows:18px minmax(0,1fr);gap:4px;align-items:stretch}
.map-present-slot{display:flex;align-items:center;min-height:0}.map-present-slot>*{width:100%}
.map-after-current{flex:none;background:#edf7f0;border:1px solid #bedac9;border-left:3px solid #599f7b;border-radius:5px;padding:8px 11px;margin:8px 0 0;color:#3d7053}.map-after-current[hidden]{display:none}.map-after-current strong{display:block;font-size:10px;line-height:1.3;font-weight:500;color:#6a8b76}.map-after-current span{display:block;font-size:12px;line-height:1.35;font-weight:600;margin-top:2px}
body.portal-aligned .map-layout{--map-panel-height:clamp(720px,calc(100dvh - 300px),870px)}.map-timeline-panel{max-height:870px}
@media(min-width:1800px){body.portal-aligned .map-layout{--map-panel-height:clamp(760px,calc(100dvh - 300px),870px)}}
@media(max-width:850px){body.portal-aligned .map-layout{--map-panel-height:720px}}
