/* Shared materials for the concierge, media viewer and editorial dialogs. */
:root {
  --window-material: url('assets/images/window-patina.webp');
  --window-scene: url('assets/images/cinema-salon.webp');
  --window-archive: url('assets/images/cinema-archive.webp');
  --window-edge: rgba(198, 165, 110, .36);
}

.guide-launcher {
  border-color: var(--window-edge);
  border-radius: 40px;
  background: linear-gradient(100deg, #211c17d9, #211f1b94), var(--window-archive) center 62% / cover;
  box-shadow: 0 8px 32px #0006, inset 0 1px 0 #f6dfb516;
  padding-right: 20px;
}
.guide-launcher small { color: #bdb8a8; }
.guide-spark { display: flex; align-items: center; margin-left: 14px; }
.guide-spark svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.3; }

.guide {
  width: 410px;
  bottom: 104px;
  max-height: min(700px, calc(100dvh - 128px));
  border: 1px solid var(--window-edge);
  border-radius: 16px;
  background: linear-gradient(120deg, #211e1ad1, #151412e8), var(--window-material) center / 610px;
  box-shadow: 0 24px 80px #0008, 0 2px 12px #0006, inset 0 1px 0 #f4dfb51f;
  animation: window-arrive .28s ease-out both;
  color: #f1eee5;
}
.guide-head {
  position: relative;
  isolation: isolate;
  min-height: 154px;
  padding: 69px 24px 23px;
  gap: 15px;
  border-bottom: 0;
  background: linear-gradient(90deg, #171411a6, #16141112), linear-gradient(0deg, #191612f2, #19161205 90%), var(--window-scene) 65% 53% / cover;
}
.guide-body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: #191612;
}
.guide-body::before, .guide-body::after {
  content: '';
  position: absolute;
  inset: -1px 0 0;
  pointer-events: none;
}
.guide-body::before {
  z-index: -2;
  background: var(--window-archive) 56% 65% / cover;
  filter: grayscale(.65) sepia(.2);
}
.guide-body::after {
  z-index: -1;
  background: linear-gradient(180deg, #191612 0%, #191612c9 12%, #1916128a 45%, #1916123d 100%);
}
.guide-portrait {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid #dbc296a3;
  box-shadow: 0 0 0 4px #0d181470, 0 4px 18px #0005;
  background: #b4ad99;
}
.guide-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(2.7);
  transform-origin: 50% 5%;
}
.guide-head > div { font-size: 34px; letter-spacing: -.4px; }
.guide-head small { font-size: 9px; letter-spacing: .1px; color: #d3cbbc; margin-top: 5px; }
.guide-head .guide-close, .dialog-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 10px;
  border-radius: 50%;
  border: 1px solid #e6d4b33b;
  background: #1c1915d9;
  backdrop-filter: blur(12px);
  color: #eee5d2;
  box-shadow: 0 3px 12px #0003;
  transition: background .2s, border-color .2s;
}
.guide-head .guide-close { position: absolute; top: 14px; right: 14px; }
.guide-close svg, .dialog-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; }
.guide-head .guide-close:hover, .dialog-close:hover { border-color: #cfaf78; background: #3a3227; color: #fff7e8; }
.guide-messages {
  padding: 23px 22px 20px;
  gap: 14px;
  max-height: 285px;
  min-height: 80px;
  scrollbar-width: thin;
  scrollbar-color: #a48c555e transparent;
}
.bot-message, .user-message {
  flex-shrink: 0;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.85;
  max-width: 96%;
  border: 1px solid #d6c6a533;
  border-radius: 3px 13px 13px;
  background: linear-gradient(135deg, #342e25b3, #211d18bd);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 12px #00000012, inset 0 1px 0 #e8dbc008;
  color: #edeae1;
}
.user-message {
  border-radius: 13px 3px 13px 13px;
  border-color: #d9c0933b;
  background: linear-gradient(130deg, #6b593bbd, #51432ec9);
  color: #fff7e8;
}
.bot-message a { color: #e2c38e; text-underline-offset: 4px; border-color: #e2c38e6b; }
.guide-followups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; white-space: normal; }
.guide-followups button { max-width: 100%; min-height: 32px; padding: 6px 9px; border: 1px solid #c6a66d59; border-radius: 5px; background: #b8995f12; color: #e5c897; font-size: 9px; line-height: 1.5; text-align: left; overflow-wrap: anywhere; transition: background .2s, border-color .2s; }
.guide-followups button:hover { background: #b8995f29; border-color: #c6a66d; }
.guide-copy { display: block; min-height: 34px; margin: 12px 0 4px; padding: 7px 10px; border: 1px solid #c6a66d80; border-radius: 5px; color: #ead2a3; background: #b8995f20; font-size: 10px; }
.guide-copy:hover { background: #b8995f38; }
.guide-choices { padding: 0 22px 17px; gap: 8px; }
.guide-choices button {
  min-height: 39px;
  font-size: 10px;
  color: #f0d7aa;
  border: 1px solid #c5a87375;
  border-radius: 6px;
  background: linear-gradient(120deg, #2d261ead, #252019a3);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  transition: border-color .2s, background .2s;
}
.guide-choices button:hover { background: #594c30ba; border-color: #c7ad7c; }
.guide form {
  margin: 0 17px;
  padding: 6px;
  gap: 6px;
  border: 1px solid #c7b38e52;
  border-radius: 10px;
  background: #1714119e;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 2px 8px #0002;
  transition: border-color .2s, box-shadow .2s;
}
.guide form:focus-within { border-color: #c9aa76; box-shadow: 0 0 0 2px #c9aa7614; }
.guide input {
  padding: 9px 10px;
  min-height: 36px;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.guide input::placeholder { color: #b6b0a4; opacity: 1; }
.guide input:focus-visible { outline: none; }
.guide form button {
  display: grid;
  place-items: center;
  align-self: center;
  width: auto;
  min-width: 86px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #eddaa887;
  border-radius: 7px;
  background: linear-gradient(140deg, #dfc494, #b79c69);
  color: #221b12;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  transition: filter .2s;
}
.guide form button:hover { filter: brightness(1.12); }
.guide-note { padding: 10px 15px 14px; color: #ded7c4; font-size: 8px; text-shadow: 0 1px 5px #000; }
.guide button:focus-visible, .media-dialog button:focus-visible { outline-offset: 3px; }

.media-dialog {
  width: min(1120px, calc(100vw - 64px));
  max-height: calc(100dvh - 64px);
  border: 1px solid var(--window-edge);
  border-radius: 14px;
  background: linear-gradient(115deg, #201c17e3, #16141196), var(--window-archive) center / cover;
  box-shadow: 0 35px 120px #0009, 0 0 0 1px #0008, inset 0 1px 0 #ead0a51f;
  scrollbar-width: thin;
  scrollbar-color: #927d525c #1b1713;
}
.media-dialog[open] { animation: window-arrive .28s ease-out both; }
.media-dialog::backdrop { background: #070604cf; backdrop-filter: blur(14px); }
.media-dialog[data-type="article"] { width: min(860px, calc(100vw - 64px)); }
.media-dialog[data-type="project"] { width: min(1040px, calc(100vw - 64px)); }
.dialog-close { top: 16px; right: 16px; margin: 16px 16px -54px 0; z-index: 4; }
.dialog-media { background: #100e0b; }
.media-dialog[data-type="gallery"] .dialog-media {
  padding: 16px 16px 0;
  background: linear-gradient(#14110dd9, #14110dd9), var(--window-material) center / cover;
}
.dialog-media img { max-height: calc(100dvh - 210px); min-height: 80px; }
.dialog-media video { max-height: calc(100dvh - 194px); }
.dialog-caption {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 25px 32px 28px;
  min-height: 108px;
  background: #201c17;
  border-top: 1px solid #d5bc8624;
}
.dialog-caption::before, .dialog-caption::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.dialog-caption::before {
  z-index: -2;
  inset: -24px;
  background: var(--dialog-art, var(--window-archive)) center 60% / cover;
  filter: blur(10px) grayscale(.85) sepia(.2);
}
.dialog-caption::after {
  z-index: -1;
  inset: 0;
  background: linear-gradient(100deg, #1c1711f0 0%, #1c1711bf 45%, #1c17118c 100%);
}
.dialog-caption > div:first-child { min-width: 0; }
.dialog-caption h3 { font-size: 32px; margin-bottom: 8px; overflow-wrap: anywhere; }
.dialog-caption p { color: #d0cabd; font-size: 11px; line-height: 1.6; }
.gallery-controls { align-items: center; gap: 11px; }
.gallery-controls button {
  width: auto;
  min-width: 68px;
  height: 44px;
  padding: 0 12px;
  font-size: 11px;
  border-radius: 6px;
  border-color: #b8a0705c;
  color: #e3c796;
  background: #261f1794;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .2s, border-color .2s;
}
.gallery-controls button:hover { border-color: #d8b985; background: #d1b47b20; }
.gallery-controls span { color: #ded6c2; font-variant-numeric: tabular-nums; }
.dialog-article {
  padding: 64px;
  background: linear-gradient(105deg, #1d1914eb 10%, #1d1914c7 45%, #1d191478 100%), var(--window-archive) right center / cover;
}
.dialog-article h2 { font-size: clamp(42px, 5vw, 62px); margin: 0 0 28px; line-height: 1.04; }
.dialog-article h2 em { color: #d3b786; }
.dialog-article p { color: #e3dcd0; font-size: 14px; line-height: 1.95; }
.dialog-article p a { color: #e4c38b; text-decoration: underline; text-underline-offset: 4px; }
.dialog-article > img { max-height: 390px; margin: 30px auto; border-radius: 4px; box-shadow: 0 12px 32px #0004; }
.dialog-article .button-row { margin-top: 30px; }
.dialog-project { display: grid; grid-template-columns: 1fr 1.1fr; padding: 0; min-height: 540px; }
.dialog-project-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
  background: #13100d;
  border-right: 1px solid #c6ad7730;
}
.dialog-project-art::before {
  content: '';
  position: absolute;
  inset: -35px;
  z-index: -1;
  pointer-events: none;
  background: var(--dialog-art, var(--window-archive)) center / cover;
  filter: blur(28px) grayscale(.6) sepia(.15) brightness(.4);
}
.dialog-project-art img { width: 100%; height: auto; max-height: 560px; object-fit: contain; box-shadow: 0 15px 40px #0007; }
.dialog-project-copy { align-self: center; padding: 70px 48px 55px; min-width: 0; }
.dialog-project-copy h2 { font-size: clamp(42px, 4.5vw, 62px); }
.dialog-project-copy .button-row { gap: 14px; flex-direction: column; align-items: flex-start; }
.dialog-project-copy .button { min-height: 48px; font-size: 10px; border-radius: 3px; }
.toast {
  background: linear-gradient(110deg, #2c2318d9, #221c1696), var(--window-archive) center 65% / cover;
  border-color: var(--window-edge);
  border-radius: 10px;
  color: #eee5d3;
  box-shadow: 0 12px 40px #0006;
}
.mobile-menu {
  background: linear-gradient(90deg, #191510f5, #191510b5), var(--window-scene) 70% center / cover;
}
.mobile-menu nav a { width: fit-content; }
.mobile-menu nav a:hover { color: #e0c38c; }

.inquiry-form, .contact-box, .shop-info {
  background: linear-gradient(110deg, #201c17ed 10%, #201c17d1 45%, #201c178c 100%), var(--window-archive) right center / cover;
  border-color: var(--window-edge);
  box-shadow: inset 0 1px 0 #e8cf9c0f;
}
.inquiry-form > p, .shop-info p { color: #cec7b8; }
.inquiry-form input, .inquiry-form textarea, .inquiry-form select {
  background-color: #1b1712ad;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Keep the decorative photography in the same warm palette as the main site. */
.guide-launcher, .guide, .media-dialog, .dialog-article, .toast,
.inquiry-form, .contact-box, .shop-info, .mobile-menu {
  background-color: #24211d;
  background-blend-mode: normal, luminosity;
}
.guide-head {
  background-color: #24211d;
  background-blend-mode: normal, normal, luminosity;
}
.to-top { font-size: 10px; padding: 10px 0; }
.chapter-strip a { justify-content: center; }

@keyframes window-arrive {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 700px) {
  .guide-launcher { padding: 5px; }
  .guide { right: 12px; bottom: 82px; width: min(410px, calc(100vw - 24px)); max-height: calc(100dvh - 101px); border-radius: 14px; }
  .guide-head { min-height: 136px; padding: 54px 20px 20px; gap: 14px; }
  .guide-head > div { font-size: 32px; }
  .guide-head small { font-size: 8px; }
  .guide-portrait { width: 54px; height: 54px; flex-basis: 54px; }
  .guide-messages { max-height: 250px; padding: 19px 18px 17px; }
  .guide-choices { padding: 0 18px 15px; }
  .guide-choices button { font-size: 9px; min-height: 38px; }
  .guide form { margin: 0 13px; }
  .guide input { font-size: 16px; padding-left: 8px; }
  .guide input::placeholder { font-size: 12px; }
  .guide-note { padding-bottom: 12px; }
  .media-dialog, .media-dialog[data-type="article"], .media-dialog[data-type="project"] { width: calc(100vw - 24px); max-height: calc(100dvh - 32px); border-radius: 11px; }
  .dialog-close { top: 12px; right: 12px; margin: 12px 12px -50px 0; }
  .media-dialog[data-type="gallery"] .dialog-media { padding: 8px 8px 0; }
  .dialog-media img { max-height: calc(100dvh - 205px); }
  .dialog-media video { max-height: calc(100dvh - 190px); }
  .dialog-caption { padding: 21px 20px 23px; min-height: 100px; gap: 18px; flex-wrap: wrap; }
  .dialog-caption h3 { font-size: 28px; }
  .dialog-caption p { font-size: 10px; }
  .gallery-controls { margin-left: auto; gap: 10px; }
  .gallery-controls button { width: auto; min-width: 64px; height: 42px; }
  .gallery-controls span { min-width: 42px; font-size: 10px; }
  .dialog-article { padding: 65px 25px 30px; }
  .dialog-article h2 { font-size: 43px; margin-bottom: 24px; }
  .dialog-article p { font-size: 12px; line-height: 1.9; }
  .dialog-article > img { max-height: 320px; margin: 25px auto; }
  .dialog-project { display: block; padding: 0; }
  .dialog-project-art { padding: 26px; border-right: 0; border-bottom: 1px solid #c6ad7730; }
  .dialog-project-art img { width: auto; max-width: 100%; max-height: 300px; }
  .dialog-project-copy { padding: 30px 25px 35px; }
  .dialog-project-copy h2 { font-size: 44px; }
}
@media (max-height: 600px) {
  .guide { bottom: 12px; max-height: calc(100dvh - 24px); }
  .guide-head { min-height: 74px; padding: 13px 20px; }
  .guide-head > div { font-size: 28px; }
  .guide-head small { margin-top: 3px; }
  .guide-portrait { width: 43px; height: 43px; flex-basis: 43px; }
  .guide-head .guide-close { top: 9px; right: 9px; }
  .guide-messages { min-height: 45px; padding: 12px 18px; }
  .guide-choices { padding-bottom: 10px; gap: 6px; }
  .guide-choices button { min-height: 33px; padding: 6px 8px; }
  .guide-note { padding: 7px 10px 9px; }
  .media-dialog { max-height: calc(100dvh - 24px); }
  .dialog-media img { max-height: 61dvh; }
}
