/* ------------------------------------------------------------------
   /preview/ — the home map as stacked full-screen floors.
   Floors never move: the incoming floor sits on top and a clip-path
   uncovers it, so the only thing travelling is the horizontal edge.
   ------------------------------------------------------------------ */

.wipe-main .stage{position:relative;height:100vh;height:100svh;overflow:hidden;background:var(--paper)}

/* every floor fills the same frame */
.layer{position:absolute;inset:0;background:var(--paper);visibility:hidden;overflow:hidden}
.layer.cur{visibility:visible;z-index:1}
.layer.in{visibility:visible;z-index:2;will-change:clip-path}
.lay-in{height:100%;display:flex;flex-direction:column;justify-content:center;
  padding:96px clamp(84px,9vw,150px) 64px clamp(28px,7vw,128px)}

/* floors inside the frame */
.layer .fl{border:0;padding:0;margin:0;scroll-margin:0}
.layer .fl-head{margin-bottom:22px}
.layer .fl-head h2{font-size:clamp(28px,3.2vw,44px)}
.layer .plan{max-width:none;margin:0 auto;width:100%}
.layer .wk-list{margin-top:26px;gap:16px 28px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.layer .wk img,.layer .wk .sw{width:44px;height:44px}
.layer .wk{gap:10px}

/* lobby */
.lobby .map-head{padding:0;align-items:flex-end;justify-content:flex-start;gap:32px 72px}
.lobby .map-intro{max-width:min(560px,100%)}
.enter{align-self:flex-start;margin-top:48px;font-size:12px;font-weight:700;letter-spacing:.06em;color:var(--ink);text-decoration:none;border-bottom:1px solid currentColor;padding-bottom:2px}
.enter:hover{color:#d42a1f}

/* the travelling edge */
.edge{position:absolute;left:0;right:0;top:0;height:1px;background:var(--ink);z-index:3;opacity:0;pointer-events:none}

/* fixed furniture: mark top left, floors on the right, cue at the bottom */
.st-mark{position:absolute;z-index:5;left:clamp(28px,7vw,128px);top:26px;display:block;transition:opacity .4s ease}
.st-mark img{display:block;width:96px;height:auto}
html.dark .st-mark img{filter:invert(1)}
.stage[data-at="0"] .st-mark{opacity:0;pointer-events:none}

.fl-nav{position:absolute;z-index:5;right:clamp(20px,3vw,44px);top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:18px}
.fl-nav a{display:flex;align-items:center;justify-content:flex-end;gap:10px;color:var(--mute);text-decoration:none;font-size:11px;letter-spacing:.06em}
.fl-nav a b{font-weight:700;padding-bottom:2px;border-bottom:1px solid transparent;transition:color .3s ease,border-color .3s ease}
.fl-nav a span{opacity:0;transform:translateX(6px);transition:opacity .25s ease,transform .25s ease;white-space:nowrap;font-weight:700}
.fl-nav a:hover span,.fl-nav a:focus-visible span{opacity:1;transform:none}
.fl-nav a:hover,.fl-nav a.on{color:var(--ink)}
.fl-nav a.on b{border-bottom-color:currentColor}

.fl-ind{position:absolute;z-index:5;left:clamp(28px,7vw,128px);bottom:20px;margin:0;font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--mute)}
.fl-ind i{display:inline-block;font-style:normal;animation:nudge 1.8s ease-in-out infinite}
@keyframes nudge{50%{transform:translateY(3px)}}
.fl-ind .tap{display:none}
@media (hover:none){.fl-ind .hov{display:none}.fl-ind .tap{display:inline}}

.wipe-after{padding-top:72px;padding-bottom:40px}

/* phones */
@media (max-width:760px){
  .lay-in{padding:64px 22px 44px 22px}
  .layer .fl-head{margin:24px 0 16px}
  .layer .wk-list{display:flex;overflow-x:auto;gap:14px;margin-top:18px;padding-bottom:6px;scrollbar-width:none}
  .layer .wk-list::-webkit-scrollbar{display:none}
  .layer .wk{flex:0 0 auto;max-width:190px}
  .layer .wk span span{display:none}
  .fl-nav{top:20px;right:18px;transform:none;flex-direction:row;gap:12px}
  .fl-nav a span{display:none}
  .st-mark{left:22px;top:22px}.st-mark img{width:76px}
  .fl-ind{left:22px;bottom:14px}
  .lobby .lay-in{justify-content:center}
  .lobby .key{grid-template-columns:1fr 1fr}
}
@media (prefers-reduced-motion:reduce){.fl-ind i{animation:none}}
.lay-in{width:100%;max-width:100%;box-sizing:border-box;min-width:0}
.layer .fl,.layer .wk-list{min-width:0;max-width:100%}
.lobby .map-intro{flex:1 1 320px}
/* text inside the frame wraps (the stage inherits nowrap from somewhere upstream) */
.stage .lay-in{white-space:normal}
.layer .fl-head h2{white-space:normal}
/* touch: the frame handles vertical swipes itself; thumbnails still slide sideways */
.wipe-main .stage{touch-action:none}
.layer .wk-list{touch-action:pan-x}
.wipe-main .stage>.layer{pointer-events:auto}

/* ---------------- fixed-footprint preview ---------------- */
/* rooms are colour, number and name; the picture lives in the wall label */
.layer .room.pv{transition:box-shadow .2s ease}
.layer .room.pv:hover,.layer .room.pv.on,.layer .room.info:hover,.layer .room.info.on{filter:none!important;box-shadow:inset 0 0 0 3px var(--ink)}
.layer .room.pv .no,.layer .room.pv .nm{display:block!important;background:none!important}
.room.void.closed{background:var(--paper) repeating-linear-gradient(45deg,transparent 0 6px,var(--line2) 6px 7px)}
html.dark .room.void.closed{background:var(--paper) repeating-linear-gradient(45deg,transparent 0 6px,#3a3a37 6px 7px)}

/* pictograms */
.pg{display:inline-block;width:18px;height:18px;vertical-align:middle;flex:none}
.room .no.pgno{background:none!important;padding:0}
.room .no.pgno .pg{width:26px;height:26px}
.lift-l .pg{width:14px;height:14px;margin-right:6px;vertical-align:-3px}
.key .pg{width:14px;height:14px;margin-right:10px;vertical-align:-3px}
.k-btn{font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;background:none;border:0;padding:0;cursor:pointer;border-bottom:1px solid currentColor}
.k-btn:hover{color:#d42a1f}

/* wall label */
.peek{position:absolute;z-index:6;top:50%;right:clamp(84px,7vw,120px);width:min(380px,28vw);transform:translate(30px,-50%);opacity:0;pointer-events:none;
  transition:opacity .3s ease,transform .35s cubic-bezier(.2,.7,.2,1);background:var(--paper);box-shadow:0 18px 50px rgba(0,0,0,.14)}
.peek.left{right:auto;left:clamp(28px,4vw,72px);transform:translate(-30px,-50%)}
.peek.on{opacity:1;transform:translate(0,-50%);pointer-events:auto}
.pk-img{position:relative;aspect-ratio:4/3;background:var(--tint);overflow:hidden}
.pk-img img,.pk-img .pk-sw{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.pk-sw{background:var(--pk-c);color:var(--pk-k);font-size:64px;font-weight:700;letter-spacing:-.03em;display:flex!important;align-items:flex-end;padding:18px;box-sizing:border-box}
.pk-tx{padding:18px 20px 20px;border-top:4px solid var(--pk-c,var(--ink))}
.pk-no{margin:0 0 6px;font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--mute)}
.pk-t{margin:0;font-size:22px;line-height:1.1;letter-spacing:-.01em;text-transform:none}
.pk-s{margin:8px 0 0;font-size:11px;letter-spacing:.05em;color:var(--mute)}
.pk-d{margin:10px 0 0;font-size:12px;line-height:1.5;letter-spacing:.02em}
.pk-d:empty{display:none}
.pk-go{display:inline-block;margin-top:14px;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--ink);text-decoration:none;border-bottom:1px solid currentColor}
.pk-x{display:none}

/* accessibility */
.a11y-btn{position:fixed;z-index:20;right:18px;bottom:18px;width:40px;height:40px;padding:0;border:0;background:none;cursor:pointer}
.a11y-btn .pg{width:40px;height:40px}
.a11y{position:fixed;z-index:21;right:18px;bottom:68px;width:min(300px,calc(100vw - 36px));background:var(--paper);color:var(--ink);box-shadow:0 18px 50px rgba(0,0,0,.18);padding:18px 18px 14px;font-size:12px;letter-spacing:.04em}
.a11y[hidden]{display:none}
.a11y-h{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-weight:700}
.a11y label{display:block;margin:0 0 12px;font-weight:700;cursor:pointer}
.a11y label small{display:block;margin:3px 0 0 24px;font-weight:400;color:var(--mute);text-transform:none;letter-spacing:.02em}
.a11y input{width:14px;height:14px;margin:0 8px 0 0;vertical-align:-2px;accent-color:#d42a1f}
.a11y-x{font:inherit;font-weight:700;text-transform:inherit;letter-spacing:inherit;background:none;border:0;border-bottom:1px solid currentColor;padding:0;color:inherit;cursor:pointer}
html.a11y-motion.dotcur,html.a11y-motion.dotcur *{cursor:auto!important}
html.a11y-motion .cur:not(.layer){display:none!important}
html.a11y-motion .fl-ind i{animation:none}
html.a11y-large .plan .room .no,html.a11y-large .plan .room .nm{font-size:13px!important}
html.a11y-large .map-intro p,html.a11y-large .wk b,html.a11y-large .key{font-size:15px}
.a11y-list-view{display:none;padding-top:40px;padding-bottom:40px}
.a11y-list-view h1{font-size:44px;margin:0 0 40px;text-transform:none}
.a11y-list-view h2{font-size:22px;margin:48px 0 0;text-transform:none;border-top:4px solid var(--ink);padding-top:14px}
html.a11y-list .wipe-main .stage{display:none}
html.a11y-list .a11y-list-view{display:block}

/* phones: the wall label is a sheet from the bottom */
@media (max-width:760px){
  .peek,.peek.left{position:fixed;left:0;right:0;top:auto;bottom:0;width:auto;transform:translateY(100%);box-shadow:0 -12px 40px rgba(0,0,0,.18);z-index:30}
  .peek.on{transform:none}
  .pk-img{aspect-ratio:16/9}
  .pk-tx{padding:14px 18px 22px}
  .pk-go{display:block;text-align:center;margin-top:16px;padding:12px;background:var(--ink);color:var(--paper);border:0}
  .pk-x{display:block;position:absolute;top:8px;right:8px;width:36px;height:36px;border:0;border-radius:50%;background:var(--paper);color:var(--ink);font-size:20px;line-height:1;cursor:pointer}
  .a11y-btn{right:14px;bottom:14px;width:34px;height:34px}.a11y-btn .pg{width:34px;height:34px}
  .a11y{right:14px;bottom:58px}
}

/* ---------------- v3: plan on the left, title and room list on the right ---------------- */
/* floors are transparent sheets: only their own blocks (plan, title, list) cover the floor below,
   so a change of floor swaps rooms, title and list without sweeping the whole page */
.layer:not(.lobby){background:transparent}
.layer.solid{background:var(--paper)}
.layer:not(.lobby) .lay-in{display:block;padding:76px clamp(84px,8vw,140px) 56px clamp(28px,5vw,96px)}
.layer .fl{display:grid;grid-template-columns:minmax(0,1fr) min(360px,28vw);gap:clamp(32px,4vw,72px);height:100%}
.fl-plan{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0}
.layer .fl-plan .plan{background:var(--paper);margin:0;flex:none;max-width:none}
.fl-side{background:var(--paper);display:flex;flex-direction:column;justify-content:center;min-height:0}
.layer .fl-head{display:block;margin:0 0 26px;padding-top:14px;border-top:6px solid var(--fc);background:var(--paper)}
.fl-n{margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:.08em}
.layer .fl-head h2{margin:0;font-size:clamp(34px,3.6vw,58px);line-height:.95;letter-spacing:-.03em}
.rl{list-style:none;margin:0;padding:0;overflow:auto;background:var(--paper);scrollbar-width:none}
.rl::-webkit-scrollbar{display:none}
.rl .wk{display:grid;grid-template-columns:34px 1fr;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);align-items:baseline}
.rl .wk b{font-size:12px;letter-spacing:.04em}
.rl .wk span{font-size:13px;font-weight:700;letter-spacing:.03em;line-height:1.25}
.rl .wk small{display:block;margin-top:3px;font-size:10px;font-weight:400;color:var(--mute);letter-spacing:.04em}
.rl .wk:hover span,.rl .wk.on span{color:#d42a1f}

/* the card takes the room list's place, arriving with the same top-down wipe */
.peek,.peek.left{right:auto;transform:none;opacity:1;box-shadow:none;overflow:auto;scrollbar-width:none;
  clip-path:inset(0 0 100% 0);transition:clip-path .45s cubic-bezier(.65,0,.35,1)}
.peek.on{transform:none;clip-path:inset(0 0 0 0)}
html.a11y-motion .peek{transition:none}

@media (max-width:760px){
  .layer:not(.lobby) .lay-in{padding:62px 18px 40px}
  .layer .fl{display:flex;flex-direction:column;gap:14px}
  .fl-side{display:contents}
  .layer .fl-head{order:0;margin:0}
  .layer .fl-head h2{font-size:30px}
  .fl-plan{order:1;flex:1 1 auto}
  .rl{order:2;flex:none;display:flex;gap:20px;overflow-x:auto;touch-action:pan-x;padding-bottom:4px}
  .rl .wk{display:flex;gap:6px;border:0;padding:4px 0;white-space:nowrap}
  .rl .wk small{display:none}
  .peek,.peek.left{clip-path:none!important;transform:translateY(100%)!important;transition:transform .35s cubic-bezier(.2,.7,.2,1)}
  .peek.on{transform:none!important}
}
.fl-nav a span{order:-1}

/* scroll-driven: the frame is pinned while its track scrolls past */
.wipe-main .track{position:relative}
.wipe-main .stage{position:sticky;top:0;touch-action:auto}
html.a11y-list .wipe-main .track{display:none}

/* ---------------- v5: header, plan and room list on one screen ---------------- */
.wipe-main .stage{display:flex;flex-direction:column}
.st-head{flex:none;position:relative;z-index:5;display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px clamp(32px,4vw,72px);align-items:end;
  padding:24px clamp(84px,8vw,140px) 0 clamp(28px,5vw,96px);background:var(--paper)}
.st-brand{display:block}.st-brand img{display:block;width:104px;height:auto;margin-bottom:10px}
html.dark .st-brand img{filter:invert(1)}
.st-head h1{margin:0;font-size:clamp(48px,5.4vw,84px);line-height:.78;letter-spacing:-.05em;text-transform:none}
.st-intro p{margin:0 0 12px;max-width:720px;font-size:12px;line-height:1.5;letter-spacing:.03em}
.st-intro .tap{display:none}
@media (hover:none){.st-intro .hov{display:none}.st-intro .tap{display:inline}}
.key-d summary{display:none}
.st-intro .key{grid-template-columns:repeat(4,auto);justify-content:start;gap:6px 26px;font-size:10px}
.st-intro .key .pg{width:13px;height:13px;margin-right:8px}
.floors{position:relative;flex:1 1 auto;min-height:0}
.layer:not(.lobby) .lay-in{padding-top:22px}
@media (max-width:1100px){.st-intro .key{grid-template-columns:repeat(3,auto)}}
@media (max-width:760px){
  .st-head{grid-template-columns:1fr;gap:8px;padding:18px 18px 0}
  .st-brand img{width:76px;margin-bottom:6px}
  .st-head h1{font-size:40px}
  .st-intro p{font-size:11px;margin-bottom:6px}
  .key-d summary{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.08em;cursor:pointer;border-bottom:1px solid currentColor;list-style:none}
  .key-d summary::-webkit-details-marker{display:none}
  .key-d[open]{position:absolute;z-index:8;left:18px;right:18px;background:var(--paper);padding:0 0 14px;box-shadow:0 14px 30px rgba(0,0,0,.12)}
  .st-intro .key{grid-template-columns:1fr 1fr;margin-top:10px;gap:8px 14px}
  .fl-nav{top:20px}
  .layer:not(.lobby) .lay-in{padding-top:14px}
}
.wipe-main .floors>.layer{pointer-events:auto}

/* one drawing language for the circulation: grey hairlines, red arrows, black labels with icons */
.layer .stair-l,.layer .plan .entry,.layer .lift-l{color:var(--ink);font-size:9px;font-weight:700;letter-spacing:.06em;line-height:1.35}
.layer .stair-l .pg{width:14px;height:14px;margin-bottom:4px}
.layer .plan .entry .en-a{font-style:normal;color:#d42a1f}
.layer .stair-l:hover{color:#d42a1f}
.st-intro .key .pg,.key .pg{margin-right:0}

/* reduce motion: no pinned frame and no wipe; the floors stack and the page scrolls as normal */
html.a11y-motion .wipe-main .track{height:auto!important}
html.a11y-motion .wipe-main .stage{position:relative;height:auto;display:block;overflow:visible}
html.a11y-motion .floors{flex:none}
html.a11y-motion .floors>.layer{position:relative;inset:auto;visibility:visible;height:100vh;height:100svh;min-height:640px;clip-path:none!important;opacity:1!important}
html.a11y-motion .floors>.layer+.layer{margin-top:24px}
html.a11y-motion .fl-nav{position:fixed}
html.a11y-motion .fl-ind{display:none}

/* key: the accessibility entry spaces its icon like the others */
.k-btn{display:inline-flex;align-items:center;gap:10px}

/* ---------- refinements across settings ---------- */
/* room names step aside in rooms too small for them (the number stays) */
@container (max-width:118px){.layer .room.pv .nm{display:none!important}}
@container (max-height:58px){.layer .room.pv .nm{display:none!important}}
@container (max-width:150px){html.a11y-large .layer .room.pv .nm{display:none!important}}
/* larger labels reach the room list, the card and the floor index too */
html.a11y-large .rl .wk span{font-size:15px}
html.a11y-large .rl .wk small{font-size:12px}
html.a11y-large .rl .wk b{font-size:14px}
html.a11y-large .fl-n{font-size:14px}
html.a11y-large .pk-t{font-size:26px}
html.a11y-large .pk-s,html.a11y-large .pk-go{font-size:13px}
html.a11y-large .pk-d{font-size:14px}
html.a11y-large .fl-nav a{font-size:13px}
html.a11y-large .layer .stair-l,html.a11y-large .layer .lift-l,html.a11y-large .layer .plan .entry{font-size:11px}
html.a11y-large .a11y{font-size:14px}
html.a11y-large .a11y label small{font-size:12px}
html.a11y-large .a11y-list-view .wk b{font-size:15px}
html.a11y-large .a11y-list-view .wk span span{font-size:13px}
@media (max-width:760px){
  html.a11y-large .plan .room .no,html.a11y-large .plan .room .nm{font-size:10px!important}
  html.a11y-large .st-intro p{font-size:13px}
  html.a11y-large .rl .wk span{font-size:14px}
}
/* breathing room between the header and the plan on shorter screens */
.layer:not(.lobby) .lay-in{padding-top:34px}
@media (max-height:780px) and (min-width:761px){.st-intro .key{gap:4px 22px}.st-intro p{margin-bottom:8px}.layer:not(.lobby) .lay-in{padding-top:40px;padding-bottom:40px}}
@media (max-width:760px){.layer:not(.lobby) .lay-in{padding-top:16px}}
/* list view carries the mark */
.a11y-list-view .lv-mark img{display:block;width:104px;height:auto;margin:0 0 28px}
html.dark .a11y-list-view .lv-mark img{filter:invert(1)}
.a11y-list-view .wk-list{margin-top:22px}
/* phones: the resting "you are here" keeps to its dot so it never covers the annex; the floor index gets a backing when floors stack */
@media (max-width:760px){
  .pl-m .here:not(.show) b{display:none}
  html.a11y-motion .fl-nav{background:var(--paper);padding:6px 8px;right:10px;top:12px}
}
@media (max-width:760px){.pl-m .here b{display:none}}
/* entrance, MoMA-style: a solid black arrow in the doorway pointing in, label beside it */
.plan .entry{display:flex;align-items:center;gap:6px;transform:translate(-7px,-100%)!important;line-height:1;white-space:nowrap}
.plan .entry .en-a{width:12px;height:14px;flex:none;fill:var(--ink)}
