/* Photo details are part of the garage experience, with the original image assets. */
.photo-frame > img { transform-origin: center; }
.photo-trigger {
  position: absolute;
  z-index: 4;
  display: block;
  /* Keep the measured overlay inside its frame while resize observers catch up. */
  max-width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ivory);
  cursor: zoom-in;
  outline-offset: -4px;
  -webkit-tap-highlight-color: transparent;
}
.photo-trigger::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: -20% -30%;
  background: linear-gradient(110deg, transparent 36%, #f5f1e82b 49%, transparent 62%);
  transform: translateX(-110%);
}
.photo-entry-seen > .photo-trigger::before { animation: photo-inlet-sweep 1.3s .12s var(--ease) both; }
.photo-trigger::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid #f5f1e84a;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.photo-trigger:hover::after,
.photo-trigger:focus-visible::after { opacity: 1; }
.photo-trigger-chip {
  position: absolute;
  right: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  font: 600 11px/1.4 var(--sans);
  letter-spacing: .025em;
  background: linear-gradient(135deg, #242223ee, #111111e8);
  border: 1px solid #d9c9ad6b;
  box-shadow: 0 3px 0 #080808b0, inset 0 1px 0 #ffffff1f;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  pointer-events: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.photo-trigger-chip svg { width: 16px; height: 16px; flex-basis: 16px; stroke-width: 1.35; }
.photo-trigger:hover .photo-trigger-chip,
.photo-trigger:focus-visible .photo-trigger-chip { border-color: #f2d9b5; background: linear-gradient(135deg, #4a2028, #1b1415); }
.photo-trigger.is-pressed .photo-trigger-chip { transform: translateY(2px); box-shadow: inset 0 2px 8px #0008; }
.photo-frame:has(> .photo-trigger.is-pressed) > img { transform: scale(1.025); }
.about-visual .photo-trigger { clip-path: polygon(0 0,100% 0,100% 94%,92% 100%,0 100%); }
.workshop-frame .photo-trigger-chip { right: 7px; top: 7px; min-height: 30px; padding: 6px 8px; font-size: 9px; gap: 5px; }
.workshop-frame .photo-trigger-chip svg { width: 14px; height: 14px; flex-basis: 14px; }
.console-photo .photo-trigger .photo-trigger-chip { display: inline-flex; right: 8px; top: 8px; left: auto; bottom: auto; width: 34px; min-height: 34px; padding: 7px; }
.console-photo .photo-trigger .photo-trigger-chip > span { display: none; }
.console-photo .photo-trigger .photo-trigger-chip svg { display: block; width: 18px; height: 18px; flex-basis: 18px; }
.route-photo .photo-trigger .photo-trigger-chip { display: inline-flex; top: 6px; right: 6px; left: auto; bottom: auto; width: 28px; min-height: 28px; margin: 0; padding: 5px; }
.route-photo .photo-trigger .photo-trigger-chip > span { display: none; }
.route-photo .photo-trigger .photo-trigger-chip svg { width: 16px; height: 16px; flex-basis: 16px; }

.photo-gallery {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: var(--gallery-viewport-height, 100%);
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 20px 24px;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 0;
  background: radial-gradient(ellipse at 85% 5%, #55122344, transparent 45%), linear-gradient(145deg, #1d1b1a, #090909 65%);
  color: var(--ivory);
  scrollbar-color: #73604b #171514;
}
.photo-gallery:not([open]) { display: none; }
.photo-gallery-fallback[open] { display: block; z-index: 1000; }
.photo-gallery::backdrop { background: #080808f5; }
.photo-gallery-shell { width: min(1280px, 100%); min-height: 100%; margin-inline: auto; display: flex; flex-direction: column; justify-content: center; }
.photo-gallery-header { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 28px; padding: 0 0 20px; border-bottom: 1px solid #f5f1e824; margin-bottom: 22px; }
.photo-gallery-brand { display: flex; align-items: baseline; gap: 16px; line-height: 1; }
.photo-gallery-brand strong { font: 500 23px/1 var(--display); letter-spacing: .13em; }
.photo-gallery-brand > span { color: #c5b295; font: 400 10px/1.4 var(--display); letter-spacing: .19em; }
.photo-gallery-counter { display: flex; align-items: baseline; gap: 12px; font: 400 13px/1 var(--display); letter-spacing: .05em; color: #a89d90; }
.photo-gallery-counter > span:first-child { color: var(--ivory); font-size: 25px; }
.photo-gallery-counter i { font-style: normal; color: #7b6b58; }
.photo-gallery-close {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #f5f1e83d;
  background: linear-gradient(150deg, #403835, #181716);
  box-shadow: 0 3px 0 #060606, inset 0 1px 0 #ffffff15;
  font-size: 12px;
}
.photo-gallery-close svg { width: 20px; height: 20px; flex-basis: 20px; }
.photo-gallery-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 430px; height: min(69vh, 700px); }
.photo-gallery-visual { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.photo-gallery-stage { position: relative; flex: 1; min-width: 0; min-height: 0; background: #060606; border: 1px solid #b8a06a45; touch-action: pan-y pinch-zoom; }
.photo-gallery-frame { width: 100%; height: 100%; overflow: hidden; display: grid; place-items: center; position: relative; }
.photo-gallery-image { width: 100%; height: 100%; object-fit: contain; max-height: 100%; user-select: none; -webkit-user-select: none; }
.photo-gallery-stage.is-swiping .photo-gallery-image { transform: translateX(var(--swipe-offset,0)); }
.photo-gallery-thumbnails {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-top: 12px;
  padding: 5px 4px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #806346 #151312;
}
.photo-gallery-thumb {
  flex: 0 0 76px;
  height: 56px;
  position: relative;
  padding: 3px;
  border: 1px solid #75655565;
  background: linear-gradient(135deg,#41352b,#151312);
  box-shadow: 0 3px 0 #050505,inset 0 1px 0 #ffffff12;
  overflow: hidden;
  transition: border-color .2s,box-shadow .2s;
}
.photo-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .2s; }
.photo-gallery-thumb span { position: absolute; left: 3px; bottom: 3px; min-width: 24px; padding: 3px 5px; background: #101010e8; color: #f5f1e8; font: 400 10px/1 var(--display); letter-spacing: .08em; }
.photo-gallery-thumb[aria-current="true"] { border-color: #f0b998; box-shadow: 0 3px 0 #6e1525,0 0 13px #c8102e40,inset 0 0 0 1px #c8102e; }
.photo-gallery-thumb[aria-current="true"] img,
.photo-gallery-thumb:hover img,
.photo-gallery-thumb:focus-visible img { opacity: 1; }
.photo-gallery-thumb[aria-current="true"] span { background: #a70b26; }
.photo-gallery-thumb:focus-visible { outline-offset: 2px; }
.photo-gallery-frame.photo-load-error .photo-gallery-image { visibility: hidden; }
.photo-gallery-load { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; font: 400 11px/1 var(--display); letter-spacing: .22em; color: #c5b295; background: #14141475; pointer-events: none; }
.photo-is-loading .photo-gallery-load { display: flex; }
.photo-gallery-error { position: absolute; inset: 35% 12% auto; text-align: center; font-size: 13px; line-height: 2; color: #d2c8b9; }
.photo-gallery-corner { position: absolute; width: 32px; height: 32px; border-color: #dbc49f; border-style: solid; pointer-events: none; z-index: 3; }
.photo-gallery-corner-start { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.photo-gallery-corner-end { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.photo-gallery-arrow {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 5;
  top: calc(50% - 24px);
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid #e9dac16b;
  background: linear-gradient(150deg, #39312bdb, #100e0df2);
  box-shadow: 0 3px 0 #050505b3, inset 0 1px 0 #ffffff1f;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.photo-gallery-prev { left: 14px; }
.photo-gallery-next { right: 14px; }
.photo-gallery-arrow svg { width: 23px; height: 23px; flex-basis: 23px; }
.photo-gallery-arrow:hover,
.photo-gallery-close:hover { background: linear-gradient(150deg, #732b37, #271318); border-color: #ec697e; }
.photo-gallery-story { min-width: 0; overflow: auto; padding: 36px 28px; border-top: 2px solid var(--red); border-right: 1px solid #f5f1e817; border-bottom: 1px solid #f5f1e817; background: linear-gradient(145deg, #342a258c, #191716); display: flex; flex-direction: column; align-items: flex-start; }
.photo-gallery-label { color: #d4bca0; font: 400 10px/1.5 var(--display); letter-spacing: .13em; margin-bottom: 22px; }
.photo-gallery-story h2 { font: 600 clamp(22px, 2.2vw, 28px)/1.75 var(--serif); letter-spacing: .025em; overflow-wrap: anywhere; text-wrap: balance; margin-bottom: 22px; }
.photo-gallery-caption { font-size: 13px; line-height: 2.15; color: #c2bcb3; }
.photo-gallery-cta.button { display: flex; width: 100%; margin-top: 28px; min-height: 50px; padding: 14px 15px; gap: 12px; text-align: left; font-size: 11px; line-height: 1.7; justify-content: space-between; }
.photo-gallery-cta.button > svg { width: 19px; height: 19px; flex-basis: 19px; }
.photo-gallery-caption + .photo-gallery-cta { margin-top: 28px; }
.photo-gallery-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 17px; font-size: 10px; color: #8d857c; }
.photo-gallery :focus-visible { outline: 2px solid #edb89f; outline-offset: 5px; }
.photo-gallery-close:active,
.photo-gallery-arrow:active,
.photo-gallery-close.is-pressed,
.photo-gallery-arrow.is-pressed { transform: translateY(3px) scale(.97); box-shadow: inset 0 3px 9px #0008; }

@keyframes photo-inlet-sweep {
  0% { transform: translateX(-110%); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateX(110%); opacity: 0; }
}

@media (max-width: 1000px) {
  .photo-gallery-main { grid-template-columns: minmax(0, 1fr) 270px; }
  .photo-gallery-story { padding: 28px 22px; }
  .photo-gallery-story h2 { font-size: 25px; }
}
@media (max-width: 760px) {
  .photo-trigger-chip { top: 12px; right: 12px; min-height: 36px; padding: 8px 10px; font-size: 10px; }
  .console-photo .photo-trigger .photo-trigger-chip { top: 6px; right: 6px; }
  .photo-gallery { padding: 0 12px 18px; padding: 0 max(12px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .photo-gallery-shell { justify-content: flex-start; }
  .photo-gallery-header {
    position: sticky;
    top: 0;
    z-index: 8;
    gap: 16px;
    padding: 12px 0 14px;
    padding: max(12px, env(safe-area-inset-top)) 0 14px;
    margin-bottom: 16px;
    background: linear-gradient(145deg,#251b1d,#111111);
    box-shadow: 0 12px 18px #09090980;
  }
  .photo-gallery-brand { display: block; }
  .photo-gallery-brand strong { font-size: 20px; }
  .photo-gallery-brand > span { display: block; font-size: 8px; margin-top: 6px; }
  .photo-gallery-counter { gap: 7px; font-size: 11px; }
  .photo-gallery-counter > span:first-child { font-size: 22px; }
  .photo-gallery-close { width: 46px; min-width: 46px; min-height: 46px; padding: 10px; }
  .photo-gallery-close > span { display: none; }
  .photo-gallery-main { display: flex; flex-direction: column; min-height: 0; height: auto; }
  .photo-gallery-stage { flex: none; height: 38vh; height: 38dvh; min-height: 180px; max-height: 400px; }
  .photo-gallery-frame { height: 100%; }
  .photo-gallery-thumbnails { gap: 8px; margin-top: 8px; padding-bottom: 12px; }
  .photo-gallery-thumb { flex-basis: 68px; height: 50px; }
  .photo-gallery-arrow { width: 44px; min-width: 44px; height: 44px; min-height: 44px; top: calc(50% - 22px); padding: 10px; }
  .photo-gallery-prev { left: 9px; }
  .photo-gallery-next { right: 9px; }
  .photo-gallery-story { padding: 24px 21px 28px; overflow: visible; }
  .photo-gallery-label { font-size: 9px; margin-bottom: 13px; }
  .photo-gallery-story h2 { font-size: 25px; line-height: 1.65; margin-bottom: 14px; }
  .photo-gallery-caption { font-size: 13px; line-height: 2; }
  .photo-gallery-cta.button { margin-top: 22px; font-size: 12px; min-height: 50px; padding: 13px 17px; }
  .photo-gallery-footer { margin-top: 14px; font-size: 10px; gap: 10px; color: #b9b0a5; }
}
@media (max-width: 370px) {
  .photo-gallery { padding-left: 10px; padding-right: 10px; }
  .photo-gallery-header { gap: 12px; }
  .photo-gallery-story { padding: 21px 18px 24px; }
  .photo-gallery-story h2 { font-size: 23px; }
  .photo-gallery-caption { font-size: 12px; }
  .photo-gallery-cta.button { font-size: 11px; padding-inline: 13px; }
  .photo-gallery-footer { flex-direction: column; gap: 4px; font-size: 10px; }
}
@media (min-width: 761px) and (max-height: 620px) {
  .photo-gallery { padding-top: 0; padding-bottom: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .photo-gallery-shell { justify-content: flex-start; }
  .photo-gallery-header {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 12px 0 10px;
    padding: max(12px, env(safe-area-inset-top)) 0 10px;
    margin-bottom: 12px;
    background: linear-gradient(145deg,#251b1d,#111111);
    box-shadow: 0 12px 18px #09090980;
  }
  .photo-gallery-main { min-height: 250px; height: calc(100vh - 140px); height: calc(100dvh - 140px); }
  .photo-gallery-stage { min-height: 150px; }
  .photo-gallery-thumbnails { margin-top: 8px; padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-trigger::before { display: none; animation: none; }
  .photo-frame > img,
  .photo-frame:has(> .photo-trigger.is-pressed) > img { transform: none !important; }
  .photo-trigger-chip { transition: none; }
  .photo-gallery-stage.is-swiping .photo-gallery-image { transform: none; }
  .photo-gallery-thumb,.photo-gallery-thumb img { transition: none; }
}
