:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #e8ebf1;
  color: #111827;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #cbd5e1;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(3px);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-indicator {
  margin-left: 0.25rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  font-size: 0.9rem;
  color: #334155;
  background: #f8fafc;
}

button {
  border: 1px solid #94a3b8;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #0f172a;
  padding: 0.5rem 0.8rem;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover {
  background: #f1f5f9;
}

button:active {
  transform: translateY(1px);
}

.hint {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.stage-wrap {
  width: 100%;
  height: calc(100vh - 76px);
  min-height: 540px;
  overflow: auto;
  padding: 1rem;
}

.pages-column {
  width: min(94vw, 1040px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page {
  position: relative;
  width: min(92vw, 980px);
  margin: 0 auto;
  aspect-ratio: 1 / 1.4142;
  border: 1px dashed #94a3b8;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.12);
}

.page.active {
  border-color: #2563eb;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.page-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.drop-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  color: #1d4ed8;
  font-size: 1.15rem;
  font-weight: 600;
  border: 2px dashed #2563eb;
  background: rgba(219, 234, 254, 0.65);
  transition: opacity 120ms ease-out;
}

.page.drag-active .drop-overlay {
  opacity: 1;
}
