body:has(.exhibition:not([hidden])) { background:#f6f1ed; }
main:has(.exhibition:not([hidden])) { width:min(100% - 32px, 1320px); }
main:has(.exhibition:not([hidden])) > header { min-height:52px; }
main:has(.exhibition:not([hidden])) > .hero,
main:has(.exhibition:not([hidden])) > #contact { display:none; }

.exhibition { --wine:#652542; margin:18px 0 20px; color:#35232e; }
.exhibition-heading { margin:0 0 13px; }
.exhibition-kicker { margin:0; color:var(--wine); font-size:.75rem; letter-spacing:.15em; font-weight:750; }
.exhibition h1 { margin:3px 0 0; font-size:clamp(1.65rem,4vw,2.85rem); line-height:1.15; letter-spacing:-.06em; }
.exhibition-room {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  height:clamp(360px,calc(100svh - 216px),790px);
  border:1px solid #a38b8e;
  border-radius:12px;
  background:#b69d96;
}
.exhibition-room:focus-visible { outline:3px solid var(--wine); outline-offset:4px; }
html.seoro-gallery-expanded { overflow:hidden; overscroll-behavior:none; }
.exhibition-room.is-expanded, .exhibition-room:fullscreen {
  position:fixed; inset:0; z-index:20; width:100%; height:100%; height:100dvh;
  border:0; border-radius:0; background:#b69d96;
}
.exhibition-room.is-expanded:focus-visible { outline-offset:-3px; }
.exhibition-room.is-expanded .exhibition-hud {
  top:max(12px,env(safe-area-inset-top));
  right:max(12px,env(safe-area-inset-right)); left:max(12px,env(safe-area-inset-left));
}
.exhibition-room.is-expanded .room-chat { bottom:max(17px,env(safe-area-inset-bottom)); }
.exhibition-world, .exhibition-world canvas { position:absolute; inset:0; display:block; width:100%; height:100%; }
.exhibition-world canvas { cursor:grab; touch-action:none; }
.exhibition-world canvas.is-dragging { cursor:grabbing; }
.exhibition-hud { position:absolute; inset:12px 12px auto; display:flex; gap:10px; justify-content:space-between; pointer-events:none; }
.exhibition-presence, .exhibition-menu > summary, .exhibition-load {
  margin:0;
  border:1px solid #fff4e973;
  border-radius:999px;
  padding:7px 12px;
  background:#33252eef;
  color:#fff8f4;
  font-size:.8rem;
  line-height:1.4;
}
.exhibition-presence { align-self:start; pointer-events:auto; }
.exhibition-menu { pointer-events:auto; position:relative; }
.exhibition-menu > summary {
  display:grid; place-items:center; width:44px; min-height:44px; padding:0; cursor:pointer; list-style:none;
}
.exhibition-menu > summary::-webkit-details-marker { display:none; }
.exhibition-menu > summary span {
  display:block; width:17px; height:2px; border-radius:1px; background:currentColor;
  box-shadow:0 -5px currentColor,0 5px currentColor;
}
.exhibition-menu-items {
  position:absolute;
  z-index:2;
  top:calc(100% + 6px);
  right:0;
  width:min(240px,74vw);
  max-height:52vh;
  overflow:auto;
  padding:5px;
  background:#fff9f4;
  border:1px solid #c9aaa9;
  border-radius:10px;
  box-shadow:0 9px 22px #37253030;
}
.exhibition-menu-items > a, .exhibition-menu-items > button, .exhibition-work-list > summary {
  display:block; min-height:44px; padding:10px 9px; border-radius:6px;
  color:var(--wine); font-size:.9rem; font-weight:650; cursor:pointer;
}
.exhibition-menu-items > button {
  width:100%; text-align:left; border:0; background:transparent;
}
.exhibition-work-list > summary { display:list-item; }
.exhibition-menu-items > a { text-decoration:none; }
.exhibition-menu-items > a:hover, .exhibition-menu-items > button:hover, .exhibition-work-list > summary:hover { background:#f1e2e6; }
.exhibition-art { padding:2px 0 2px 5px; }
.exhibition-art button {
  display:block;
  width:100%;
  text-align:left;
  border:0;
  border-radius:5px;
  background:transparent;
  color:var(--wine);
}
.exhibition-art button:hover { background:#f1e2e6; }
.exhibition-load { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); text-align:center; width:max-content; max-width:85%; }
#exhibition-near {
  position:absolute;
  z-index:4;
  bottom:72px;
  left:50%;
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100% - 24px);
  padding-inline:18px;
  background:var(--wine);
  border:1px solid #fff1e8;
  box-shadow:0 6px 18px #29132169;
  color:#fff8f5;
}

#exhibition-panel {
  width:min(100% - 24px,610px);
  max-width:none;
  max-height:calc(100dvh - 24px);
  padding:0;
  overscroll-behavior:contain;
  overflow:auto;
  border:1px solid #b7939a;
  border-radius:16px;
  background:#fffaf7;
  color:#35232e;
  box-shadow:0 18px 80px #20161e6e;
}
#exhibition-panel::backdrop { background:#21141f88; }
#exhibition-tutorial {
  width:min(320px,calc(100% - 28px)); padding:18px;
  border:1px solid #b7939a; border-radius:14px; background:#fffaf7; color:#35232e;
  box-shadow:0 14px 48px #20161e55;
}
#exhibition-tutorial::backdrop { background:#21141f55; }
#exhibition-tutorial-title { margin:0; font-size:1.14rem; }
#exhibition-tutorial-steps { padding-inline-start:1.15em; margin:8px 0 13px; font-size:.9rem; }
#exhibition-tutorial-start { width:100%; border-color:var(--wine); background:var(--wine); color:#fff9f8; }
.exhibition-panel-header {
  position:sticky;
  z-index:1;
  top:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 13px 8px 18px;
  border-bottom:1px solid #ebd8da;
  background:#fffaf7;
}
.exhibition-panel-header h2 { margin:0; font-size:clamp(1.1rem,3vw,1.45rem); }
.exhibition-panel-header h2:focus { outline:none; }
#exhibition-close { min-width:44px; min-height:44px; padding:0; background:#f4e6ea; color:var(--wine); font-size:1.5rem; }
#exhibition-detail { padding:12px; }
#exhibition-photo {
  display:block;
  width:100%;
  height:min(58dvh,560px);
  object-fit:contain;
  background:#f0e6e1;
  border-radius:7px;
}
.exhibition-detail-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  padding-top:10px;
}
.exhibition-detail-actions a { color:var(--wine); font-size:.875rem; text-underline-offset:.2em; }
#exhibition-book {
  min-height:46px;
  border-color:var(--wine);
  background:var(--wine);
  color:#fff9f8;
  padding-inline:19px;
}
#exhibition-book:hover { background:#47213a; }
#exhibition-panel #booking { margin:0; border:0; border-radius:0; padding:14px 18px 20px; }
#exhibition-panel #booking > h2, #exhibition-panel #booking > .eyebrow { display:none; }

.room-chat {
  position:absolute; z-index:3; inset:auto auto 17px 12px; margin:0;
  width:min(365px,calc(100% - 24px)); pointer-events:none;
}
#room-chat-lines { margin:0 0 6px; padding:0; list-style:none; }
.room-chat-line, #room-chat-status {
  display:block; width:max-content; max-width:100%; margin:3px 0; padding:4px 9px; border-radius:8px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  background:rgb(51 37 46 / 50%); color:#fff8f4; text-shadow:0 1px 3px #21141f;
  font-size:.86rem; line-height:1.3;
}
#room-chat-status:empty, #room-chat-lines:empty { display:none; }
#room-chat-form { display:flex; align-items:center; gap:6px; pointer-events:auto; }
#room-chat-input { min-width:0; min-height:44px; margin:0; padding:5px 10px; background:rgb(255 249 245 / 50%); }
#room-chat-send { flex:none; background:rgb(255 239 245 / 50%); border-color:var(--wine); color:var(--wine); }
.room-message-fade { animation:seoro-message-fade .6s linear 5s forwards; }
@keyframes seoro-message-fade { to { opacity:0; } }
.exhibition-speech {
  position:absolute; inset:0; overflow:hidden; pointer-events:none;
}
.exhibition-bubble {
  position:absolute; left:0; top:0; max-width:min(210px,66%);
  padding:6px 10px; border:1px solid #b68f9d; border-radius:12px;
  background:rgb(255 249 245 / 50%); color:#38242f; box-shadow:0 2px 7px #38242f55;
  overflow-wrap:anywhere; white-space:pre-wrap; font-size:.85rem; line-height:1.33;
}
.exhibition-bubble::after {
  content:""; position:absolute; top:100%; left:calc(50% - 4px);
  width:8px; height:8px; border:solid #b68f9d; border-width:0 1px 1px 0;
  background:rgb(255 249 245 / 50%); transform:translateY(-4px) rotate(45deg);
}

@media (max-width:580px) {
  main:has(.exhibition:not([hidden])) { width:min(100% - 20px,1320px); }
  .exhibition { margin-top:13px; }
  .exhibition-room { height:clamp(330px,calc(100svh - 170px),730px); border-radius:8px; }
  #exhibition-book { width:100%; }
  #exhibition-photo { height:min(52dvh,520px); }
}
