body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff;
  color: #1f1f1f;
  overflow: hidden;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  align-items: center;
  overflow: hidden;
}

.toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.25rem 0;
  flex-shrink: 0;
}

.toolbar button {
  padding: 0.25rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.toolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#page-status {
  min-width: 5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#viewer-container {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

#flipbook {
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#flipbook canvas {
  max-width: 100%;
  max-height: 100%;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}
