/* The background, frames and suspension wires are one photographic coordinate canvas. */
.studio-panel.case-portfolio-panel {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100svh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #eeeae0;
  background: #344039;
  box-shadow: none;
  overscroll-behavior: contain;
}
.case-portfolio-panel::backdrop { background: #344039; backdrop-filter: none; }
.case-portfolio-panel #studioPanelContent { min-height: 100%; }
.case-portfolio-panel #closeStudioPanel { position: fixed; float: none; top: 20px; right: 27px; z-index: 8; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0 0 3px; color: #f3f0e8; border: 0; border-radius: 50%; background: #15212620; font-size: 29px; line-height: 1; text-shadow: 0 1px 5px #12252ab3; }
.case-portfolio-panel #closeStudioPanel:hover { background: #132c3666; color: white; }
.case-portfolio-panel button { font-family: inherit; }
.case-portfolio-panel button:focus-visible { outline: 2px solid #a9dfe7; outline-offset: 6px; }
.case-gallery-header { position: absolute; top: 0; left: 0; right: 0; z-index: 4; min-height: 84px; padding: 27px 90px 23px 38px; display: flex; align-items: center; gap: 30px; box-sizing: border-box; pointer-events: none; }
.case-gallery-header button { pointer-events: auto; }
.case-portfolio-panel .case-gallery-header h2 { font-size: 14px; line-height: 1.7; font-weight: 400; letter-spacing: 2px; margin: 0; color: #f1eee6; text-shadow: 0 1px 6px #24312faa; }
.case-gallery-header h2:focus { outline: none; }
.case-gallery-room { position: relative; height: 100svh; height: 100dvh; overflow: hidden; isolation: isolate; background: #344039; }
.case-gallery-canvas { position: absolute; left: 0; top: 0; width: 1672px; height: 941px; transform-origin: 0 0; }
.case-gallery-background { position: absolute; inset: 0; display: block; width: 1672px; height: 941px; max-width: none; object-fit: fill; user-select: none; pointer-events: none; }
.case-gallery-wall { position: absolute; inset: 0; pointer-events: none; }
.case-gallery-wall[aria-hidden="true"] { visibility: hidden; }
.case-gallery-rail { position: absolute; height: 1.5px; background: #343a34b3; box-shadow: 0 1px 1px #e4d7be4a, 1px 2px 3px #242a2245; pointer-events: none; }
.case-exhibit { position: absolute; padding: 0; margin: 0; }
.case-exhibit-open { position: relative; isolation: isolate; display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; color: inherit; text-align: center; background: none; cursor: pointer; pointer-events: auto; }
.case-exhibit-open::before, .case-exhibit-open::after { content: ''; position: absolute; z-index: -1; top: calc(var(--cable-length) * -1); height: var(--cable-length); width: 1px; background: #343b33a6; box-shadow: 1px 0 0 #d6cbb936; pointer-events: none; }
.case-exhibit-open::before { left: 17%; }
.case-exhibit-open::after { right: 17%; }
.case-exhibit-frame { position: relative; display: block; width: 100%; padding: 0; border: 1.5px solid #252d27; border-top-color: #51584a; border-left-color: #414c3c; background: #252e25; box-shadow: 1px 3px 4px #171b1466, 6px 8px 10px #26302242; transition: box-shadow .2s ease; }
.case-exhibit-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(125deg, #eedcaa12, transparent 60%); }
.case-exhibit-cover { display: block; width: 100%; height: auto; aspect-ratio: var(--cover-ratio); object-fit: contain; filter: brightness(.93) saturate(.92); user-select: none; }
.case-exhibit-name { display: block; width: 100%; margin: var(--label-gap, 10px) 0 0; font-size: var(--label-size, 13px); letter-spacing: .4px; line-height: 1.65; color: #e4dfd0; text-shadow: 0 1px 3px #23322b8c; overflow-wrap: anywhere; }
@media (hover: hover) { .case-exhibit-open:hover .case-exhibit-frame { box-shadow: 1px 3px 4px #171b147a, 7px 9px 12px #26302259; } .case-exhibit-open:hover .case-exhibit-name { color: #fff7df; } }
.case-gallery-controls { position: absolute; z-index: 4; bottom: max(22px, calc(env(safe-area-inset-bottom) + 16px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 9px; }
.case-wall-navigation, .case-wall-views { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 3px 13px; border: 1px solid #e4e7df21; border-radius: 2px; background: #142b3596; backdrop-filter: blur(8px); white-space: nowrap; }
.case-wall-views { gap: 8px; padding: 2px 6px; }
.case-wall-views[hidden] { display: none; }
.case-wall-navigation button, .case-wall-view { min-width: 78px; min-height: 44px; padding: 10px 6px; color: #e6ece9; border: 0; border-radius: 0; background: none; font-size: 12px; letter-spacing: .8px; cursor: pointer; }
.case-wall-view { min-width: 100px; padding-left: 12px; padding-right: 12px; }
.case-wall-view[aria-pressed="true"] { color: white; background: #dbe8e326; }
.case-wall-navigation button:hover:not(:disabled), .case-wall-view:hover:not(:disabled) { color: white; background: #dbe8e317; }
.case-wall-navigation button:disabled, .case-wall-view:disabled { opacity: .3; cursor: default; }
.case-wall-count { color: #d2e1dc; font-size: 11px; line-height: 1.8; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.case-wall-count:focus { outline: none; }
.case-gallery-empty { position: absolute; inset: 43% 0 auto; margin: 0; text-align: center; color: #eeeae0; }
.case-gallery-back { flex: 0 0 auto; border: 0; border-radius: 0; background: none; padding: 6px 0; color: #73786d; font-size: 12px; line-height: 1.6; letter-spacing: .5px; cursor: pointer; }
.case-gallery-back:hover { color: #264044; }
.studio-panel.case-detail-panel { overflow-y: auto; background: #e7e6df; color: #45483d; }
.case-detail-panel .case-gallery-header { position: sticky; top: 0; background: #e7e6dff5; }
.case-detail-panel .case-gallery-header h2 { color: #45483d; text-shadow: none; }
.case-detail-panel #closeStudioPanel { color: #566051; background: transparent; text-shadow: none; }
.case-detail-panel button:focus-visible { outline-color: #52717b; }
.case-work-view { padding: 0 38px 24px; }
.case-work-viewport { position: relative; display: flex; align-items: center; justify-content: center; height: max(260px, calc(100svh - 230px)); min-width: 0; overflow: hidden; background: #dddfd6; touch-action: pan-y pinch-zoom; }
.case-work-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.case-image-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 10px 15px; background: #f0eee5ed; color: #73766b; font-size: 12px; text-align: center; }
.case-image-status[hidden] { display: none; }
.case-image-retry { padding: 2px 5px; border: 0; background: none; color: #42686e; text-decoration: underline; font-size: inherit; }
.case-image-arrow { position: absolute; top: calc(50% - 26px); display: grid; place-items: center; width: 42px; height: 52px; padding: 0 0 4px; color: #faf9f5; font-size: 35px; font-weight: 200; line-height: 1; background: #25312bb3; border: 1px solid #ffffff50; border-radius: 1px; cursor: pointer; }
.case-image-arrow:hover { background: #172f2ce8; }
.case-image-arrow:disabled { opacity: .22; cursor: default; }
.case-image-arrow[hidden] { display: none; }
.case-image-previous { left: 12px; }
.case-image-next { right: 12px; }
.case-image-count { margin: 16px 0 12px; text-align: center; color: #767b6e; font-size: 11px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.case-image-thumbnails { position: relative; display: flex; gap: 12px; max-width: 100%; padding: 3px 3px 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #adb1a2 #e7e6df; }
.case-image-thumbnail { flex: 0 0 94px; padding: 3px; border: 1px solid transparent; border-radius: 0; background: transparent; opacity: .58; cursor: pointer; }
.case-image-thumbnail:hover, .case-image-thumbnail[aria-current="true"] { opacity: 1; }
.case-image-thumbnail[aria-current="true"] { border-color: #747f6e; }
.case-image-thumbnail img { display: block; width: 86px; height: 57px; object-fit: contain; background: #d6d9cd; }
@media (max-width: 700px) {
  .case-portfolio-panel #closeStudioPanel { width: 38px; height: 38px; top: 13px; right: 12px; font-size: 26px; }
  .case-gallery-header { min-height: 66px; padding: 20px 65px 18px 24px; gap: 18px; }
  .case-portfolio-panel .case-gallery-header h2 { font-size: 13px; letter-spacing: 1.5px; }
  .case-wall-navigation { gap: 18px; }
  .case-wall-navigation button { min-width: 70px; font-size: 11px; }
  .case-wall-count { font-size: 10px; }
  .case-wall-view { font-size: 11px; }
  .case-detail-panel .case-gallery-header { display: block; padding-top: 15px; padding-bottom: 14px; }
  .case-gallery-back { margin-bottom: 8px; font-size: 11px; }
  .case-work-view { padding: 0 10px 20px; }
  .case-work-viewport { height: max(250px, calc(100svh - 230px)); }
  .case-image-arrow { width: 32px; height: 46px; top: calc(50% - 23px); font-size: 30px; }
  .case-image-previous { left: 5px; }
  .case-image-next { right: 5px; }
  .case-image-thumbnails { gap: 7px; }
  .case-image-thumbnail { flex-basis: 77px; }
  .case-image-thumbnail img { width: 69px; height: 47px; }
}
@media (max-height: 500px) { .case-gallery-header { padding-top: 15px; min-height: 60px; } .case-portfolio-panel #closeStudioPanel { top: 10px; } .case-gallery-controls { bottom: 14px; gap: 4px; } .case-wall-navigation, .case-wall-views { padding-top: 0; padding-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { .case-gallery-canvas, .case-exhibit-frame { transition: none; } }

/* Mobile viewport chrome and safe areas must not hide art controls. */
.case-portfolio-panel #closeStudioPanel { top: max(13px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.case-gallery-header { padding-top: max(20px, env(safe-area-inset-top)); }
.case-image-original { display: block; width: fit-content; margin: 0 auto 14px; color: #42686e; font-size: 12px; text-underline-offset: 3px; }
.case-detail-panel { touch-action: pan-y pinch-zoom; }
.case-detail-panel .case-work-view { padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px)); }
.case-image-thumbnails { touch-action: pan-x pinch-zoom; }
.case-wall-projects { display: none; }
.case-gallery-stage { position: absolute; inset: 0; overflow: hidden; }
.case-portfolio-panel.case-overview-panel { overflow-y: auto; }
.case-overview-panel #studioPanelContent { min-height: 0; }
.case-gallery-room.case-gallery-overview { height: auto; min-height: 0; padding: max(78px, calc(env(safe-area-inset-top) + 62px)) 0 max(24px, calc(env(safe-area-inset-bottom) + 16px)); overflow: visible; }
.case-gallery-overview .case-gallery-stage { position: relative; inset: auto; width: 100%; aspect-ratio: 1672 / 941; }
.case-gallery-overview .case-gallery-controls { position: relative; left: auto; bottom: auto; transform: none; margin: 16px auto 0; }
.case-gallery-overview .case-wall-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; width: min(350px, calc(100vw - 36px)); }
.case-wall-project { min-height: 44px; min-width: 44px; padding: 8px; border: 0; background: #142b3580; color: #edf0e8; font-size: 11px; line-height: 1.5; cursor: pointer; }
.case-gallery-overview .case-exhibit-name { display: none; }
@media (max-width: 700px) {
  .case-wall-views { max-width: calc(100vw - 32px); gap: 4px; }
  .case-wall-view { min-width: 78px; min-height: 44px; padding-left: 8px; padding-right: 8px; }
  .case-wall-navigation { gap: 14px; }
  .case-work-viewport { height: max(220px, calc(100dvh - 268px)); }
  .case-gallery-controls { max-width: calc(100vw - 24px); }
}
@media (max-height: 500px) {
  .case-detail-panel .case-gallery-header { position: relative; }
  .case-work-viewport { height: max(220px, calc(100dvh - 150px)); }
}
