:root {
  --bg: #050505;
  --panel: rgba(12, 12, 10, 0.92);
  --card: rgba(22, 20, 16, 0.76);
  --card2: rgba(255, 255, 255, 0.04);
  --line: rgba(218, 166, 77, 0.24);
  --line2: rgba(255, 247, 231, 0.13);
  --gold: #d9a64d;
  --gold2: #f4d79c;
  --text: #fff7e7;
  --muted: rgba(255, 247, 231, 0.68);
  --dim: rgba(255, 247, 231, 0.45);
  --radius: 30px;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.60);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -18%, rgba(217, 166, 77, 0.20), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(217, 166, 77, 0.08), transparent 34%),
    #050505;
}
body.villa {
  background:
    radial-gradient(circle at 50% -18%, rgba(217, 166, 77, 0.16), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.05), transparent 34%),
    #050505;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.shell {
  position: relative;
  width: min(780px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 38px;
  padding: clamp(22px, 5vw, 52px);
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.012)), rgba(5,5,5,0.94);
  box-shadow: var(--shadow);
}
.shell::before, .wide-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70%);
}
.glow { position: absolute; width: 310px; height: 310px; border-radius: 999px; filter: blur(82px); opacity: 0.22; background: var(--gold); pointer-events: none; }
.glow.one { right: -145px; top: -155px; }
.glow.two { left: -155px; bottom: -180px; }
.content { position: relative; display: grid; gap: 24px; }
.brand { display: grid; justify-items: center; text-align: center; gap: 12px; }
.logo-img { width: min(520px, 94%); display: block; margin-bottom: 2px; }
body.villa .logo-img { width: min(210px, 52vw); margin-bottom: 12px; }
.eyebrow { margin: 0; color: var(--gold2); text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 850; }
h1 { margin: 0; font-size: clamp(34px, 7.5vw, 64px); line-height: 0.95; letter-spacing: -0.055em; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.02; letter-spacing: -0.045em; }
.lead { margin: 0; max-width: 570px; color: var(--muted); font-size: clamp(16px, 2.4vw, 20px); line-height: 1.45; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn { min-height: 76px; display: grid; place-items: center; border-radius: 22px; padding: 18px 16px; text-align: center; font-weight: 900; font-size: clamp(18px, 3vw, 24px); letter-spacing: -0.03em; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.btn-main { color: #110c04; background: linear-gradient(135deg, #f5d99d, #d9a64d); box-shadow: 0 18px 48px rgba(217, 166, 77, 0.22); }
.btn-ghost { border: 1px solid var(--line2); background: rgba(255,255,255,0.05); }
.quick { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line2); border-radius: 24px; background: rgba(255,255,255,0.035); }
.quick-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 15px; }
.quick-row strong { color: var(--text); font-weight: 800; text-align: right; }
.bottom-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.small-btn, .top-btn { min-height: 52px; display: grid; place-items: center; border: 1px solid rgba(217, 166, 77, 0.26); border-radius: 18px; background: rgba(217, 166, 77, 0.08); color: var(--gold2); font-weight: 850; text-align: center; padding: 12px 14px; }
.note { margin: 0; text-align: center; color: var(--dim); font-size: 13px; line-height: 1.4; }

/* Inner pages */
.inner-page { min-height: 100svh; padding: 18px; }
.wide-shell { position: relative; width: min(1040px, 100%); margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: rgba(5,5,5,0.94); box-shadow: var(--shadow); }
.inner-content { position: relative; padding: clamp(16px, 3vw, 34px); display: grid; gap: 20px; }
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px; margin: -12px -12px 0; border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; background: rgba(8,8,7,0.78); backdrop-filter: blur(16px); }
.topbar .center { display: grid; justify-items: center; text-align: center; gap: 2px; }
.topbar-logo { max-width: 160px; max-height: 52px; object-fit: contain; }
body.villa .topbar-logo { max-width: 70px; max-height: 58px; }
.topbar-title { margin: 0; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 850; }
.topbar .right { justify-self: end; }
.menu-hero { display: grid; gap: 8px; text-align: center; padding: 20px 0 2px; }
.menu-hero p { margin: 0; color: var(--muted); line-height: 1.45; }
.page-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.page-nav a { flex: 0 0 auto; min-width: 42px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(255,255,255,0.045); color: var(--muted); text-align: center; font-size: 14px; font-weight: 800; }
.menu-pages { display: grid; gap: 18px; }
.menu-page { margin: 0; display: grid; gap: 8px; justify-items: center; scroll-margin-top: 110px; }
.menu-page a { display: block; width: min(760px, 100%); }
.menu-page img { display: block; width: 100%; border-radius: 22px; border: 1px solid rgba(255,255,255,0.12); background: #111; box-shadow: 0 18px 52px rgba(0,0,0,0.38); }
.menu-page figcaption { color: var(--dim); font-size: 13px; }
.event-list { display: grid; gap: 14px; }
.event-card { border: 1px solid var(--line2); border-radius: 24px; padding: clamp(18px, 3vw, 26px); background: rgba(255,255,255,0.045); display: grid; gap: 10px; }
.event-date { color: var(--gold2); font-weight: 900; text-transform: uppercase; letter-spacing: .10em; font-size: 13px; }
.event-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.event-empty { text-align: center; border: 1px dashed rgba(217, 166, 77, .30); border-radius: 24px; padding: 32px 18px; color: var(--muted); background: rgba(217,166,77,.045); }
.footer-space { height: 8px; }

@media (hover: hover) { .btn:hover, .small-btn:hover, .top-btn:hover { transform: translateY(-2px); } .btn-ghost:hover { border-color: rgba(242,213,155,.38); background: rgba(255,255,255,.075); } }
@media (max-width: 620px) {
  .page { padding: 12px; align-items: stretch; }
  .shell { min-height: calc(100svh - 24px); border-radius: 28px; padding: 22px 14px 18px; }
  .content { min-height: calc(100svh - 64px); align-content: center; gap: 20px; }
  .actions, .bottom-actions { grid-template-columns: 1fr; }
  .btn { min-height: 72px; }
  .quick { padding: 14px; }
  .quick-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .quick-row strong { text-align: left; }
  .inner-page { padding: 10px; }
  .wide-shell { border-radius: 26px; }
  .inner-content { padding: 12px; }
  .topbar { grid-template-columns: auto 1fr auto; border-radius: 20px; margin: -4px -4px 0; padding: 8px; }
  .topbar-logo { max-width: 118px; max-height: 42px; }
  body.villa .topbar-logo { max-width: 48px; max-height: 48px; }
  .topbar-title { display: none; }
  .top-btn { min-height: 44px; border-radius: 15px; padding: 10px 11px; font-size: 14px; }
  .menu-page img { border-radius: 16px; }
}


/* App-like menu reader / листалка */
body.menu-reader {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -18%, rgba(217, 166, 77, 0.18), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(217, 166, 77, 0.08), transparent 34%),
    #050505;
}

.reader-page {
  height: 100svh;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
}

.reader-topbar {
  position: relative;
  top: auto;
  margin: 0;
  border-radius: 22px;
}

.reader-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012)),
    rgba(5,5,5,0.82);
  box-shadow: 0 18px 64px rgba(0,0,0,0.46);
  touch-action: pan-y;
  user-select: none;
}

.reader-track {
  height: 100%;
  display: flex;
  transform: translate3d(0,0,0);
  transition: transform 240ms ease;
  will-change: transform;
}

.reader-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: clamp(6px, 1.8vw, 14px);
  display: grid;
  place-items: center;
}

.reader-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #111;
  box-shadow: 0 14px 46px rgba(0,0,0,0.42);
  -webkit-user-drag: none;
}

.reader-hit {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 24%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.reader-hit-left { left: 0; }
.reader-hit-right { right: 0; }

.reader-controls {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 10px;
}

.round-btn {
  min-height: 54px;
  border: 1px solid rgba(217, 166, 77, 0.30);
  border-radius: 18px;
  background: rgba(217, 166, 77, 0.09);
  color: var(--gold2);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.reader-counter {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--line2);
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5d99d, #d9a64d);
  transition: width 220ms ease;
}

.reader-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reader-bottom .small-btn {
  min-height: 46px;
}

@media (max-width: 620px) {
  .reader-page {
    padding: calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  .reader-topbar {
    grid-template-columns: auto 1fr auto;
    padding: 8px;
    border-radius: 18px;
  }

  .reader-stage {
    border-radius: 20px;
  }

  .reader-slide {
    padding: 5px;
  }

  .reader-slide img {
    border-radius: 13px;
  }

  .reader-controls {
    grid-template-columns: 48px 1fr 48px;
    gap: 8px;
  }

  .round-btn,
  .reader-counter {
    min-height: 48px;
    border-radius: 16px;
  }

  .reader-bottom {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .reader-bottom .small-btn {
    min-height: 44px;
  }
}


/* Update: fitted preview + fullscreen swipe/click reader */
.reader-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.reader-bottom .small-btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
}

.fullscreen-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% -10%, rgba(217, 166, 77, 0.16), transparent 36%),
    rgba(0, 0, 0, 0.96);
  touch-action: pan-y;
  user-select: none;
}

.fullscreen-viewer.is-open {
  display: grid;
}

.fs-head {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.fs-title {
  margin: 0;
  justify-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fs-btn {
  min-height: 44px;
  border: 1px solid rgba(217, 166, 77, 0.30);
  border-radius: 16px;
  padding: 9px 13px;
  background: rgba(217, 166, 77, 0.10);
  color: var(--gold2);
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

.fs-btn.close {
  justify-self: end;
  min-width: 48px;
  font-size: 24px;
  line-height: 1;
}

.fs-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.fs-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: #080808;
  -webkit-user-drag: none;
}

.fs-zone {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 35%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.fs-zone.left { left: 0; }
.fs-zone.right { right: 0; }

.fs-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 166, 77, 0.22);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--gold2);
  font-size: 42px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0.78;
}

.fs-arrow.left { left: 10px; }
.fs-arrow.right { right: 10px; }

.fs-footer {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 10px;
}

.fs-footer .reader-counter {
  min-height: 48px;
}

@media (max-width: 620px) {
  .fullscreen-viewer {
    gap: 6px;
    padding: calc(6px + env(safe-area-inset-top)) 6px calc(6px + env(safe-area-inset-bottom));
  }

  .fs-head {
    grid-template-columns: auto 1fr auto;
  }

  .fs-title {
    font-size: 11px;
  }

  .fs-btn {
    min-height: 40px;
    border-radius: 14px;
    padding: 8px 11px;
  }

  .fs-arrow {
    display: none;
  }

  .fs-footer {
    grid-template-columns: 48px 1fr 48px;
    gap: 8px;
  }
}


/* Height-fit fix v4: меню вписывается по высоте без обрезки */
html,
body.menu-reader {
  height: 100%;
  overflow: hidden !important;
}

.reader-page {
  height: 100svh !important;
  max-height: 100svh !important;
  overflow: hidden !important;
}

.reader-stage {
  min-height: 0 !important;
  overflow: hidden !important;
}

.reader-track {
  height: 100% !important;
  min-height: 0 !important;
  align-items: stretch !important;
}

.reader-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px !important;
}

.reader-slide img {
  display: block !important;
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 14px !important;
}

.fullscreen-viewer {
  height: 100svh !important;
  max-height: 100svh !important;
  overflow: hidden !important;
}

.fs-stage {
  min-height: 0 !important;
  overflow: hidden !important;
}

.fs-img {
  display: block !important;
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

@media (orientation: portrait) {
  .reader-slide img,
  .fs-img {
    height: auto !important;
    width: 100% !important;
    max-height: 100% !important;
    max-width: 100% !important;
  }
}

@media (orientation: landscape) {
  .reader-slide img,
  .fs-img {
    height: 100% !important;
    width: auto !important;
    max-height: 100% !important;
    max-width: 100% !important;
  }
}


/* Fullscreen background contain fix v1 */
.fullscreen-viewer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  background: rgba(0,0,0,0.98) !important;
}

.fullscreen-viewer.is-open {
  display: grid !important;
}

.fs-stage {
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  position: relative !important;
}

.fs-image-box {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: contain !important;
}

.fs-img {
  display: none !important;
}


/* Fullscreen clean UI + zoom v1 */
.fullscreen-viewer {
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  background: rgba(0,0,0,0.985) !important;
}

.fs-head,
.fs-footer,
.fs-arrow {
  transition: opacity .22s ease, transform .22s ease;
}

.fullscreen-viewer.chrome-hidden .fs-head {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.fullscreen-viewer.chrome-hidden .fs-footer {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.fullscreen-viewer.chrome-hidden .fs-arrow {
  opacity: 0;
}

.fs-center {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.fs-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fs-zoom button {
  min-width: 42px;
  min-height: 32px;
  border: 1px solid rgba(217, 166, 77, 0.28);
  border-radius: 12px;
  background: rgba(217, 166, 77, 0.10);
  color: var(--gold2);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.fs-zoom .fs-zoom-level {
  min-width: 64px;
  color: rgba(255, 247, 231, .72);
}

.fs-image-box {
  transform-origin: center center !important;
  will-change: transform !important;
  transition: transform .12s ease !important;
  cursor: zoom-in;
}

.fullscreen-viewer.is-zoomed .fs-image-box {
  cursor: grab;
}

.fullscreen-viewer.is-zoomed .fs-image-box:active {
  cursor: grabbing;
}

.fullscreen-viewer.is-zoomed .fs-zone {
  pointer-events: none;
}

.fullscreen-viewer.is-zoomed .fs-arrow {
  display: none !important;
}

@media (max-width: 620px) {
  .fs-center {
    gap: 3px;
  }

  .fs-zoom button {
    min-width: 38px;
    min-height: 30px;
    border-radius: 10px;
    padding: 4px 8px;
  }

  .fs-zoom .fs-zoom-level {
    min-width: 58px;
  }
}


/* Autohide v2: элементы управления в полном экране реально прячутся */
.fullscreen-viewer.chrome-hidden .fs-head,
.fullscreen-viewer.chrome-hidden .fs-footer,
.fullscreen-viewer.chrome-hidden .fs-arrow {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.fullscreen-viewer.chrome-hidden .fs-head {
  transform: translateY(-18px) !important;
}

.fullscreen-viewer.chrome-hidden .fs-footer {
  transform: translateY(18px) !important;
}

.fullscreen-viewer.chrome-hidden {
  cursor: none;
}

.fullscreen-viewer:not(.chrome-hidden) {
  cursor: default;
}


/* Overlay UI v1: controls float over image with transparency */
.fullscreen-viewer {
  position: fixed !important;
  inset: 0 !important;
  display: none !important;
  background: rgba(0,0,0,0.985) !important;
  overflow: hidden !important;
}

.fullscreen-viewer.is-open {
  display: block !important;
}

.fs-stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  display: block !important;
  overflow: hidden !important;
}

.fs-image-box {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: contain !important;
}

.fs-head {
  position: absolute !important;
  top: calc(8px + env(safe-area-inset-top)) !important;
  left: 8px !important;
  right: 8px !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: start !important;
  gap: 8px !important;
}

.fs-footer {
  position: absolute !important;
  left: 8px !important;
  right: 8px !important;
  bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: 54px 1fr 54px !important;
  align-items: center !important;
  gap: 10px !important;
}

.fs-head > .fs-btn,
.fs-head > .fs-center,
.fs-footer > .round-btn,
.fs-footer > .reader-counter {
  background: rgba(8, 8, 8, 0.34) !important;
  backdrop-filter: blur(10px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(120%) !important;
  border: 1px solid rgba(217, 166, 77, 0.24) !important;
  box-shadow: 0 10px 34px rgba(0,0,0,0.24) !important;
}

.fs-head > .fs-btn,
.fs-head > .fs-center {
  min-height: 48px !important;
  border-radius: 16px !important;
}

.fs-head > .fs-center {
  padding: 8px 12px !important;
}

.fs-footer > .round-btn {
  min-height: 48px !important;
  border-radius: 16px !important;
}

.fs-footer > .reader-counter {
  min-height: 48px !important;
  border-radius: 16px !important;
}

.fs-arrow {
  background: rgba(8, 8, 8, 0.24) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.fs-zone {
  width: 26% !important;
}

@media (max-width: 620px) {
  .fs-head {
    top: calc(6px + env(safe-area-inset-top)) !important;
    left: 6px !important;
    right: 6px !important;
    gap: 6px !important;
  }

  .fs-footer {
    left: 6px !important;
    right: 6px !important;
    bottom: calc(6px + env(safe-area-inset-bottom)) !important;
    gap: 8px !important;
    grid-template-columns: 48px 1fr 48px !important;
  }

  .fs-head > .fs-btn,
  .fs-head > .fs-center,
  .fs-footer > .round-btn,
  .fs-footer > .reader-counter {
    backdrop-filter: blur(8px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(120%) !important;
  }
}


/* Image load fix v2 */
.reader-slide img {
  background: #050505 !important;
}

.reader-slide img[data-src] {
  opacity: .001;
}

.reader-slide img.is-loaded {
  opacity: 1;
}

.reader-slide::after {
  content: "загрузка страницы...";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,247,231,.45);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
}

.reader-slide.is-loading::after {
  opacity: 1;
}

/* Events page + PHP admin frontend */
.events-page{width:min(1040px,100%);min-height:100svh;margin:0 auto;padding:calc(14px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));color:var(--text)}
.events-hero{margin:18px 0;padding:clamp(22px,4vw,42px);border:1px solid var(--line);border-radius:30px;background:radial-gradient(circle at 15% 0%,rgba(217,166,77,.18),transparent 42%),linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.012)),rgba(5,5,5,.88);box-shadow:0 16px 58px rgba(0,0,0,.34)}
.events-hero h1{margin:8px 0 10px}
.events-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
.tab{min-height:54px;border:1px solid rgba(217,166,77,.22);border-radius:18px;background:rgba(255,255,255,.04);color:var(--gold2);font:inherit;font-weight:900;cursor:pointer}
.tab.is-active{color:#110c04;background:linear-gradient(135deg,#f5d99d,#d9a64d)}
.events-grid{display:grid;gap:14px}
.event-card{overflow:hidden;border:1px solid var(--line);border-radius:28px;background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.012)),rgba(5,5,5,.88);box-shadow:0 16px 58px rgba(0,0,0,.28)}
.event-image{width:100%;aspect-ratio:16/9;display:block;object-fit:cover;background:rgba(255,255,255,.045)}
.event-body{padding:clamp(18px,3vw,26px)}
.event-date{display:inline-flex;align-items:center;gap:8px;margin-bottom:10px;color:var(--gold2);font-size:13px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.event-card h2{margin:0 0 10px;font-size:clamp(24px,4vw,38px);line-height:1;letter-spacing:-.04em}
.event-card p{margin:0;color:var(--muted);font-size:16px;line-height:1.55;white-space:pre-line}
.event-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:18px}
.event-empty{padding:28px;border:1px solid var(--line);border-radius:26px;background:rgba(255,255,255,.035);text-align:center}
.event-empty h2{margin:0 0 8px}.event-empty p{margin:0;color:var(--muted)}
@media (min-width:760px){.events-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.event-card.featured{grid-column:1/-1}}


/* Events scroll fix v1 */
body:not(.menu-reader) {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  touch-action: auto !important;
}

body:not(.menu-reader) .events-page {
  min-height: 100dvh !important;
  overflow: visible !important;
}

body:not(.menu-reader) .event-card,
body:not(.menu-reader) .event-image,
body:not(.menu-reader) .event-body {
  touch-action: auto !important;
}


/* console-fix-002: афишу показываем целиком, без обрезки */
.event-image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #050505 !important;
}

/* чтобы картинка и текст выглядели как единый блок */
.event-card {
  overflow: hidden !important;
}

/* если афиша очень маленькая/узкая — не растягиваем некрасиво */
.event-card .event-image {
  border-bottom: 1px solid rgba(218, 166, 77, 0.14);
}


/* console-fix-005: логотип в верхней панели афиши */
.topbar .center {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
}

.topbar-logo {
  display: block;
  max-width: 92px;
  max-height: 38px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 620px) {
  .topbar-logo {
    max-width: 78px;
    max-height: 34px;
  }
}
