*{box-sizing:border-box}
:root{--bg:#6e6e6e;--warm:#f2f0ea;--soft:#b8b6af;--hint:#8a8882;--fixed:#181817}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--warm);font-family:'PT Serif',Georgia,'Times New Roman',serif;-webkit-text-size-adjust:100%}
body{overscroll-behavior:none}
#app{position:fixed;inset:0;overflow:hidden;background:var(--bg);cursor:grab;touch-action:none}#app.dragging{cursor:grabbing}
#world{position:absolute;left:0;top:0;width:1px;height:1px;transform-origin:0 0;will-change:transform}
.node{position:absolute;user-select:none;-webkit-user-select:none}.clickable{cursor:pointer}.spatial-unit{cursor:grab;touch-action:none}.spatial-unit.moving{cursor:grabbing}.spatial-unit.moving *{transition:none!important}
.face-threshold{width:340px}.face-photo{width:340px;height:auto;display:block;object-fit:contain;box-shadow:0 24px 90px rgba(0,0,0,.28)}
.face-threshold.missing-image{width:340px;height:420px;background:rgba(242,240,234,.08);display:flex;align-items:center;justify-content:center}.face-threshold.missing-image:after{content:'FACE IMAGE';font:10px Arial,sans-serif;letter-spacing:.16em;color:rgba(242,240,234,.3)}
.territory-kicker{font:11px/1.2 Arial,Helvetica,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:var(--soft)}
.room-title-large{font-size:42px;line-height:1.05;margin:8px 0;color:var(--warm);font-style:italic}.room-title{font-size:32px;line-height:1.05;color:var(--warm);font-style:italic}.room-meta{font-size:25px;line-height:1.25;color:var(--soft);letter-spacing:.02em}.work-title,.work-detail-title{font-size:32px;line-height:1.05;color:var(--warm);display:inline-block;cursor:pointer}.work-meta{font-size:20px;line-height:1.3;color:var(--soft);letter-spacing:.015em}
.exhibition-title{width:680px}.exhibition-hover-text{position:absolute;left:590px;top:0;width:500px;padding-left:34px;opacity:0;transform:translateX(-12px);transition:opacity .35s ease,transform .35s ease;pointer-events:none}.exhibition-title.is-revealed .exhibition-hover-text{opacity:1;transform:translateX(0);pointer-events:auto}.exhibition-hover-text .lead{font:12px/1.2 Arial,Helvetica,sans-serif;letter-spacing:.11em;text-transform:uppercase;color:var(--soft);margin-bottom:12px}.exhibition-hover-text .body{font-size:15px;line-height:1.55;color:rgba(242,240,234,.94)}
.room{width:390px;min-height:80px;padding:8px 0;background:transparent;border:0;display:flex;align-items:flex-start;gap:22px}.room:hover{transform:translateX(4px)}.room-text{min-width:0;position:relative}.room-info-trigger:hover,.work-info-trigger:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}.room-description{position:absolute;left:calc(100% + 34px);top:0;width:390px;font-size:14px;line-height:1.5;color:rgba(242,240,234,.9);opacity:0;transform:translateX(-10px);pointer-events:none;transition:opacity .25s ease,transform .25s ease}.room-info-trigger:hover~.room-description,.room-text:hover .room-description,.room.is-revealed .room-description{opacity:1;transform:none;pointer-events:auto}
.room-gallery-node{width:min(1320px,calc(100vw - 40px));position:relative}.room-gallery{width:100%;overflow:hidden}.room-gallery-scroll{display:flex;gap:18px;width:100%;overflow:visible;scrollbar-width:none;cursor:default;overscroll-behavior-x:contain;touch-action:auto}.room-gallery-scroll::-webkit-scrollbar{display:none}.room-gallery-item{flex:1 1 0;width:calc((100% - 36px) / 3);height:auto;aspect-ratio:3 / 2;margin:0;display:flex;align-items:center;justify-content:center;min-width:0}.room-gallery-item img{display:block;width:100%;height:auto;max-width:none;max-height:none;aspect-ratio:3 / 2;object-fit:cover;user-select:none;-webkit-user-drag:none}.room-gallery-placeholder{width:450px;height:300px;aspect-ratio:3 / 2;border:1px solid rgba(242,240,234,.22);background:rgba(242,240,234,.025)}
.work-image-node{display:flex;align-items:flex-start;gap:28px;width:820px;min-height:210px}.work-image-trigger{width:320px;flex:0 0 320px;cursor:pointer}.work-room-image{width:320px;height:200px;object-fit:contain;display:block}.work-room-placeholder{width:320px;height:200px;border:1px solid rgba(242,240,234,.22);background:rgba(242,240,234,.025);display:block}.side-reveal{width:390px;padding-top:2px}.work-description{font-size:15px;line-height:1.5;color:rgba(242,240,234,.9);margin-top:15px;display:block;visibility:visible;opacity:1}.relation-link{cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px;pointer-events:auto}.relation-link:hover{opacity:.55}
.work-detail-gallery{width:min(1080px,calc(100vw - 80px));display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:46px;align-items:start}.work-gallery{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start;gap:24px;width:100%;max-height:74vh;overflow:auto;padding-right:4px}.work-gallery figure{margin:0;display:block;flex:0 0 auto;width:auto;min-width:0}.work-gallery img{display:block;width:auto;height:auto;max-width:100%;max-height:520px;object-fit:contain;cursor:zoom-in}.gallery-placeholder{width:100%;height:300px;border:1px solid rgba(242,240,234,.22);background:rgba(242,240,234,.025)}.gallery-count-1{grid-template-columns:1fr}.gallery-count-2{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-count-3{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-count-3 figure:first-child{grid-column:1/-1}.gallery-count-4{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-count-5{grid-template-columns:repeat(6,minmax(0,1fr))}.gallery-count-5 figure{grid-column:span 2}.gallery-count-5 figure:nth-child(4){grid-column:2/span 2}.gallery-count-5 figure:nth-child(5){grid-column:4/span 2}.gallery-count-6{grid-template-columns:repeat(3,minmax(0,1fr))}.work-detail-info{width:330px;padding-top:2px}.work-medium{font-size:13px;line-height:1.45;color:var(--soft);margin-top:10px;letter-spacing:.045em;font-style:italic}.work-detail-info .work-description{display:block;margin-top:15px;font-size:15px;line-height:1.55}.detail-chapters{margin-top:18px;font:12px/1.5 Arial,Helvetica,sans-serif;color:var(--soft)}.external-links{margin-top:18px;font:12px/1.5 Arial,Helvetica,sans-serif}.external-link{color:var(--warm);text-decoration:none}.external-link:hover{text-decoration:underline;text-underline-offset:4px}.external-link.disabled{color:var(--soft)}
#overlay{position:fixed;left:24px;bottom:20px;right:24px;display:flex;justify-content:space-between;align-items:end;pointer-events:none;z-index:10}#identity{display:block;font:13px/1.45 Arial,Helvetica,sans-serif;max-width:430px;color:var(--fixed);text-decoration:none;pointer-events:auto;cursor:pointer}#identity .identity-name{color:var(--fixed)}#identity:hover{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
#hint{font:10px/1.45 Arial,Helvetica,sans-serif;color:#8a8882!important;text-align:right;max-width:360px}.desktop-hint{display:inline}.mobile-hint{display:none}
#nav{position:fixed;top:18px;right:20px;z-index:30;pointer-events:auto}#nav-map{display:inline-block;color:var(--soft);text-decoration:none;font:15px/1.2 Arial,Helvetica,sans-serif;letter-spacing:.02em;cursor:pointer}#nav-map:hover{color:var(--warm);text-decoration:underline;text-underline-offset:5px}
#image-inspection{position:fixed;inset:0;background:rgba(15,15,14,.94);z-index:100;display:none;align-items:center;justify-content:center;padding:5vh 5vw;cursor:zoom-out}#image-inspection.is-open{display:flex}#image-inspection img{max-width:90vw;max-height:90vh;width:auto;height:auto;object-fit:contain}#image-inspection button{position:absolute;top:18px;right:24px;border:0;background:none;color:var(--warm);font:32px/1 Arial,sans-serif;cursor:pointer}
.relation-deep{width:520px}.relation-deep h1{font-size:40px;font-weight:400;margin:10px 0}.relation-deep p{font-size:15px;line-height:1.5;color:var(--soft)}
@media (max-width:700px){
 #app{cursor:default}.face-threshold{width:clamp(250px,72vw,310px)}.face-photo{width:100%;max-width:310px;box-shadow:0 18px 55px rgba(0,0,0,.25)}
 .territory-kicker{font-size:9px}.room-title-large{font-size:clamp(27px,7.2vw,38px);line-height:1.02;max-width:72vw}.exhibition-title{width:78vw;max-width:420px}.exhibition-hover-text{position:relative;left:auto;top:auto;width:min(78vw,420px);padding:18px 0 0;transform:translateY(8px)}.exhibition-hover-text .lead{font-size:9px;margin-bottom:8px}.exhibition-hover-text .body{font-size:13px;line-height:1.48}
 .room{width:82vw;min-width:240px;max-width:420px;padding:5px 0;gap:16px}.room-title{font-size:clamp(28px,7.2vw,34px)}.room-meta{font-size:25px}.room-description{position:relative;left:auto;top:auto;width:min(82vw,420px);padding-top:10px;font-size:13px;opacity:0;transform:translateY(5px)}.room.is-revealed .room-description,.room-text:hover .room-description{opacity:1;transform:none}.work-title,.work-detail-title{font-size:28px}.work-meta{font-size:18px;line-height:1.35}
 .room-gallery-node{width:calc(100vw - 28px)!important;height:150px!important}
 .room-gallery{width:100%;height:150px;overflow:hidden}
 .room-gallery-scroll{gap:10px;width:100%;height:150px;overflow-x:auto;overflow-y:hidden;touch-action:pan-x}
 .room-gallery-item{width:225px;height:150px;flex:0 0 225px}
 .room-gallery-item img{display:block;width:225px;height:150px;max-width:none;max-height:none;aspect-ratio:3 / 2;object-fit:cover}
 .room-gallery-placeholder{width:225px;height:150px;aspect-ratio:3 / 2}

 /* Phone room rows: one fixed geometry for every room. */
 .work-image-node{
   display:grid!important;
   grid-template-columns:108px minmax(0,1fr)!important;
   column-gap:14px!important;
   align-items:start!important;
   width:min(calc(100vw - 28px),390px)!important;
   max-width:min(calc(100vw - 28px),390px)!important;
   height:112px!important;
   min-height:112px!important;
   box-sizing:border-box!important;
   overflow:hidden!important;
 }
 .work-image-trigger{
   width:108px!important;
   height:68px!important;
   min-width:108px!important;
 }
 .work-room-image,
 .work-room-placeholder{
   display:block!important;
   width:108px!important;
   height:68px!important;
   max-width:108px!important;
   max-height:68px!important;
   aspect-ratio:auto!important;
   object-fit:contain!important;
   box-sizing:border-box!important;
 }
 .side-reveal{
   width:auto!important;
   min-width:0!important;
   max-width:none!important;
   height:112px!important;
   padding:0!important;
   overflow:hidden!important;
 }
 .work-title{
   display:block!important;
   width:100%!important;
   margin:0 0 4px!important;
   font-size:13.5px!important;
   line-height:1.12!important;
   max-height:31px!important;
   overflow:hidden!important;
 }
 .work-meta{
   display:block!important;
   width:100%!important;
   margin:0!important;
   font-size:9px!important;
   line-height:1.25!important;
   max-height:12px!important;
   overflow:hidden!important;
 }
 .work-description{
   display:-webkit-box!important;
   visibility:visible!important;
   opacity:1!important;
   width:100%!important;
   margin:6px 0 0!important;
   font-size:8.5px!important;
   line-height:1.32!important;
   max-height:34px!important;
   overflow:hidden!important;
   -webkit-line-clamp:3!important;
   -webkit-box-orient:vertical!important;
 }
 .work-detail-gallery{width:82vw;display:block}.work-gallery{grid-template-columns:1fr!important;gap:12px;max-height:none;overflow:visible;padding-right:0}.work-gallery img{max-height:none}.gallery-placeholder{height:240px}.work-detail-info{width:100%;padding:18px 0 4px}.work-detail-info .work-meta{font-size:18px}.work-detail-info .work-description{font-size:14px;line-height:1.5}.detail-chapters,.external-links{font-size:11px}
 #overlay{left:16px;right:16px;bottom:14px}#identity{font-size:11px;max-width:64vw}#hint{font-size:8px!important;max-width:35vw;color:#8a8882!important}.desktop-hint{display:inline}.mobile-hint{display:none}#nav{top:14px;right:14px}#nav-map{font-size:16px}
 #image-inspection{padding:3vh 3vw}#image-inspection img{max-width:94vw;max-height:94vh}
}

/* v33: exhibition title follows the same spatial/hover reveal principle as room titles on touch layouts. */
@media (max-width:700px){.exhibition-title:hover .exhibition-hover-text{opacity:1;transform:none;pointer-events:auto}.exhibition-title:active .exhibition-hover-text{opacity:1;transform:none;pointer-events:auto}}


/* PHONE DEVICE OVERRIDE — independent of CSS viewport/media-query behavior.
   This is intentionally scoped to actual touch devices with phone-sized screens. */
.phone-device .work-image-node{
  display:grid!important;
  grid-template-columns:108px minmax(0,1fr)!important;
  column-gap:14px!important;
  align-items:start!important;
  width:min(calc(100vw - 28px),390px)!important;
  max-width:min(calc(100vw - 28px),390px)!important;
  height:112px!important;
  min-height:112px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.phone-device .work-image-trigger{
  width:108px!important;height:68px!important;min-width:108px!important;
}
.phone-device .work-room-image,
.phone-device .work-room-placeholder{
  display:block!important;
  width:108px!important;height:68px!important;
  max-width:108px!important;max-height:68px!important;
  object-fit:contain!important;box-sizing:border-box!important;
}
.phone-device .side-reveal{
  width:auto!important;min-width:0!important;max-width:none!important;
  height:112px!important;padding:0!important;overflow:hidden!important;
}
.phone-device .work-title{
  display:block!important;width:100%!important;margin:0 0 4px!important;
  font-size:13.5px!important;line-height:1.12!important;
  max-height:31px!important;overflow:hidden!important;
}
.phone-device .work-meta{
  display:block!important;width:100%!important;margin:0!important;
  font-size:9px!important;line-height:1.25!important;
  max-height:12px!important;overflow:hidden!important;
}
.phone-device .work-description{
  display:-webkit-box!important;visibility:visible!important;opacity:1!important;
  width:100%!important;margin:6px 0 0!important;
  font-size:8.5px!important;line-height:1.32!important;
  max-height:34px!important;overflow:hidden!important;
  -webkit-line-clamp:3!important;-webkit-box-orient:vertical!important;
}

/* Flexible work documentation: ignore fixed count grids; preserve each image ratio. */
.work-gallery.gallery-count-1,.work-gallery.gallery-count-2,.work-gallery.gallery-count-3,.work-gallery.gallery-count-4,.work-gallery.gallery-count-5,.work-gallery.gallery-count-6{grid-template-columns:none}
.work-detail-gallery .work-gallery-larger{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start;gap:24px}
.work-detail-gallery .work-gallery-larger .gallery-item{flex:0 0 auto;width:auto}
.work-detail-gallery .work-gallery-larger img{width:auto;height:auto;max-width:680px;max-height:520px}
@media (max-width:700px){.work-detail-gallery .work-gallery-larger{display:flex;flex-direction:column;flex-wrap:nowrap;gap:18px;max-height:none;overflow:visible}.work-detail-gallery .work-gallery-larger img{width:auto;height:auto;max-width:100%;max-height:70vh}}


/* FINAL SHARED ROOM PANORAMA SCALE */
.room-gallery-node{
  width:min(1320px,calc(100vw - 120px)) !important;
  max-width:1320px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.room-gallery{
  width:100% !important;
  overflow:hidden !important;
}
.room-gallery-scroll{
  display:flex !important;
  gap:18px !important;
  width:100% !important;
  overflow:visible !important;
  justify-content:center !important;
}
.room-gallery-item{
  flex:0 0 428px !important;
  width:428px !important;
  min-width:428px !important;
  height:auto !important;
  aspect-ratio:3 / 2 !important;
}
.room-gallery-item img{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:3 / 2 !important;
  object-fit:cover !important;
}
@media (max-width:700px){
  .room-gallery-node{
    width:100% !important;
    max-width:none !important;
  }
  .room-gallery-scroll{
    width:max-content !important;
    justify-content:flex-start !important;
    gap:12px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:0 18px !important;
  }
  .room-gallery-item{
    flex:0 0 78vw !important;
    width:78vw !important;
    min-width:78vw !important;
    aspect-ratio:3 / 2 !important;
  }
}


/* PHONE — straightforward editorial layout */
@media (max-width:700px){
  .room-gallery-node{
    width:calc(100vw - 28px)!important;
    max-width:390px!important;
    height:180px!important;
  }
  .room-gallery{
    width:100%!important;
    height:180px!important;
    overflow:hidden!important;
  }
  .room-gallery-scroll{
    width:max-content!important;
    min-width:100%!important;
    height:180px!important;
    display:flex!important;
    gap:12px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    justify-content:flex-start!important;
    padding:0!important;
    touch-action:pan-x!important;
  }
  .room-gallery-item{
    flex:0 0 calc(100vw - 28px)!important;
    width:calc(100vw - 28px)!important;
    max-width:390px!important;
    height:180px!important;
    aspect-ratio:auto!important;
  }
  .room-gallery-item img{
    width:100%!important;
    height:180px!important;
    object-fit:cover!important;
    aspect-ratio:auto!important;
  }

  /* Work detail becomes a normal, readable mobile page inside the map. */
  .phone-device .work-detail-gallery{
    display:block!important;
    width:calc(100vw - 28px)!important;
    max-width:390px!important;
    height:calc(100vh - 96px)!important;
    max-height:calc(100vh - 96px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:0 0 36px!important;
    box-sizing:border-box!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }
  .phone-device .work-detail-gallery .work-gallery{
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    max-height:none!important;
    overflow:visible!important;
    gap:14px!important;
    padding:0!important;
    margin:0 0 24px!important;
  }
  .phone-device .work-detail-gallery .gallery-item{
    width:100%!important;
    flex:0 0 auto!important;
    margin:0!important;
  }
  .phone-device .work-detail-gallery .gallery-item img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    max-height:none!important;
    object-fit:contain!important;
  }
  .phone-device .work-detail-info{
    display:block!important;
    width:100%!important;
    padding:0!important;
  }
  .phone-device .work-detail-title{
    display:block!important;
    width:100%!important;
    font-size:25px!important;
    line-height:1.08!important;
    margin:0 0 7px!important;
  }
  .phone-device .work-meta{
    font-size:13px!important;
    line-height:1.35!important;
    margin:0 0 8px!important;
  }
  .phone-device .work-medium{
    font-size:12px!important;
    line-height:1.45!important;
    margin:0 0 12px!important;
    letter-spacing:.03em!important;
  }
  .phone-device .work-description{
    font-size:14px!important;
    line-height:1.5!important;
    margin:0!important;
    max-height:none!important;
    overflow:visible!important;
    display:block!important;
  }
  .phone-device .external-links{
    font-size:12px!important;
    line-height:1.5!important;
    margin-top:18px!important;
  }
}

/* v16 PHONE-ONLY WORK-LEVEL GALLERY
   Desktop remains exactly as v14.
   Phone: one fixed image viewport; vertical scroll inside gallery; info stays below. */
@media (max-width:700px){
  .phone-device .work-detail-gallery{
    width:calc(100vw - 28px) !important;
    max-width:390px !important;
    height:calc(100vh - 72px) !important;
    max-height:calc(100vh - 72px) !important;
    display:flex !important;
    flex-direction:column !important;
    gap:14px !important;
    overflow:visible !important;
    padding:0 !important;
  }
  .phone-device .work-detail-gallery .work-gallery-larger,
  .phone-device .work-detail-gallery .work-gallery{
    flex:1 1 auto !important;
    min-height:0 !important;
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    display:flex !important;
    flex-direction:column !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:0 !important;
    padding:0 !important;
    margin:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch !important;
    scroll-snap-type:y mandatory !important;
    scrollbar-width:thin;
  }
  .phone-device .work-detail-gallery .work-gallery-larger .gallery-item,
  .phone-device .work-detail-gallery .work-gallery .gallery-item{
    flex:0 0 100% !important;
    width:100% !important;
    height:100% !important;
    min-height:100% !important;
    margin:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
    scroll-snap-align:start !important;
    scroll-snap-stop:always !important;
  }
  .phone-device .work-detail-gallery .work-gallery-larger .gallery-item img,
  .phone-device .work-detail-gallery .work-gallery .gallery-item img{
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    cursor:zoom-in !important;
  }
  .phone-device .work-detail-gallery .work-detail-info{
    flex:0 0 auto !important;
    width:100% !important;
    padding:0 !important;
    box-sizing:border-box !important;
  }
}



/* PHONE WORK DETAIL — actual source fix (2026-10-31)
   The compact work-list rules above intentionally clamp .work-meta and .work-description.
   Reset those clamps only inside the full work-detail view. The entire detail view,
   including its text and links, is the scroll container so nothing is pushed below #app. */
@media (max-width:700px){
  html.phone-device #app.work-level{touch-action:pan-y!important}
  html.phone-device .work-detail-gallery{
    display:block!important;
    width:calc(100vw - 48px)!important;
    max-width:520px!important;
    height:calc(100dvh - 112px)!important;
    max-height:calc(100dvh - 112px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
    padding:0 0 36px!important;
    box-sizing:border-box!important;
  }
  html.phone-device .work-detail-gallery .work-gallery,
  html.phone-device .work-detail-gallery .work-gallery-larger{
    display:flex!important;
    flex:0 0 auto!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:16px!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    margin:0 0 28px!important;
    padding:0!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
  }
  html.phone-device .work-detail-gallery .gallery-item,
  html.phone-device .work-detail-gallery .work-gallery-larger .gallery-item{
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    overflow:visible!important;
  }
  html.phone-device .work-detail-gallery .gallery-item img,
  html.phone-device .work-detail-gallery .work-gallery-larger .gallery-item img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    max-height:58vh!important;
    object-fit:contain!important;
  }
  html.phone-device .work-detail-gallery .work-detail-info{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    box-sizing:border-box!important;
    padding:0 0 24px!important;
  }
  html.phone-device .work-detail-gallery .work-detail-title{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    max-height:none!important;
    font-size:clamp(23px,6vw,28px)!important;
    line-height:1.12!important;
  }
  html.phone-device .work-detail-gallery .work-detail-info .work-meta{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:8px 0 10px!important;
    padding:0!important;
    overflow:visible!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    font-size:14px!important;
    line-height:1.45!important;
  }
  html.phone-device .work-detail-gallery .work-medium,
  html.phone-device .work-detail-gallery .work-description,
  html.phone-device .work-detail-gallery .detail-chapters,
  html.phone-device .work-detail-gallery .external-links{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin-top:12px!important;
    overflow:visible!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    -webkit-line-clamp:unset!important;
    -webkit-box-orient:initial!important;
    font-size:14px!important;
    line-height:1.5!important;
    box-sizing:border-box!important;
  }
}

/* PHONE ROOM LEVEL — refined editorial index and native horizontal panorama */
@media (max-width:700px){
  #app{touch-action:pan-x!important}
  .phone-device .room-gallery-node{
    width:calc(100vw - 36px)!important;
    max-width:430px!important;
    height:auto!important;
  }
  .phone-device .room-gallery{
    width:100%!important;
    height:auto!important;
    overflow:hidden!important;
  }
  .phone-device .room-gallery-scroll{
    display:flex!important;
    width:max-content!important;
    min-width:100%!important;
    height:auto!important;
    gap:12px!important;
    padding:0 0 8px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    justify-content:flex-start!important;
    scroll-snap-type:x mandatory!important;
    scroll-padding-inline:0!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain!important;
    touch-action:pan-x!important;
    scrollbar-width:none!important;
  }
  .phone-device .room-gallery-scroll::-webkit-scrollbar{display:none!important}
  .phone-device .room-gallery-item{
    flex:0 0 calc(100vw - 36px)!important;
    width:calc(100vw - 36px)!important;
    max-width:430px!important;
    min-width:calc(100vw - 36px)!important;
    height:auto!important;
    aspect-ratio:16/9!important;
    scroll-snap-align:start!important;
  }
  .phone-device .room-gallery-item img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    aspect-ratio:16/9!important;
    object-fit:cover!important;
  }
  .phone-device .work-image-node{
    grid-template-columns:104px minmax(0,1fr)!important;
    column-gap:18px!important;
    align-items:start!important;
    height:116px!important;
    min-height:116px!important;
    overflow:visible!important;
  }
  .phone-device .work-image-trigger{width:104px!important;height:104px!important;min-width:104px!important}
  .phone-device .work-room-image,.phone-device .work-room-placeholder{
    width:104px!important;height:104px!important;max-width:104px!important;max-height:104px!important;
    object-fit:contain!important;
  }
  .phone-device .side-reveal{height:auto!important;min-height:0!important;overflow:visible!important;padding-top:2px!important}
  .phone-device .work-title{
    display:block!important;width:100%!important;margin:0 0 8px!important;
    font-size:clamp(18px,5vw,21px)!important;line-height:1.16!important;
    max-height:none!important;overflow:visible!important;white-space:normal!important;
  }
  .phone-device .work-meta{
    display:block!important;width:100%!important;margin:0!important;
    font-size:12px!important;line-height:1.4!important;letter-spacing:.01em!important;
    max-height:none!important;overflow:visible!important;white-space:normal!important;
  }
  .phone-device .work-description{display:none!important}
}


/* PHONE PANORAMA — timed crossfade, no nested swipe gesture */
@media (max-width:700px){
  .phone-device .room-gallery-node{height:clamp(150px, 48vw, 230px)!important;overflow:visible!important}
  .phone-device .room-gallery{height:100%!important;position:relative!important;overflow:hidden!important}
  .phone-device .room-gallery-scroll{
    position:relative!important;display:block!important;width:100%!important;min-width:0!important;
    height:100%!important;overflow:hidden!important;padding:0!important;margin:0!important;
    touch-action:pan-y!important;gap:0!important;
  }
  .phone-device .room-gallery-item{
    position:absolute!important;inset:0!important;width:100%!important;min-width:0!important;
    height:100%!important;aspect-ratio:auto!important;margin:0!important;flex:none!important;
    opacity:0!important;visibility:hidden!important;transition:opacity 1.4s cubic-bezier(.22,.61,.36,1),visibility 1.4s linear!important;
    scroll-snap-align:none!important;
  }
  .phone-device .room-gallery-item.is-active{opacity:1!important;visibility:visible!important}
  .phone-device .room-gallery-item img{
    display:block!important;width:100%!important;height:100%!important;max-width:none!important;
    max-height:none!important;aspect-ratio:auto!important;object-fit:cover!important;
  }
  .phone-device .room-gallery-counter{
    position:absolute!important;right:10px!important;bottom:9px!important;z-index:3!important;
    color:rgba(255,255,255,.88)!important;font-family:inherit!important;font-size:11px!important;line-height:1.2!important;
    letter-spacing:.08em!important;text-shadow:0 1px 5px rgba(0,0,0,.45)!important;
    pointer-events:none!important;
  }
}
@media (prefers-reduced-motion:reduce){
  .phone-device .room-gallery-item{transition:none!important}
}


/* PHONE ROOM INDEX — fit the full room list above the fixed footer */
@media (max-width:700px){
  .phone-device .work-image-node{
    grid-template-columns:80px minmax(0,1fr)!important;
    column-gap:14px!important;
    height:88px!important;min-height:88px!important;
    overflow:visible!important;
  }
  .phone-device .work-image-trigger{width:80px!important;height:80px!important;min-width:80px!important}
  .phone-device .work-room-image,.phone-device .work-room-placeholder{
    width:80px!important;height:80px!important;max-width:80px!important;max-height:80px!important;
    object-fit:contain!important;
  }
  .phone-device .work-title{
    font-size:18px!important;line-height:1.14!important;margin:0 0 5px!important;
  }
  .phone-device .work-meta{font-size:11px!important;line-height:1.32!important}
}


/* FINAL PHONE ROOM COMPOSITION — 3:2 panorama and non-overlapping editorial index */
@media (max-width:700px){
  .phone-device .room-gallery-node{height:auto!important;overflow:visible!important}
  .phone-device .room-gallery{height:auto!important;aspect-ratio:3 / 2!important;overflow:hidden!important}
  .phone-device .room-gallery-scroll{height:100%!important;aspect-ratio:3 / 2!important}
  .phone-device .room-gallery-item{inset:0!important;width:100%!important;height:100%!important;aspect-ratio:3 / 2!important}
  .phone-device .room-gallery-item img{width:100%!important;height:100%!important;aspect-ratio:3 / 2!important;object-fit:contain!important}
  .phone-device .work-image-node{grid-template-columns:64px minmax(0,1fr)!important;column-gap:14px!important;height:72px!important;min-height:72px!important;overflow:visible!important}
  .phone-device .work-image-trigger{width:64px!important;height:64px!important;min-width:64px!important}
  .phone-device .work-room-image,.phone-device .work-room-placeholder{width:64px!important;height:64px!important;max-width:64px!important;max-height:64px!important;object-fit:contain!important}
  .phone-device .side-reveal{min-width:0!important;max-width:100%!important;overflow:visible!important}
  .phone-device .work-title{font-size:17px!important;line-height:1.18!important;overflow-wrap:anywhere!important}
  .phone-device .work-meta{font-size:11px!important;line-height:1.35!important;overflow-wrap:anywhere!important}
}

/* DESKTOP ROOM PANORAMA — one large editorial image, navigable as a sequence */
@media (min-width:701px){
  .room-gallery-node{width:min(820px,52vw)!important;max-width:820px!important;}
  .room-gallery{width:100%!important;height:auto!important;aspect-ratio:3/2!important;position:relative!important;overflow:hidden!important;background:rgba(20,20,20,.035)!important;}
  .room-gallery-scroll{position:relative!important;display:block!important;width:100%!important;height:100%!important;overflow:hidden!important;}
  .room-gallery-item{position:absolute!important;inset:0!important;display:block!important;width:100%!important;min-width:0!important;height:100%!important;aspect-ratio:3/2!important;margin:0!important;opacity:0!important;visibility:hidden!important;transition:opacity .75s cubic-bezier(.22,.61,.36,1),visibility .75s linear!important;}
  .room-gallery-item.is-active{opacity:1!important;visibility:visible!important;}
  .room-gallery-item img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:3/2!important;object-fit:contain!important;}
  .room-gallery-controls{position:absolute!important;right:14px!important;bottom:12px!important;z-index:5!important;display:flex!important;align-items:center!important;gap:13px!important;padding:7px 10px!important;background:rgba(28,28,27,.56)!important;color:#f2f0ea!important;backdrop-filter:blur(5px)!important;font:11px/1 Arial,Helvetica,sans-serif!important;letter-spacing:.08em!important;}
  .room-gallery-controls button{border:0!important;padding:2px 4px!important;background:transparent!important;color:inherit!important;font:18px/1 Arial,Helvetica,sans-serif!important;cursor:pointer!important;opacity:.9!important;}
  .room-gallery-controls button:hover{opacity:.55!important;}
  .room-gallery-controls button:disabled{opacity:.25!important;cursor:default!important;}
  .room-gallery-controls .room-gallery-counter{position:static!important;color:inherit!important;font:10px/1 Arial,Helvetica,sans-serif!important;letter-spacing:.12em!important;text-shadow:none!important;}
}


/* PHONE LAYOUT ENFORCEMENT
   These rules intentionally sit outside max-width media queries. Wix can expose
   a desktop-sized iframe viewport inside a physical phone; .phone-device is
   supplied explicitly by the Wix wrapper and must take precedence. */
html.phone-device #app { cursor:default!important; }
html.phone-device .face-threshold { width:clamp(250px,72vw,310px)!important; }
html.phone-device .face-photo { width:100%!important; max-width:310px!important; }
html.phone-device .room { width:82vw!important; min-width:240px!important; max-width:420px!important; }
html.phone-device .room-gallery-node { width:calc(100vw - 28px)!important; max-width:390px!important; height:auto!important; overflow:visible!important; }
html.phone-device .room-gallery { width:100%!important; height:auto!important; aspect-ratio:3 / 2!important; overflow:hidden!important; }
html.phone-device .room-gallery-scroll { display:block!important; position:relative!important; width:100%!important; height:100%!important; aspect-ratio:3 / 2!important; overflow:hidden!important; }
html.phone-device .room-gallery-item { position:absolute!important; inset:0!important; display:block!important; width:100%!important; min-width:0!important; height:100%!important; aspect-ratio:3 / 2!important; margin:0!important; opacity:0!important; visibility:hidden!important; transition:opacity .75s cubic-bezier(.22,.61,.36,1),visibility .75s linear!important; }
html.phone-device .room-gallery-item.is-active { opacity:1!important; visibility:visible!important; }
html.phone-device .room-gallery-item img { display:block!important; width:100%!important; height:100%!important; max-width:none!important; max-height:none!important; aspect-ratio:3 / 2!important; object-fit:contain!important; }
html.phone-device .room-gallery-counter { position:absolute!important; right:10px!important; bottom:9px!important; z-index:5!important; color:#f2f0ea!important; font:10px/1 Arial,Helvetica,sans-serif!important; letter-spacing:.1em!important; text-shadow:0 1px 4px rgba(0,0,0,.6)!important; }
html.phone-device .work-image-node { display:grid!important; grid-template-columns:64px minmax(0,1fr)!important; column-gap:14px!important; align-items:start!important; height:72px!important; min-height:72px!important; overflow:visible!important; }
html.phone-device .work-image-trigger { width:64px!important; height:64px!important; min-width:64px!important; }
html.phone-device .work-room-image,html.phone-device .work-room-placeholder { width:64px!important; height:64px!important; max-width:64px!important; max-height:64px!important; object-fit:contain!important; }
html.phone-device .side-reveal { min-width:0!important; max-width:100%!important; overflow:visible!important; padding-top:2px!important; }
html.phone-device .work-title { font-size:17px!important; line-height:1.18!important; overflow-wrap:anywhere!important; }
html.phone-device .work-meta { font-size:11px!important; line-height:1.35!important; overflow-wrap:anywhere!important; }
html.phone-device .work-description { display:none!important; }
html.phone-device #nav { top:14px!important; right:14px!important; }
html.phone-device #overlay { left:14px!important; right:14px!important; bottom:12px!important; }
html.phone-device #hint { font-size:8px!important; }
html.phone-device .work-detail-gallery { display:block!important; width:calc(100vw - 48px)!important; max-width:520px!important; height:calc(100dvh - 112px)!important; max-height:calc(100dvh - 112px)!important; overflow-x:hidden!important; overflow-y:auto!important; overscroll-behavior:contain!important; -webkit-overflow-scrolling:touch!important; touch-action:pan-y!important; padding:0 0 36px!important; box-sizing:border-box!important; }
html.phone-device .work-detail-gallery .work-gallery,html.phone-device .work-detail-gallery .work-gallery-larger { display:flex!important; flex:0 0 auto!important; flex-direction:column!important; flex-wrap:nowrap!important; align-items:stretch!important; justify-content:flex-start!important; width:100%!important; max-height:none!important; overflow:visible!important; gap:14px!important; padding:0!important; margin:0 0 24px!important; }
html.phone-device .work-detail-gallery .gallery-item { width:100%!important; flex:0 0 auto!important; margin:0!important; }
html.phone-device .work-detail-gallery .gallery-item img { display:block!important; width:100%!important; height:auto!important; max-width:100%!important; max-height:none!important; object-fit:contain!important; }
html.phone-device .work-detail-gallery .work-detail-info { display:block!important; width:100%!important; padding:0!important; }
html.phone-device .work-detail-gallery .work-detail-title { display:block!important; width:100%!important; font-size:25px!important; line-height:1.08!important; margin:0 0 7px!important; }
html.phone-device .work-detail-gallery .work-detail-info .work-meta { font-size:13px!important; line-height:1.35!important; margin:0 0 8px!important; }
html.phone-device .work-detail-gallery .work-medium { font-size:12px!important; line-height:1.45!important; margin:0 0 12px!important; }
html.phone-device .work-detail-gallery .work-description { display:block!important; font-size:14px!important; line-height:1.5!important; margin:0!important; max-height:none!important; overflow:visible!important; }
html.phone-device .work-detail-gallery .external-links { font-size:12px!important; line-height:1.5!important; margin-top:18px!important; }
html.phone-device #app.work-level { touch-action:pan-y!important; }


/* PHONE EDITORIAL SCALE — applied by explicit device class, not media-query width. */
html.phone-device .face-threshold { width: min(84vw, 350px) !important; }
html.phone-device .face-photo { width: 100% !important; max-width: 350px !important; }
html.phone-device .work-detail-gallery { transform: none !important; }
html.phone-device .work-detail-gallery .gallery-placeholder { width: 100% !important; height: 240px !important; }
