.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .8rem; }
.page { position: relative; background: #f6f8f7; border: 1px solid var(--border); border-radius: 10px; padding: .4rem; display: flex; flex-direction: column; gap: .35rem; }
.page canvas { width: 100%; height: 150px; object-fit: contain; background: #fff; border-radius: 6px; cursor: pointer; display: block; }
.page .num { position: absolute; top: .55rem; left: .55rem; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: .05rem .45rem; }
.page .acts { display: flex; justify-content: space-between; }
.page .acts button { display: grid; place-items: center; background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: .3rem; cursor: pointer; color: var(--muted); }
.page .acts button:disabled { opacity: .35; cursor: default; }
.page .acts button:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }

.editor { position: fixed; inset: 0; background: #111816; z-index: 50; display: flex; flex-direction: column; }
.ed-bar, .ed-tools { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding: .6rem .8rem; background: #1b2522; color: #fff; flex-wrap: wrap; }
.ed-tools { justify-content: center; }
.ed-tools select { width: auto; padding: .3rem .5rem; }
.ed-hint { font-size: .85rem; opacity: .8; text-align: center; flex: 1; }
.ed-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; padding: 14px; }
.ed-stage canvas { touch-action: none; max-width: none; }
