@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/montserrat-black-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/montserrat-black-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --background: #fcfaf7;
  --paper: #f3eee8;
  --ink: #382f29;
  --muted: #93877b;
  --accent: #765b49;
  --border: #e7ddd3;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 900;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; background: var(--background); color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, .stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.page { max-width: 1064px; padding: 0 32px 24px; margin: auto; }
.header { height: 80px; display: flex; align-items: center; justify-content: flex-end; }
.telegram { display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border: 1px solid var(--border); border-radius: 8px; background: #fffdfb; color: var(--accent); font-size: 14px; transition: background .15s; }
.telegram:hover { background: var(--paper); }
.telegram svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
h1 { margin: 9px 0 29px; text-align: center; font-size: clamp(30px, 3.7vw, 42px); font-weight: 900; line-height: 1.18; letter-spacing: -1.25px; }
.gallery { width: 100%; }
.stage { position: relative; display: flex; align-items: center; justify-content: center; height: clamp(330px, calc(100svh - 270px), 730px); background: var(--paper); border-radius: 14px; overflow: hidden; touch-action: pan-y pinch-zoom; }
.photo-area { width: 100%; height: 100%; padding: 20px 82px; display: flex; align-items: center; justify-content: center; position: relative; cursor: zoom-in; }
.photo-area img { display: block; max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 5px 24px #49331c13; user-select: none; -webkit-user-select: none; }
.photo-area img.is-loading { opacity: .4; }
.photo-area img.enter-next { animation: enter-next .18s ease-out; }
.photo-area img.enter-prev { animation: enter-prev .18s ease-out; }
@keyframes enter-next { from { opacity: .5; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes enter-prev { from { opacity: .5; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 1px solid #ddd1c4; border-radius: 50%; background: #fffdfaee; display: grid; place-items: center; color: var(--accent); box-shadow: 0 2px 8px #4b36200a; z-index: 2; }
.nav:hover { background: #fff; border-color: #b69e89; }
.nav svg { width: 19px; height: 19px; }
.nav-prev { left: 22px; }
.nav-prev svg { transform: rotate(180deg); }
.nav-next { right: 22px; }
.expand { position: absolute; right: 22px; bottom: 18px; width: 36px; height: 36px; border: 1px solid #ddd1c4; border-radius: 8px; background: #fffdfaee; display: grid; place-items: center; color: var(--accent); }
.expand svg { width: 17px; height: 17px; }
.image-status { position: absolute; inset: 0; text-align: center; place-content: center; padding: 30px; font-size: 13px; line-height: 1.5; color: var(--accent); background: #f3eee8ec; pointer-events: none; }
.image-status:not([hidden]) { display: grid; }
.image-status.error { pointer-events: auto; cursor: pointer; }
dialog { width: min(1100px, 96vw); height: 95dvh; max-height: 95dvh; margin: auto; padding: 0; overflow: hidden; background: var(--background); color: var(--ink); border: 1px solid var(--border); border-radius: 14px; }
dialog::backdrop { background: #382f2980; }
.lightbox-toolbar { position: relative; z-index: 5; height: 68px; padding: 12px 16px; background: var(--background); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.lightbox-toolbar form { margin: 0; }
.lightbox-toolbar button { border: 1px solid var(--border); border-radius: 8px; background: #fffdfb; min-height: 44px; color: var(--accent); display: flex; align-items: center; justify-content: center; gap: 10px; }
.lightbox-toolbar .zoom { width: 44px; padding: 9px; }
.lightbox-toolbar .zoom[aria-pressed="true"] { background: #e9ddd1; }
.lightbox-toolbar .close { padding: 10px 14px; font-size: 14px; }
.close svg { width: 19px; height: 19px; }
.lightbox-scroll { height: calc(100% - 68px); padding: 16px; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; display: grid; place-items: center; }
.lightbox-scroll img { display: block; max-width: 100%; max-height: calc(95dvh - 102px); width: auto; height: auto; object-fit: contain; }
.lightbox-scroll.zoomed { display: block; }
.lightbox-scroll.zoomed img { width: var(--zoom-width); max-width: none; max-height: none; margin: 0 auto; }
body.modal-open { overflow: hidden; }
.noscript { text-align: center; padding: 20px; }
@media (max-width: 600px) {
  .page { padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
  .header { height: 64px; }
  .telegram { padding: 10px 13px; font-size: 13px; }
  h1 { max-width: 340px; margin: 7px auto 24px; font-size: 30px; letter-spacing: -.8px; line-height: 1.2; text-wrap: balance; }
  .stage { height: clamp(320px, calc(100svh - 239px), 780px); border-radius: 11px; }
  .photo-area { padding: 10px 7px; }
  .photo-area img { border-radius: 3px; }
  .nav { height: 44px; width: 40px; border-radius: 10px; background: #fffdfaf2; }
  .nav-prev { left: 7px; }
  .nav-next { right: 7px; }
  .nav svg { width: 17px; height: 17px; }
  .expand { right: 8px; bottom: 10px; width: 34px; height: 34px; }
  dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .lightbox-toolbar { height: calc(64px + env(safe-area-inset-top)); padding-top: calc(10px + env(safe-area-inset-top)); }
  .lightbox-scroll { height: calc(100% - 64px - env(safe-area-inset-top)); padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); }
  .lightbox-scroll img { max-height: calc(100dvh - 88px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
@media (max-height: 550px) and (orientation: landscape) { .stage { height: 78svh; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; transition: none !important; } }
