[hidden] { display: none !important; }

:root {
  --bg: #f3f6f1;
  --surface: #ffffff;
  --surface-tint: #ebf1e8;
  --ink: #1d2a1f;
  --ink-muted: #5d6e60;
  --pine: #2f7d4f;
  --pine-dark: #23613c;
  --pine-soft: #e6f2ea;
  --gold: #d9a441;
  --gold-soft: #fdf6e7;
  --crimson: #b43b3b;
  --crimson-soft: #fdf1f1;
  --border: #d8e2d5;
  --border-strong: #bfd0ba;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(29, 42, 31, 0.06);
  --shadow-md: 0 8px 24px rgba(29, 42, 31, 0.08);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 16px;
}

h1 { font-size: 40px; letter-spacing: -0.01em; }
h2 { font-size: 28px; margin-bottom: 16px; }
h3 { font-size: 22px; margin-bottom: 12px; }
p { margin: 0 0 16px; color: var(--ink-muted); max-width: 70ch; }

.atelier-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.atelier-main { flex: 1; }

/* Header */
.atelier-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-bar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-link:hover { text-decoration: none; }

.brand-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--pine-soft);
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
}

.nav-link:hover, .nav-link.is-active {
  color: var(--pine);
  text-decoration: none;
  border-bottom-color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.credit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* Buttons */
.btn-solid, .btn-outline, .btn-subtle, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

.btn-solid {
  background: var(--pine);
  color: #ffffff;
}
.btn-solid:hover { background: var(--pine-dark); text-decoration: none; color: #ffffff; }
.btn-solid:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--pine); color: var(--pine); text-decoration: none; }

.btn-subtle {
  background: var(--surface-tint);
  color: var(--ink);
  border-color: var(--border);
}
.btn-subtle:hover { background: var(--pine-soft); color: var(--pine-dark); text-decoration: none; }

.btn-danger {
  background: var(--crimson);
  color: #ffffff;
}
.btn-danger:hover { background: #932e2e; text-decoration: none; }

/* Sections */
.band { padding: 48px 0; }
.band-surface { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-compact { padding: 20px 0 40px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine-dark);
  background: var(--pine-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hero-lead {
  font-size: 18px;
  color: var(--ink-muted);
  margin: 0;
  max-width: 62ch;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}

/* Studio Workspace (First Fold) */
.cw-studio {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.cw-panel, .cw-stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.cw-field { margin-bottom: 20px; }
.cw-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cw-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.cw-hint {
  font-size: 12px;
  color: var(--ink-muted);
}

.cw-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cw-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cw-chip:hover {
  border-color: var(--pine);
  color: var(--pine);
}

.cw-chip.is-selected {
  background: var(--pine);
  border-color: var(--pine);
  color: #ffffff;
}

.cw-textarea {
  width: 100%;
  min-height: 104px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
}

.cw-textarea:focus {
  background: var(--surface);
  border-color: var(--pine);
}

.cw-ratios {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cw-ratio-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 8px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  cursor: pointer;
}

.cw-ratio-btn strong { font-size: 14px; font-weight: 700; }
.cw-ratio-btn span { font-size: 12px; color: var(--ink-muted); }
.cw-ratio-btn:hover { border-color: var(--pine); }
.cw-ratio-btn.is-selected {
  background: var(--pine-soft);
  border-color: var(--pine);
  color: var(--pine-dark);
}
.cw-ratio-btn.is-selected span { color: var(--pine-dark); }

/* Optional Photo Dropzone */
.cw-photo-box {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 12px 16px;
}

.cw-photo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cw-photo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.cw-photo-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.cw-photo-meta { flex: 1; min-width: 0; }
.cw-photo-name { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cw-submit-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cw-submit-btn {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.cw-cost-line {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  margin: 0;
  max-width: none;
}

.cw-alert {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--gold-soft);
  color: var(--ink);
}

.cw-alert.is-error {
  background: var(--crimson-soft);
  border-color: #e4b4b4;
  color: var(--crimson);
}

.cw-alert-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Stage Canvas */
.cw-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cw-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 4px 12px;
}

.cw-canvas-frame {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.cw-canvas-frame img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.cw-loading-bar {
  padding: 32px 24px;
  text-align: center;
  width: 100%;
}

.cw-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--pine);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: cw-spin 0.8s linear infinite;
}

@keyframes cw-spin { to { transform: rotate(360deg); } }

.cw-stage-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cw-stage-caption {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
}

.cw-stage-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Gallery Wall (Bright Framed Cards, No Text Over Image) */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.gallery-media {
  background: var(--surface-tint);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  margin: 0;
}

.ratio-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--pine-dark);
  background: var(--pine-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.gallery-prompt {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Numbered Steps Strip */
.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pine);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Asymmetric Two-Column Editorial Prose + Specs Table */
.editorial-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec-table th, .spec-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}

.spec-table th {
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-table td { color: var(--ink-muted); }
.spec-table tr:last-child td { border-bottom: none; }

/* Prose */
.prose h2 { margin-top: 32px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 24px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; color: var(--ink-muted); max-width: 70ch; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.faq-item summary {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--pine);
  line-height: 1;
}

.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 0; font-size: 15px; }

/* Subpage Hero & Breadcrumb */
.sub-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

/* Prompts Library Cards */
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prompt-code {
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 0;
  max-width: none;
}

.prompt-card-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.price-card.is-featured {
  border-color: var(--pine);
  box-shadow: var(--shadow-md);
}

.price-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--pine-dark);
  background: var(--pine-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.price-tag.is-gold {
  background: var(--gold-soft);
  color: var(--ink);
  border: 1px solid var(--gold);
}

.price-value {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--ink);
  line-height: 1.1;
  margin: 8px 0 4px;
}

.price-sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-muted);
}

.price-list li::before {
  content: "✓ ";
  color: var(--pine);
  font-weight: 700;
}

.price-cta { margin-top: auto; width: 100%; }

.pay-notice {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--ink);
  font-size: 15px;
}

.pay-notice.is-success {
  background: var(--pine-soft);
  border-color: var(--pine);
}

/* Account */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.member-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Footer */
.atelier-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-copy { font-size: 14px; margin: 8px 0 6px; }
.footer-meta, .footer-legal { font-size: 12px; color: var(--ink-muted); margin: 0; }
.footer-link-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }

/* Subpage Prompt Workbench */
.prompt-workbench {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0 28px;
  display: grid;
  gap: 14px;
}
.prompt-workbench-row {
  display: grid;
  gap: 6px;
}
.prompt-field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.prompt-filter-input,
.prompt-scratchpad,
.prompt-ratio-select {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.prompt-scratchpad {
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
}
.prompt-workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}
.prompt-ratio-select {
  width: auto;
  min-width: 190px;
}

/* Responsive */
@media (max-width: 960px) {
  .editorial-split, .pricing-grid, .account-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-list { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .cw-studio { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  .atelier-wrap { padding: 0 16px; }
  .header-bar { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .primary-nav { order: 3; width: 100%; justify-content: flex-start; gap: 16px; border-top: 1px solid var(--border); padding-top: 8px; }
  .cw-panel, .cw-stage-card { padding: 16px; }
  .cw-ratios { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid, .prompt-grid { grid-template-columns: 1fr; }
  .gallery-actions { grid-template-columns: 1fr; }
  .btn-solid, .btn-outline { width: 100%; }
  .header-actions .btn-sm { width: auto; }
}
