* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
  font-family: Inter, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #111827 0%, #0b1020 32%, #050914 100%);
  color: #edf2ff;
}

body {
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 28px);
}

.viewer-shell {
  width: min(100%, 1200px);
  min-height: min(84vh, 870px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 18px);
}

.book-frame {
  position: relative;
  width: min(100%, 1080px);
  min-height: 620px;
  padding: 16px 18px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(8, 12, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.book-frame::before,
.book-frame::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  width: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(44, 38, 27, 0.9), rgba(19, 14, 10, 0.9));
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 18px rgba(0, 0, 0, 0.2);
}

.book-frame::before {
  left: 16px;
}

.book-frame::after {
  right: 16px;
}

._df_book {
  position: relative;
  z-index: 3;
  width: min(100%, 1000px);
  height: min(74vh, 760px);
  min-height: 520px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 54px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(109, 80, 49, 0.2);
}

._df_book .df-ui {
  border-radius: 18px;
}

@media (max-width: 720px) {
  body {
    padding: 10px;
  }

  .viewer-shell {
    min-height: 100vh;
    padding: 8px;
  }

  .book-frame {
    width: 100%;
    min-height: 460px;
    padding: 10px 12px 12px;
    border-radius: 20px;
  }

  .book-frame::before,
  .book-frame::after {
    top: 10px;
    bottom: 10px;
    width: 12px;
  }

  ._df_book {
    min-height: 420px;
    height: 60vh;
  }
}
