/* ==========================================================================
   Geschreven Gedichten — Download Atelier & Gedichten Studio (v3.2.21)
   Desktop: 3 velden · Tablet: 2 velden · Mobiel: 1 veld
   ========================================================================== */
:root {
  --gga-bg: #f1ece2;
  --gga-surface: #fbf9f5;
  --gga-card: #ffffff;
  --gga-border: #e5ddd0;
  --gga-border-strong: #d3c6b3;
  --gga-petrol: #173646;
  --gga-petrol-dark: #102531;
  --gga-sand: #c3a376;
  --gga-sand-dark: #a68250;
  --gga-sand-soft: #f0d1a6;
  --gga-sand-pale: #f7f2e8;
  --gga-ink: #1a2f3b;
  --gga-muted: #5e707b;
  --gga-font-sans: "Plus Jakarta Sans", "Outfit", system-ui, -apple-system, sans-serif;
  --gga-font-serif: "Cormorant Garamond", "Baskervville", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body.gg-atelier-app-body {
  margin: 0 !important;
  padding: 0 !important;
  height: 100%;
  background: var(--gga-bg) !important;
  color: var(--gga-ink) !important;
  font-family: var(--gga-font-sans) !important;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.gga-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--gga-bg);
}

/* Topbar */
.gga-topbar {
  height: 60px;
  flex: 0 0 60px;
  background: var(--gga-surface);
  border-bottom: 1px solid var(--gga-border);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 30;
  box-shadow: 0 2px 10px rgba(23, 54, 70, 0.035);
}

.gga-brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.gga-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--gga-petrol);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.gga-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gga-petrol);
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
}

.gga-brand em {
  font-style: italic;
  font-family: var(--gga-font-serif);
  font-weight: 600;
  font-size: 19px;
}

.gga-brand small {
  color: var(--gga-sand-dark);
  font-weight: 700;
  font-size: 12.5px;
}

.gga-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gga-nav-link {
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gga-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.gga-nav-link:hover { background: var(--gga-sand-pale); color: var(--gga-petrol); }
.gga-nav-link.is-active { background: #ede6d8; color: var(--gga-petrol); font-weight: 700; }

/* Topbar Right Actions */
.gga-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.gga-icon-btn {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  border: 1px solid var(--gga-border);
  background: #ffffff;
  color: var(--gga-petrol);
  font-size: 15px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.gga-icon-btn:hover:not(:disabled) { background: var(--gga-sand-pale); border-color: var(--gga-sand); }
.gga-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.gga-btn-download {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #c6a97e 0%, #ab8857 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 12px rgba(171, 136, 87, 0.3);
  transition: transform 0.14s ease, filter 0.14s ease;
  white-space: nowrap;
}

.gga-btn-download:hover { filter: brightness(1.05); transform: translateY(-1px); }

.gga-btn-download--full {
  width: 100%;
  height: 46px;
  font-size: 14.5px;
}

.gga-btn-petrol {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: var(--gga-petrol);
  color: var(--gga-sand-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.14s ease, transform 0.14s ease;
}

.gga-btn-petrol:hover:not(:disabled) { background: var(--gga-petrol-dark); transform: translateY(-1px); }
.gga-btn-petrol:disabled { opacity: 0.55; cursor: wait; }

.gga-btn-outline {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid var(--gga-border-strong);
  background: #ffffff;
  color: var(--gga-petrol);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.gga-btn-outline:hover { background: var(--gga-sand-pale); border-color: var(--gga-petrol); }

/* ==========================================================================
   DESKTOP (> 1100px): 3 VELDEN (Links: Gedicht · Midden: Canvas · Rechts: Sfeer/Klaar)
   ========================================================================== */
.gga-workspace {
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100dvh - 60px);
  display: grid;
  grid-template-columns: 332px minmax(0, 1fr) 332px;
  grid-template-areas: "left stage right";
  overflow: hidden;
}

/* Tablet/Mobiel 3-stappen balk (verborgen op desktop) */
.gga-responsive-stepper {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px;
  background: #f5f0e7;
  border-bottom: 1px solid var(--gga-border);
}

/* Panelen Links & Rechts */
.gga-panel {
  height: 100%;
  min-height: 0;
  background: var(--gga-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gga-panel--left {
  grid-area: left;
  border-right: 1px solid var(--gga-border);
}

.gga-panel--right {
  grid-area: right;
  border-left: 1px solid var(--gga-border);
}

/* Kopbalk van het linker- en rechterveld op desktop */
.gga-panel-head {
  flex: 0 0 auto;
  padding: 11px 14px;
  background: #f5f0e7;
  border-bottom: 1px solid var(--gga-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gga-panel-head--title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gga-petrol);
}

.gga-panel-head--title b {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gga-petrol);
  color: var(--gga-sand-soft);
  font-size: 11.5px;
  display: inline-grid;
  place-items: center;
}

.gga-right-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.gga-step-tab {
  border: 1px solid var(--gga-border);
  background: #ffffff;
  color: var(--gga-muted);
  border-radius: 11px;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.gga-step-tab b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ece5d8;
  color: var(--gga-petrol);
  font-size: 11px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
}

.gga-step-tab:hover { border-color: var(--gga-sand); color: var(--gga-petrol); }

.gga-step-tab.is-active {
  background: var(--gga-petrol);
  border-color: var(--gga-petrol);
  color: var(--gga-sand-soft);
  box-shadow: 0 4px 12px rgba(23, 54, 70, 0.16);
}

.gga-step-tab.is-active b {
  background: var(--gga-sand-soft);
  color: var(--gga-petrol);
}

/* Scrollable Pane Body */
.gga-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 14px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #cfc3b0 transparent;
}

.gga-panel-scroll::-webkit-scrollbar { width: 6px; }
.gga-panel-scroll::-webkit-scrollbar-thumb { background: #d5c9b6; border-radius: 999px; }

.gga-right-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.gga-right-pane.is-active {
  display: flex;
}

/* Cards */
.gga-card {
  flex: 0 0 auto;
  background: var(--gga-card);
  border: 1px solid var(--gga-border);
  border-radius: 15px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: 0 2px 8px rgba(23, 54, 70, 0.025);
}

.gga-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--gga-petrol);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gga-card-sub {
  margin: -5px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--gga-muted);
}

/* Step 1 Source Switcher */
.gga-mode-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #efe9de;
  border: 1px solid var(--gga-border);
}

.gga-mode-btn {
  border: 0;
  background: transparent;
  color: var(--gga-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.14s ease;
  text-align: center;
  white-space: nowrap;
}

.gga-mode-btn.is-active {
  background: #ffffff;
  color: var(--gga-petrol);
  box-shadow: 0 2px 6px rgba(23, 54, 70, 0.09);
}

.gga-subpane { display: none; flex-direction: column; gap: 11px; }
.gga-subpane.is-active { display: flex; }

/* Chips */
.gga-chip-wrap { display: flex; flex-wrap: wrap; gap: 5px; }

.gga-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--gga-border);
  background: #faf7f2;
  color: var(--gga-petrol);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.gga-chip:hover { border-color: var(--gga-sand); background: #ffffff; }
.gga-chip.is-active { background: var(--gga-petrol); border-color: var(--gga-petrol); color: var(--gga-sand-soft); }

.gga-ai-status { margin: 0; font-size: 12px; line-height: 1.45; color: var(--gga-muted); min-height: 16px; }
.gga-ai-status.is-error { color: #a83c3c; font-weight: 600; }
.gga-ai-status.is-ok { color: #2b6147; font-weight: 600; }

.gga-guest-box {
  padding: 11px;
  border-radius: 12px;
  background: var(--gga-sand-pale);
  border: 1px solid #e4d4be;
  font-size: 12px;
  line-height: 1.45;
  color: var(--gga-petrol);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Poem Picker List */
.gga-poem-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}

.gga-poem-pick {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--gga-border);
  background: #faf7f2;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.gga-poem-pick:hover { background: #ffffff; border-color: var(--gga-petrol); }
.gga-poem-pick strong { display: block; font-size: 13px; color: var(--gga-petrol); }
.gga-poem-pick span { display: block; margin-top: 2px; font-size: 11px; color: var(--gga-muted); }

/* Accordion for Optional Fine-Tuning */
.gga-acc {
  flex: 0 0 auto;
  background: var(--gga-card);
  border: 1px solid var(--gga-border);
  border-radius: 14px;
}

.gga-acc > summary {
  list-style: none;
  padding: 11px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gga-petrol);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  border-radius: 13px;
}

.gga-acc > summary::-webkit-details-marker { display: none; }
.gga-acc > summary:hover { background: var(--gga-sand-pale); }
.gga-acc[open] > summary { border-radius: 13px 13px 0 0; border-bottom: 1px solid #f0e9de; background: #faf6ee; }

.gga-acc > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--gga-muted);
  border-bottom: 2px solid var(--gga-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.gga-acc[open] > summary::after { transform: rotate(-135deg) translateY(-2px); border-color: var(--gga-petrol); }

.gga-acc-body {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* Form Controls */
.gga-field { display: flex; flex-direction: column; gap: 5px; }
.gga-field label, .gga-label { font-size: 11.5px; font-weight: 700; color: var(--gga-muted); }

.gga-input, .gga-textarea {
  width: 100%;
  border: 1px solid var(--gga-border-strong);
  border-radius: 10px;
  background: #ffffff;
  color: var(--gga-ink);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.gga-textarea { resize: vertical; min-height: 112px; line-height: 1.5; }
.gga-textarea--sm { min-height: 78px; }
.gga-input:focus, .gga-textarea:focus { border-color: var(--gga-petrol); box-shadow: 0 0 0 3px rgba(23, 54, 70, 0.08); }

/* Sliders */
.gga-slider-row { display: flex; flex-direction: column; gap: 5px; }
.gga-slider-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gga-slider-controls { display: flex; align-items: center; gap: 8px; }

.gga-slider-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  height: 5px;
  border-radius: 999px;
  background: #e5dccf;
  outline: none;
  cursor: pointer;
}

.gga-slider-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gga-petrol);
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(23, 54, 70, 0.28);
  cursor: pointer;
}

.gga-num-box {
  width: 50px;
  height: 28px;
  border: 1px solid var(--gga-border-strong);
  border-radius: 8px;
  text-align: center;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gga-petrol);
  background: #ffffff;
}

/* Segmented Controls & Fonts */
.gga-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.gga-seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gga-seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gga-seg-btn {
  padding: 7px 5px;
  border-radius: 9px;
  border: 1px solid var(--gga-border);
  background: #ffffff;
  color: var(--gga-petrol);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.14s ease;
}

.gga-seg-btn:hover { border-color: var(--gga-sand); }
.gga-seg-btn.is-active { background: var(--gga-petrol); border-color: var(--gga-petrol); color: var(--gga-sand-soft); }

.gga-font-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }

.gga-font-btn {
  text-align: left;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--gga-border);
  background: #ffffff;
  color: var(--gga-petrol);
  font-size: 14.5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gga-font-btn small { font-family: var(--gga-font-sans); font-size: 10px; font-weight: 600; color: var(--gga-muted); }
.gga-font-btn.is-active { background: #bfa278; border-color: #bfa278; color: #ffffff; }
.gga-font-btn.is-active small { color: rgba(255, 255, 255, 0.9); }

/* Toggle Switch */
.gga-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--gga-ink); cursor: pointer; }
.gga-switch { position: relative; width: 38px; height: 21px; flex: 0 0 38px; }
.gga-switch input { opacity: 0; width: 0; height: 0; }
.gga-switch-track { position: absolute; inset: 0; border-radius: 999px; background: #dcd3c4; transition: background-color 0.18s ease; }
.gga-switch-track::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: transform 0.18s ease; }
.gga-switch input:checked + .gga-switch-track { background: #bfa278; }
.gga-switch input:checked + .gga-switch-track::after { transform: translateX(16px); }

/* Presets, Swatches, Backgrounds */
.gga-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gga-preset-card { border: 1.5px solid var(--gga-border); border-radius: 11px; padding: 4px; background: #ffffff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.gga-preset-card.is-active { border-color: var(--gga-petrol); box-shadow: 0 0 0 2px rgba(23, 54, 70, 0.14); }
.gga-preset-thumb { height: 38px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: var(--gga-font-serif); font-size: 13.5px; font-weight: 600; }
.gga-preset-card span { font-size: 10px; font-weight: 700; color: var(--gga-petrol); line-height: 1.15; }

.gga-swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: center; }
.gga-swatch { aspect-ratio: 1; border-radius: 8px; border: 2px solid rgba(23, 54, 70, 0.14); cursor: pointer; padding: 0; }
.gga-swatch.is-active { border-color: var(--gga-petrol); box-shadow: 0 0 0 2px #ffffff inset; transform: scale(1.08); }
.gga-color-custom { aspect-ratio: 1; border-radius: 8px; border: 1.5px dashed var(--gga-sand-dark); background: conic-gradient(#173646, #c3a376, #8b4a56, #2c4a3e, #173646); position: relative; cursor: pointer; overflow: hidden; }
.gga-color-custom input[type="color"] { position: absolute; inset: -6px; width: 200%; height: 200%; opacity: 0; cursor: pointer; }

.gga-bg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gga-bg-tile { aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--gga-border); overflow: hidden; padding: 0; background: #ede6d9; cursor: pointer; }
.gga-bg-tile[hidden] { display: none !important; }
.gga-bg-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gga-bg-tile.is-active { border-color: var(--gga-petrol); box-shadow: 0 0 0 2px rgba(23, 54, 70, 0.18); }
.gga-bg-tile--none { display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--gga-petrol); background: linear-gradient(135deg, #f8f4ec 0%, #e8dfd0 100%); }

.gga-upload-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px dashed var(--gga-sand);
  background: var(--gga-sand-pale);
  color: var(--gga-petrol);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.gga-upload-btn:hover { background: #efe5d4; }

.gga-inline-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gga-stepper { display: inline-flex; align-items: center; gap: 4px; }
.gga-step-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--gga-border-strong); background: #fff; color: var(--gga-petrol); font-weight: 700; cursor: pointer; }
.gga-link-reset { align-self: flex-end; border: 0; background: transparent; color: var(--gga-sand-dark); font-family: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }

/* Format Cards */
.gga-format-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.gga-format-card { border: 1.5px solid var(--gga-border); border-radius: 12px; padding: 10px 9px; background: #ffffff; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.gga-format-card strong { font-size: 12.5px; color: var(--gga-petrol); }
.gga-format-card span { font-size: 10.5px; color: var(--gga-muted); }
.gga-format-card.is-active { background: var(--gga-petrol); border-color: var(--gga-petrol); }
.gga-format-card.is-active strong { color: var(--gga-sand-soft); }
.gga-format-card.is-active span { color: rgba(255, 249, 238, 0.78); }

/* Center Stage */
.gga-stage {
  grid-area: stage;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 14px;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background:
    radial-gradient(circle at 18% 18%, rgba(240, 209, 166, 0.25), transparent 52%),
    radial-gradient(circle at 82% 82%, rgba(23, 54, 70, 0.065), transparent 52%),
    var(--gga-bg);
}

.gga-quickbar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--gga-border);
  box-shadow: 0 6px 20px rgba(23, 54, 70, 0.07);
}

.gga-qsep { width: 1px; height: 18px; background: var(--gga-border); margin: 0 2px; }

.gga-qbtn {
  height: 30px;
  min-width: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--gga-petrol);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.gga-qbtn:hover { background: var(--gga-sand-pale); border-color: var(--gga-border); }
.gga-qbtn.is-active { background: var(--gga-petrol); color: var(--gga-sand-soft); }
.gga-qreadout { font-size: 11.5px; font-weight: 700; color: var(--gga-muted); min-width: 38px; text-align: center; }

.gga-canvas-viewport {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.gga-canvas-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.14s ease;
  transform-origin: center center;
}

#ggaCanvas {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 196px);
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 22px 54px rgba(23, 54, 70, 0.17), 0 2px 10px rgba(23, 54, 70, 0.08);
  cursor: grab;
  touch-action: none;
  background: #ffffff;
}

#ggaCanvas.is-dragging { cursor: grabbing; }
#ggaCanvas.is-resizing { cursor: nwse-resize; }

.gga-stage-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.gga-stage-hint { font-size: 11.5px; color: var(--gga-muted); }

.gga-mini-pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--gga-border-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--gga-petrol);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.gga-mini-pill:hover { background: #ffffff; border-color: var(--gga-petrol); }

/* Toast */
.gga-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  background: var(--gga-petrol);
  color: var(--gga-sand-soft);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(16, 37, 49, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.gga-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   TABLET (769px – 1100px): 2 VELDEN (Links: 3-stappen paneel · Rechts: Canvas)
   ========================================================================== */
@media (max-width: 1100px) and (min-width: 769px) {
  .gga-nav-links { display: none; }

  .gga-workspace {
    grid-template-columns: 356px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "stepper stage"
      "panel   stage";
  }

  .gga-responsive-stepper {
    grid-area: stepper;
    display: grid;
    border-right: 1px solid var(--gga-border);
  }

  .gga-panel--left,
  .gga-panel--right {
    grid-area: panel;
    border-left: 0;
    border-right: 1px solid var(--gga-border);
    display: none;
  }

  .gga-panel--left.is-compact-active,
  .gga-panel--right.is-compact-active {
    display: flex;
  }

  /* Verberg dubbele desktop-koppen wanneer de gezamenlijke 3-stappen balk actief is */
  .gga-panel-head {
    display: none;
  }
}

/* ==========================================================================
   MOBIEL (<= 768px): 1 VELD (Canvas bovenaan · 3-stappen balk · Actief paneel)
   ========================================================================== */
@media (max-width: 768px) {
  .gga-topbar { height: 52px; flex: 0 0 52px; padding: 0 12px; }
  .gga-nav-links, .gga-brand small, .gga-stage-hint { display: none; }
  .gga-brand { font-size: 14px; }

  .gga-workspace {
    height: calc(100dvh - 52px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .gga-stage {
    order: 1;
    flex: 0 0 43%;
    height: 43%;
    padding: 6px 10px;
    gap: 5px;
    border-bottom: 1px solid var(--gga-border);
  }

  .gga-quickbar { padding: 3px 6px; gap: 3px; }
  .gga-qbtn { height: 26px; font-size: 11px; padding: 0 7px; }
  .gga-qsep { display: none; }
  #ggaCanvas { max-height: calc(43dvh - 68px); }
  .gga-stage-bar { display: none; }

  .gga-responsive-stepper {
    order: 2;
    display: grid;
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .gga-step-tab { padding: 8px 4px; font-size: 11.5px; }

  .gga-panel--left,
  .gga-panel--right {
    order: 3;
    flex: 1 1 57%;
    height: 57%;
    min-height: 0;
    border: 0;
    display: none;
  }

  .gga-panel--left.is-compact-active,
  .gga-panel--right.is-compact-active {
    display: flex;
  }

  .gga-panel-head {
    display: none;
  }

  .gga-panel-scroll {
    padding: 12px 12px 24px;
  }
}

/* ==========================================================================
   3.2.25 — Auteursrecht-vergrendeling voor gedichten van andere dichters
   ========================================================================== */
.gga-lock-banner[hidden] { display: none !important; }

.gga-lock-banner {
  flex: 0 0 auto;
  background: #f8f2e7;
  border: 1px solid #dcc9ad;
  border-radius: 14px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--gga-petrol);
}

.gga-lock-banner__head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
}

.gga-lock-banner p {
  margin: 0;
  font-size: 12px;
  line-height: 1.48;
  color: var(--gga-muted);
}

.gga-input[readonly],
.gga-textarea[readonly] {
  background: #f4f0e8 !important;
  color: #5b6c77 !important;
  border-color: #e3dacb !important;
  cursor: not-allowed !important;
}

.gga-input[readonly]:focus,
.gga-textarea[readonly]:focus {
  box-shadow: none !important;
  border-color: #e3dacb !important;
}

/* ==========================================================================
   3.2.26 — Directe formaatkiezer in bovenbalk + compacte kaart op eerste scherm
   ========================================================================== */
.gga-top-format-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--gga-border-strong);
  color: var(--gga-petrol);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.gga-top-format-wrap:hover {
  border-color: var(--gga-petrol);
  background: var(--gga-sand-pale);
}

.gga-top-format-icon {
  font-size: 13px;
  color: var(--gga-sand-dark);
  line-height: 1;
}

.gga-format-select {
  border: 0;
  background: transparent;
  color: var(--gga-petrol);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  padding-right: 4px;
}

.gga-card--compact {
  padding: 11px 13px;
  gap: 9px;
}

@media (max-width: 768px) {
  .gga-top-format-wrap {
    display: none;
  }
}

/* ==========================================================================
   3.2.27 — Download-gate modal (Direct lid worden met gebruikersnaam + wachtwoord)
   ========================================================================== */
.gga-modal[hidden] { display: none !important; }

.gga-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(16, 37, 49, 0.56);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.gga-modal-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid var(--gga-border);
  box-shadow: 0 26px 64px rgba(16, 37, 49, 0.32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gga-modal-head {
  padding: 18px 20px 14px;
  background: #faf6ee;
  border-bottom: 1px solid var(--gga-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gga-auth-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gga-sand-dark);
  margin-bottom: 3px;
}

.gga-modal-head h2 {
  margin: 0;
  font-family: var(--gga-font-serif);
  font-size: 25px;
  line-height: 1.15;
  color: var(--gga-petrol);
}

.gga-modal-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.gga-auth-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gga-muted);
}

.gga-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: #efe9de;
  border: 1px solid var(--gga-border);
}

.gga-auth-tab {
  border: 0;
  background: transparent;
  color: var(--gga-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.gga-auth-tab.is-active {
  background: #ffffff;
  color: var(--gga-petrol);
  box-shadow: 0 2px 6px rgba(23, 54, 70, 0.1);
}

.gga-auth-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.gga-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gga-pass-wrap .gga-input {
  padding-right: 40px;
}

.gga-pass-toggle {
  position: absolute;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--gga-muted);
  cursor: pointer;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
}

.gga-pass-toggle:hover {
  background: var(--gga-sand-pale);
  color: var(--gga-petrol);
}

.gga-auth-foot {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--gga-muted);
}

/* ==========================================================================
   3.2.30 — Ontwerpverfijning: Galerij-sfeer, glazen studiobalk & 3x3 snelle starts
   ========================================================================== */
.gga-topbar {
  background: rgba(251, 249, 245, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(23, 54, 70, 0.045);
}

.gga-stage {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 252, 246, 0.72) 0%, rgba(241, 236, 226, 0) 64%),
    radial-gradient(circle at 15% 15%, rgba(240, 209, 166, 0.28), transparent 48%),
    radial-gradient(circle at 85% 85%, rgba(23, 54, 70, 0.08), transparent 48%),
    #ede7dc;
}

.gga-quickbar {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(211, 198, 179, 0.75);
  box-shadow: 0 8px 24px rgba(23, 54, 70, 0.08);
  padding: 5px 12px;
}

#ggaCanvas {
  border-radius: 12px;
  box-shadow:
    0 28px 64px rgba(23, 54, 70, 0.18),
    0 6px 18px rgba(23, 54, 70, 0.08),
    0 0 0 1px rgba(23, 54, 70, 0.06);
}

.gga-card {
  border-radius: 16px;
  border-color: rgba(211, 198, 179, 0.65);
  box-shadow: 0 4px 14px rgba(23, 54, 70, 0.032);
}

.gga-preset-grid {
  gap: 8px;
}

.gga-preset-card {
  padding: 5px 5px 7px;
  border-radius: 12px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.gga-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--gga-sand);
  box-shadow: 0 6px 14px rgba(23, 54, 70, 0.07);
}

.gga-preset-card.is-active {
  border-color: var(--gga-petrol);
  box-shadow: 0 0 0 2px rgba(23, 54, 70, 0.16), 0 6px 14px rgba(23, 54, 70, 0.08);
}

.gga-preset-thumb {
  height: 44px;
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(23, 54, 70, 0.06);
}

.gga-preset-card span {
  font-size: 10.5px;
  padding: 0 2px;
}

.gga-bg-tile {
  border-radius: 11px;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.gga-bg-tile:hover {
  transform: scale(1.03);
  border-color: var(--gga-sand);
}

.gga-btn-download {
  background: linear-gradient(135deg, #c9ac80 0%, #a98654 100%);
  box-shadow: 0 6px 18px rgba(169, 134, 84, 0.34);
}

.gga-btn-download:hover {
  box-shadow: 0 8px 22px rgba(169, 134, 84, 0.42);
}
