/* Cover maker (cover.html): the studio's components (app.css) in a layout of its own. */
.cv-app { display: grid; grid-template-columns: var(--left) 1fr var(--right); height: calc(100vh - 52px); }
.cv-side { background: var(--panel); overflow-y: auto; overflow-x: hidden; }
.cv-side.left { border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.cv-side.right { border-left: 1px solid var(--line); }
.cv-side::-webkit-scrollbar { width: 8px; }
.cv-side::-webkit-scrollbar-thumb { background: #2a2a38; border-radius: 8px; }
.cv-stage { display: flex; flex-direction: column; min-width: 0; background: #09090d; }
.cv-viewport { flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px 12px 12px; }
#cv-preview {
  border-radius: 10px; background: #000; touch-action: none; cursor: grab;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
#cv-preview.dragging { cursor: grabbing; }
.drop .file-name { margin-bottom: 2px; }
.opt { color: var(--faint); font-size: 11px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); transition: transform 0.12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.swatch-pick {
  position: relative; display: grid; place-items: center; cursor: pointer; overflow: hidden;
  background: conic-gradient(#ff3d7f, #ffd36b, #3ddc97, #4cc9f0, #7c5cff, #ff3d7f); color: #fff; font: 700 16px Inter, sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.swatch-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.cv-presets .preset canvas { aspect-ratio: 9 / 16; height: auto; }

/* phone: the preview stays at the top, the tools scroll under it */
@media (max-width: 900px) {
  body.cover-page { display: block; height: auto; overflow: auto; }
  body.cover-page .topbar { position: sticky; top: 0; z-index: 6; }
  .cv-app { display: flex; flex-direction: column; height: auto; }
  .cv-stage { position: sticky; top: 48px; z-index: 5; height: 50vh; height: 50dvh; border-bottom: 1px solid var(--line); }
  .cv-stage .stage-bar { padding: 6px 8px 2px; }
  .cv-viewport { padding: 4px 8px 8px; }
  .cv-side { overflow: visible; border: 0 !important; }
  .cv-side.left { order: 2; padding: 12px; }
  .cv-side.right { order: 3; padding-bottom: 40px; }
}
