

/* Start:/leaflet/leaflet.css?17780744098250*/
:root {
  --lf-bg:      #1a1a1a;
  --lf-accent:  #e8312a;
  --lf-accent2: #f5a623;
  --lf-text:    #f0ece4;
  --lf-muted:   #888;
  --lf-shadow:  0 20px 60px rgba(0,0,0,.65), 0 8px 24px rgba(0,0,0,.45);

  /* Размер одной страницы */
  --lf-page-w: 520px;
  --lf-page-h: calc(var(--lf-page-w) * 1.414);
}

/* ── Обёртка ── */
#leaflet-app {
  width: 100%;
  background: var(--lf-bg);
  color: var(--lf-text);
  font-family: Georgia, "Times New Roman", serif;
  padding: 24px 16px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Подзаголовок ── */
#leaflet-app .lf-header {
  width: 100%;
  max-width: calc(var(--lf-page-w) * 2 + 10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

#leaflet-app .lf-logo {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lf-accent);
}

#leaflet-app .lf-issue {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lf-muted);
}

#leaflet-app #lf-issue-label {
  color: var(--lf-accent2);
  font-weight: 600;
}

/* ── Загрузчик ── */
#lf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 0;
}

.lf-loader-bar {
  width: 140px; height: 2px;
  background: #333; border-radius: 2px; overflow: hidden;
}

.lf-loader-bar-inner {
  height: 100%; background: var(--lf-accent);
  width: 0%; transition: width .3s; border-radius: 2px;
}

.lf-loader-text {
  font-size: .72rem; color: var(--lf-muted); letter-spacing: .08em;
}

/* ── Книга ── */
#lf-book-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Тень под книгой как на столе */
  filter: drop-shadow(0 40px 30px rgba(0,0,0,.5));
}

/* Корешок */
.lf-spine {
  width: 5px;
  height: var(--lf-page-h);
  background: linear-gradient(to right, #0a0a0a, #444, #0a0a0a);
  z-index: 10;
  flex-shrink: 0;
  border-radius: 1px;
}

/* Страница */
.lf-page-slot {
  width: var(--lf-page-w);
  height: var(--lf-page-h);
  position: relative;
  overflow: hidden;
  background: #eee;
  box-shadow: var(--lf-shadow);
  /* Небольшая перспектива для объёма */
  flex-shrink: 0;
}

.lf-page-slot.lf-left  {
  border-radius: 4px 0 0 4px;
  /* Левая страница чуть темнее у корешка */
  box-shadow: var(--lf-shadow), inset -6px 0 18px rgba(0,0,0,.15);
}
.lf-page-slot.lf-right {
  border-radius: 0 4px 4px 0;
  box-shadow: var(--lf-shadow), inset 6px 0 18px rgba(0,0,0,.1);
}

.lf-page-slot img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ── Flip-анимация ── */
.lf-flipper-wrap {
  position: absolute; top: 0;
  width: var(--lf-page-w); height: var(--lf-page-h);
  /* Больше перспектива = более реалистичный объём */
  perspective: 3500px;
  pointer-events: none;
  z-index: 20;
  display: none;
}

.lf-flipper-wrap.from-right { right: 0; }
.lf-flipper-wrap.from-left  { left: 0; }

.lf-flipper {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: left center;
  /* Плавнее: 1.1s вместо 0.7s, ease-in-out кривая */
  transition: transform 1.1s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.lf-flipper-wrap.from-left .lf-flipper {
  transform-origin: right center;
}

.lf-flipper .lf-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.lf-flipper .lf-face img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block; pointer-events: none;
}

.lf-flipper .lf-back { transform: rotateY(180deg); }

/* Тень при перелистывании */
.lf-flipper::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,.35));
  opacity: 0; transition: opacity .5s ease;
  backface-visibility: hidden;
  pointer-events: none; z-index: 2;
}

.lf-flipper.lf-animating::after { opacity: 1; }
.lf-flipper.lf-flip { transform: rotateY(-180deg); }
.lf-flipper-wrap.from-left .lf-flipper.lf-flip { transform: rotateY(180deg); }

/* ── Скелетон ── */
.lf-skeleton {
  width: 100%; height: 100%;
  background: linear-gradient(110deg, #2a2a2a 30%, #383838 50%, #2a2a2a 70%);
  background-size: 200% 100%;
  animation: lf-shimmer 1.4s infinite;
}

@keyframes lf-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Навигация ── */
.lf-nav {
  display: flex; align-items: center; gap: 20px;
  margin-top: 20px; user-select: none;
}

.lf-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  border: 1.5px solid #444; border-radius: 40px;
  background: transparent; color: var(--lf-text);
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, opacity .2s;
  font-family: Georgia, serif; line-height: 1;
}

.lf-btn:hover:not(:disabled) {
  border-color: var(--lf-accent); color: var(--lf-accent);
  background: rgba(232,49,42,.06);
}

.lf-btn:disabled { opacity: .28; cursor: not-allowed; }

.lf-counter {
  font-size: .75rem; color: var(--lf-muted);
  letter-spacing: .08em; min-width: 64px; text-align: center;
}

#lf-cur { color: var(--lf-text); font-size: .95rem; }

/* ── Миниатюры ── */
.lf-thumbs {
  display: flex; gap: 6px;
  margin-top: 16px;
  overflow-x: auto;
  padding: 4px 8px 10px;
  max-width: min(100%, calc(var(--lf-page-w) * 2 + 10px));
  scrollbar-width: thin; scrollbar-color: #444 transparent;
}

.lf-thumbs::-webkit-scrollbar { height: 4px; }
.lf-thumbs::-webkit-scrollbar-track { background: transparent; }
.lf-thumbs::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

.lf-thumb {
  flex-shrink: 0; width: 44px; height: 62px;
  border-radius: 3px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .18s, transform .18s;
  background: #2a2a2a;
}

.lf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-thumb:hover  { transform: translateY(-3px); border-color: #666; }
.lf-thumb.active { border-color: var(--lf-accent); }

/* ── Кликабельные страницы ── */
.lf-page-slot.lf-right { cursor: e-resize; }
.lf-page-slot.lf-left  { cursor: w-resize; }

/* ── Загнутый уголок (canvas поверх книги) ── */
#lf-curl {
  position: absolute;
  bottom: 0;
  right: 0;
  pointer-events: none;
  z-index: 15;
}

/* ── Ошибка ── */
.lf-error {
  color: var(--lf-accent); text-align: center;
  padding: 40px; line-height: 1.7;
}

/* ── Подсказка листания ── */
.lf-hint {
  font-size: .65rem; color: #555;
  letter-spacing: .08em; margin-top: 8px;
  text-align: center;
}

/* ══════════════════════════════════════
   АДАПТИВ
   ══════════════════════════════════════ */

/* Большие мониторы — страница крупнее */
@media (min-width: 1200px) {
  :root { --lf-page-w: 580px; }
}

@media (min-width: 1600px) {
  :root { --lf-page-w: 640px; }
}

/* Планшеты */
@media (max-width: 1400px) {
  :root {
    --lf-page-w: clamp(280px, 46vw, 640px);
  }
}

/* Мобильные — одна страница */
@media (max-width: 600px) {
  :root {
    --lf-page-w: min(calc(100vw - 24px), 400px);
  }
  .lf-page-slot.lf-left { display: none !important; }
  .lf-spine              { display: none !important; }
  .lf-flipper-wrap.from-right { left: 0; right: auto; }
  #leaflet-app { padding: 16px 12px 24px; }
}
/* End */
/* /leaflet/leaflet.css?17780744098250 */
