/* Invitation and photo viewer: mobile-only. Desktop invitation stays unchanged. */
.mobile-photo-viewer, .mobile-invitation { display: none; }
.mobile-installation-photo-open { display: none; }
@media (max-width: 900px) {
  body.page-installations:not(.page-installations-boxes) .inst-main {
    position: relative; min-height: 100svh;
    padding: calc(var(--mobile-header) + 62px) 30px 150px 20px;
    align-items: center; justify-content: center;
  }
  .inst-hero { min-height: 55svh; height: auto; justify-content: center; }
  .inst-hero > img { max-height: 64svh; max-width: 100%; }
  .mobile-installation-photo-open {
    display: block; position: absolute; inset: 0; width: 100%; height: 100%;
    padding: 0; background: transparent; border: 0; border-radius: 12px;
  }
  .inst-ticket:not(.open), .inst-ticket:not(.open):hover {
    width: min(68vw, 300px); height: min(60svh, 440px);
    transform: translate(calc(100% - 48px), -50%) rotate(-4deg);
  }
  .mobile-photo-viewer[open], .mobile-invitation[open] {
    display: flex; flex-direction: column; position: fixed; inset: 0;
    width: 100%; height: 100dvh; max-width: 100%; max-height: 100dvh;
    margin: 0; padding: 0; border: 0; border-radius: 0;
    background: #0c1110; color: #e6ede7; overflow: hidden;
  }
  .mobile-photo-viewer::backdrop, .mobile-invitation::backdrop { background: #050806eb; }
  .mobile-installation-toolbar {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    border-bottom: 1px solid #a8c0ae26; background: #0e1713;
  }
  .mobile-installation-toolbar h2 { margin: 0; font: 500 16px/1.4 var(--sans-2); }
  .mobile-installation-toolbar button, .mobile-zoom-controls button {
    display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 48px; min-height: 48px;
    padding: 8px; border: 1px solid #a8c0ae40; border-radius: 50%; background: #213128; color: #deeee1;
    font: 24px/1 var(--sans-2);
  }
  .mobile-invitation-body {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; touch-action: pan-y pinch-zoom;
    padding: 20px 22px calc(34px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-invitation-art { display: block; position: relative; width: 100%; padding: 0; background: none; border: 0; }
  .mobile-invitation-art img { display: block; width: auto; max-width: 100%; max-height: 48svh; height: auto; margin: 0 auto; border-radius: 8px; }
  .mobile-invitation-copy { padding-top: 16px; font: 16px/1.85 var(--sans-2); letter-spacing: .01em; }
  .mobile-invitation-copy .ttx-line { margin: 0 0 24px; color: #e4eade; }
  .mobile-invitation-copy .ttx-cipher {
    color: rgba(140, 255, 170, .85);
    user-select: none;
    /* Блюр, сканлайны и Matrix-проявление слов наследуются от оригинала. */
  }
  .mobile-photo-viewer { background: #0a0c10; }
  .mobile-zoom-stage {
    flex: 1; min-height: 0; overflow: auto; touch-action: none;
    overscroll-behavior: contain; background: #0a0c10; cursor: grab;
  }
  .mobile-zoom-stage:active { cursor: grabbing; }
  .mobile-zoom-surface { display: grid; place-items: center; min-width: 100%; min-height: 100%; }
  .mobile-zoom-surface img { display: block; max-width: none; max-height: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
  .mobile-zoom-controls {
    display: flex; align-items: center; justify-content: center; gap: 16px; flex: 0 0 auto;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: #0e1713;
  }
  .mobile-zoom-controls .mobile-zoom-reset { min-width: 72px; border-radius: 24px; font-size: 13px; font-variant-numeric: tabular-nums; }
}
