/* ─────────────────────────────────────────
   layout.css — App shell & page structure
───────────────────────────────────────── */

body {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100vh;
  background: var(--bg-app);
  font-family: var(--font-ui);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ── Preview area (left, fills remaining space) ── */
.preview-area {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-app);
}

/* Subtle grid dot bg for preview area */
.preview-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ── Canvas wrapper — scales SVG to fit ── */
.canvas-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
}

.canvas-frame {
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 20px 80px rgba(0,0,0,0.7);
  border-radius: var(--r-sm);
  overflow: hidden;
  /* Size is set dynamically via JS */
}

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

/* ── FAB (floating action button) ── */
.fab {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: var(--r-full);
  background: rgba(30,30,34,0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  transition: color var(--t-med), border-color var(--t-med), transform var(--t-fast);
}

.fab:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  transform: translateX(-50%) scale(1.06);
}

.fab:active {
  transform: translateX(-50%) scale(0.96);
}
