.book-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(7, 11, 20, 0.72);
}

.book-layer[hidden] { display: none; }

.book-dialog {
  position: relative;
  width: min(92vw, 72.5rem);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--light);
  color: var(--light-ink);
  border-radius: var(--radius);
  overflow: auto;
}

.book-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  border: 1px solid rgba(16, 24, 40, 0.16);
  background: #fff;
  color: var(--light-ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.book-stage {
  position: relative;
  min-height: 36rem;
  padding-top: 3.1rem;
}

.book-status,
.book-fallback {
  margin: 0;
  padding: 2.5rem 1.25rem;
  color: var(--light-muted);
  font-family: var(--font-body);
}

.book-status {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: var(--light);
}

.book-status[hidden] { display: none; }

.book-cal {
  min-height: 0;
  background: var(--light);
}

.book-cal iframe {
  display: block;
  width: 100%;
  border: 0;
}

.book-fallback a { color: var(--light-ink); }

@media (max-width: 800px) {
  .book-layer {
    padding: 0;
    align-items: stretch;
  }

  .book-dialog {
    width: 100%;
    max-height: 100svh;
    height: 100svh;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .book-stage {
    flex: 1;
    min-height: 0;
  }

  .book-cal { height: 100%; }

  .book-cal iframe { height: 100% !important; }
}
