html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
}

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#flipbook {
  width: 100vw;
  height: 100vh;
}

#flipbook,
#flipbook .stf__parent,
#flipbook .stf__wrapper,
#flipbook .stf__block {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

#flipbook .stf__block,
#flipbook .stf__item,
#flipbook .stf__itemInner {
  background: #fffdf8 !important;
}

.flip-page {
  box-sizing: border-box;
  background: linear-gradient(180deg, #fffefb 0%, #fdf8ee 100%);
  color: #2e2418;
  border: 0;
  padding: 20px;
  overflow: hidden;
}

.flip-cover,
.flip-end {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, #f8efdf 0%, #e8d5b5 100%);
}

.flip-cover h1,
.flip-end h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 48px);
}

.flip-cover p,
.flip-end p {
  margin: 0;
  font-size: clamp(14px, 2vw, 22px);
}

.art-img {
  width: 100%;
  height: calc(100% - 220px);
  object-fit: contain;
  border: 1px solid #e6d9c5;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(66, 45, 20, 0.12);
}

.meta {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e8dcc8;
  border-radius: 10px;
  background: rgba(255, 254, 251, 0.92);
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.45;
}

.meta-title {
  margin: 0 0 6px;
  font-size: clamp(16px, 1.6vw, 24px);
  line-height: 1.25;
}

.meta a {
  color: #5d4427;
  text-decoration: none;
}

.meta a:hover {
  text-decoration: underline;
}

.meta-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 20px;
  color: #6f5a40;
}

.controls {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 50;
}

.btn-flip {
  border: 1px solid #bda98d;
  background: #fff9ef;
  color: #4a3b2a;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-flip[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 780px) {
  .flip-page {
    padding: 12px;
  }

  .art-img {
    height: calc(100% - 210px);
  }

  .meta {
    padding: 10px;
  }
}
