/* ==========================================================================
   CNC RELIEF — AI DEPTH MAP GENERATOR STYLES | cncrelief.com
   ──────────────────────────────────────────────────────────────────────────
   WARM EDITORIAL LUXURY DESIGN SYSTEM
   Ported from: G:\0000 PY PROGRAM\09- sep\whatsapp frontend
   Colors, Typography & Components strictly locked. Zero deviation.
   ========================================================================== */

/* ── Google Fonts Import ──────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  /* ── Warm Editorial Surfaces ─────────────────────────────────────────── */
  --ivory:         #F5F1E9;
  --paper:         #FBF8F2;
  --paper-2:       #EFE9DE;
  --line:          #DDD6CA;
  --line-strong:   #C3BAAC;

  /* ── High-Contrast Pitch Ink Typography ─────────────────────────────── */
  --ink:           #101716;
  --muted:         #2E3A37;
  --dim:           #6E7A77;

  /* ── Curated Accents ─────────────────────────────────────────────────── */
  --clay:          #9C4B30;
  --clay-hover:    #843C25;
  --clay-soft:     #E6C6B9;

  --sage:          #385949;
  --sage-hover:    #2C473A;
  --sage-soft:     #DCE4DE;

  --blue:          #243D4C;
  --blue-soft:     #DDE5E8;

  --dark:          #16201E;
  --dark-card:     #0F1715;

  /* ── Highlight Swatch (User Verified #DCE4DE) ────────────────────────── */
  --swatch:        #DCE4DE;
  --swatch-border: #C2CEC5;
  --header-hl:     #DCE4DE;
  --sidebar-bg:    #DCE4DE;

  /* ── Semantic Status ─────────────────────────────────────────────────── */
  --success:       #1E6B47;
  --success-soft:  #E4F2EB;
  --warning:       #B36805;
  --warning-soft:  #FEF3E0;
  --danger:        #A32817;
  --danger-soft:   #FDE8E5;
  --info:          #243D4C;
  --info-soft:     #DDE5E8;

  /* ── Typography ──────────────────────────────────────────────────────── */
  --font-serif:    'Newsreader', Georgia, serif;
  --font-sans:     'DM Sans', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display:  'Manrope', 'DM Sans', sans-serif;
  --font-mono:     'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* ── Shapes ──────────────────────────────────────────────────────────── */
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     22px;
  --radius-pill:   999px;

  /* ── Shadows ─────────────────────────────────────────────────────────── */
  --shadow:        0 26px 70px rgba(52, 48, 42, .10);
  --soft-shadow:   0 12px 34px rgba(52, 48, 42, .07);
  --heavy-shadow:  0 35px 80px rgba(32, 40, 39, .22);
  --card-shadow:   0 0 0 1px rgba(255,255,255,0.75) inset, 0 1px 3px rgba(40,36,30,0.03), 0 12px 34px rgba(52,48,42,.08);

  /* ── Motion ──────────────────────────────────────────────────────────── */
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --dur:           200ms;
}

/* ==========================================================================
   BASE RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background-color: var(--ivory);
  background-image:
    radial-gradient(circle at 30% 0%, rgba(156, 75, 48, 0.04) 0%, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(56, 89, 73, 0.03) 0%, transparent 50%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  line-height: 1.55;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--clay-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }

/* ==========================================================================
   LEFT SIDEBAR — Sage Swatch Background
   ========================================================================== */
.gen-sidebar {
  width: 70px;
  background: var(--sidebar-bg);   /* #DCE4DE exact user swatch */
  border-right: 1px solid var(--swatch-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 20px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(56, 89, 73, 0.06);
}

.gen-sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--dark);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  text-decoration: none;
  transition: all .2s var(--ease);
}

.gen-sidebar-logo:hover {
  background: var(--sage);
  transform: scale(1.05);
}

.gen-sidebar-toggle {
  font-size: 13px;
  color: var(--dim);
  cursor: pointer;
  margin-bottom: 12px;
  transition: color .2s;
}
.gen-sidebar-toggle:hover { color: var(--clay); }

.gen-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
  flex: 1;
}

.gen-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 52px;
  border-radius: var(--radius-md);
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  gap: 3px;
  transition: all .2s var(--ease);
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: .02em;
  background: transparent;         /* 2026-09-29 23:08 (user): Help / Feedback (buttons) had a light white box behind them */
  padding: 0;
  font-family: var(--font-display);
}

.gen-nav-item:hover {
  background: rgba(156, 75, 48, 0.09);
  color: var(--clay);
  border-color: rgba(156, 75, 48, 0.15);
}

.gen-nav-item.active {              /* 2026-09-29 23:08 (user): the selected page = terracotta */
  background: #9C4B30;
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(156, 75, 48, .32);
}

.gen-nav-item .icon { font-size: 16px; line-height: 1; }

.gen-nav-badge {
  position: absolute;
  top: 3px;
  right: 5px;
  background: var(--clay);
  color: #fff;
  font-size: 7.5px;
  padding: 1px 4px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .04em;
}

.gen-nav-badge.blue { background: var(--sage); }

.gen-sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.gen-credits-chip {
  background: rgba(22, 32, 30, .08);
  border: 1px solid var(--swatch-border);
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--sage);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Theme Toggle */
.gen-theme-toggle {
  background: rgba(22, 32, 30, .06);
  border: 1px solid var(--swatch-border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all .2s;
  color: var(--dim);
}
.gen-theme-toggle:hover {
  background: var(--clay-soft);
  border-color: var(--clay);
  color: var(--clay);
}

/* ==========================================================================
   MAIN CONTENT WRAPPER
   ========================================================================== */
.gen-main-wrapper {
  margin-left: 70px;
  flex: 1;
  padding: 0 22px 60px;
}

/* ==========================================================================
   EDITORIAL NAV HEADER — Sticky top bar with swatch background
   ========================================================================== */
.gen-hero-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-hl);
  border-bottom: 1px solid var(--swatch-border);
  box-shadow: 0 2px 10px rgba(56, 89, 73, 0.07);
  margin: 0 -36px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.gen-hero-header h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 0;
}

.gen-hero-header p {
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--font-sans);
  margin: 0;
  font-weight: 500;
}

.gen-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gen-workflow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--clay);
  padding: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.gen-workflow-pill::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
  flex-shrink: 0;
}

/* ==========================================================================
   WORKSPACE GRID
   ========================================================================== */
.gen-workspace-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 24px;
  align-items: start;
  padding-top: 24px;
}

@media (max-width: 1200px) {
  .gen-workspace-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   LEFT COLUMN — GENERATOR CONTROLS CARD
   ========================================================================== */
.gen-controls-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

/* ==========================================================================
   UPLOAD DROPZONE
   ========================================================================== */
.gen-dropzone {
  margin: 20px 20px 0;
  border: 1.5px dashed var(--line-strong);
  background: var(--ivory);
  border-radius: var(--radius-lg);
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s var(--ease);
  position: relative;
  padding: 24px;
  text-align: center;
}

.gen-dropzone:hover, .gen-dropzone.drag-over {
  border-color: var(--clay);
  background: rgba(156, 75, 48, 0.03);
}

.gen-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--clay);
  font-weight: 300;
  transition: all .2s;
}

.gen-dropzone:hover .gen-dropzone-icon {
  background: var(--clay-soft);
  border-color: var(--clay);
}

.gen-dropzone-text {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font-display);
}

.gen-dropzone-sub {
  font-size: 11px;
  color: var(--dim);
  margin-top: 4px;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.gen-image-preview-wrapper {
  display: none;
  position: relative;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.gen-image-preview {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.btn-remove-image {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(16, 23, 22, 0.75);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.btn-remove-image:hover { background: var(--danger); }

/* ==========================================================================
   SECTION ACCORDIONS — Card Head style
   ========================================================================== */
.gen-section {
  border-top: 1px solid var(--line);
}

.gen-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 12px 20px;
  gap: 10px;
  background: var(--header-hl);   /* #DCE4DE swatch */
  transition: background .2s;
}
.gen-section-header:hover {
  background: #CDD7D0;
}

.gen-section-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage);             /* Sage accent for section labels */
}

.gen-section-sublink {
  font-size: 11px;
  color: var(--clay);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
}
.gen-section-sublink:hover { text-decoration: underline; }

.gen-section-chevron {
  font-size: 11px;
  color: var(--dim);
  transition: transform .2s;
  flex-shrink: 0;
}

.gen-section.collapsed .gen-section-content { display: none; }
.gen-section.collapsed .gen-section-chevron { transform: rotate(-90deg); }

.gen-section-content {
  padding: 16px 20px;
}

/* ==========================================================================
   PARAMETERS — Rows, Labels, Sliders
   ========================================================================== */
.gen-param-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.gen-param-row:last-child { margin-bottom: 0; }

.gen-param-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font-display);
}

.gen-param-header span:last-child {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--clay);
  background: var(--clay-soft);
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: .04em;
}

.gen-param-row label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--font-sans);
}

/* Checkbox styling */
.gen-param-row input[type="checkbox"] {
  accent-color: var(--clay);
  width: 15px;
  height: 15px;
  cursor: pointer;
  border-radius: 4px;
}

.gen-slider {
  width: 100%;
  accent-color: var(--clay);
  cursor: pointer;
  height: 4px;
}

/* Select dropdown */
.gen-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
  outline: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.gen-select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(56, 89, 73, 0.12);
}

/* ==========================================================================
   MODEL CARDS
   ========================================================================== */
.gen-model-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gen-model-card {
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  cursor: pointer;
  background: var(--paper);
  transition: all .2s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
}

.gen-model-card:hover {
  border-color: var(--sage);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(56, 89, 73, .12);
}

.gen-model-card.active {
  border-color: var(--clay);
  background: rgba(156, 75, 48, 0.03);
  box-shadow: 0 0 0 1px var(--clay), var(--soft-shadow);
}

.gen-model-card-banner {
  background: var(--dark);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gen-model-card-title-neon {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .06em;
  color: var(--paper);
}

.gen-model-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gen-model-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-display);
}

.gen-model-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--clay);
  letter-spacing: .04em;
}

.gen-model-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gen-model-thumb-card {
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  transition: all .2s var(--ease);
  background: var(--paper);
}
.gen-model-thumb-card:hover {
  border-color: var(--sage);
  background: var(--sage-soft);
}
.gen-model-thumb-card.active {
  border-color: var(--clay);
  background: rgba(156, 75, 48, 0.05);
  box-shadow: 0 0 0 1px var(--clay);
}

.gen-model-thumb-card .thumb-name {
  font-size: 11px;
  font-weight: 700;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--font-display);
}

/* ==========================================================================
   EXECUTION MODE TOGGLE — BASIC vs VIP/PRO
   ========================================================================== */
.gen-dim-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--ivory);
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: var(--radius-lg);
}

.btn-dim-toggle {
  border: 1.5px solid transparent;
  background: transparent;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--dim);
  cursor: pointer;
  transition: all .2s var(--ease);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.btn-dim-toggle:hover { background: rgba(255,255,255,.7); color: var(--muted); }
.btn-dim-toggle.active {
  background: var(--dark);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(22, 32, 30, .18);
}

.dim-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 2px;
}

.dim-badge.green {
  background: var(--success-soft);
  color: var(--success);
}
.btn-dim-toggle.active .dim-badge.green {
  background: rgba(30, 107, 71, .25);
  color: #7DD3A8;
}

.dim-badge.gold {
  background: var(--warning-soft);
  color: var(--warning);
}
.btn-dim-toggle.active .dim-badge.gold {
  background: rgba(179, 104, 5, .25);
  color: #F6C165;
}

.btn-dim-toggle span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-sans);
  opacity: .7;
}

/* ==========================================================================
   GENERATE BUTTON — Clay Primary CTA
   ========================================================================== */
.btn-generate-relief {
  background: var(--clay);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(156, 75, 48, .3);
  transition: all .25s var(--ease);
  width: calc(100% - 40px);
  margin: 0 20px 20px;
}
.btn-generate-relief:hover {
  background: var(--clay-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(156, 75, 48, .4);
}
.btn-generate-relief:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   RIGHT COLUMN — RESULT CARD
   ========================================================================== */
.gen-result-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  min-height: 580px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* EMPTY STATE */
.gen-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  color: var(--dim);
}
.gen-empty-icon { font-size: 52px; margin-bottom: 16px; opacity: .8; }
.gen-empty-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.gen-empty-desc {
  font-size: 13px;
  max-width: 420px;
  line-height: 1.65;
  color: var(--muted);
}
.gen-empty-desc strong { color: var(--clay); }

/* PROCESSING STATE */
.gen-processing-state {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  background: var(--paper);
}

.gen-spinner {
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: genSpin .85s linear infinite;
  margin-bottom: 22px;
}
@keyframes genSpin { to { transform: rotate(360deg); } }

.gen-processing-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.gen-processing-status {
  font-size: 12px;
  color: var(--dim);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* RESULT VIEW */
.gen-result-view {
  display: none;
  flex-direction: column;
  flex: 1;
}

/* RESULT TOP BAR — swatch header */
.gen-result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--swatch-border);
  background: var(--header-hl);
}

.gen-view-mode-tabs { display: flex; gap: 6px; }

.btn-view-mode {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.7);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.btn-view-mode:hover { background: var(--paper); border-color: var(--sage); color: var(--sage); }
.btn-view-mode.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}

.gen-result-meta-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid rgba(30, 107, 71, .2);
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .04em;
}

/* BEFORE / AFTER COMPARISON SLIDER */
.gen-comparison-container {
  position: relative;
  width: 100%;
  height: 460px;
  overflow: hidden;
  background: #1A1F1E;
  user-select: none;
}

.gen-comp-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}

.gen-comp-after-wrapper {
  position: absolute;
  top: 0; left: 0;
  width: 50%; height: 100%;
  overflow: hidden;
}
.gen-comp-after-wrapper .gen-comp-image { width: 100%; height: 100%; }

.gen-comp-slider-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  cursor: ew-resize;
  z-index: 20;
}

.gen-comp-slider-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38px; height: 38px;
  background: #ffffff;
  color: var(--dark);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  cursor: ew-resize;
}

.gen-comp-badge {
  position: absolute;
  bottom: 14px;
  padding: 4px 10px;
  background: rgba(16, 23, 22, 0.78);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  z-index: 15;
}
.gen-comp-badge.left { left: 14px; }
.gen-comp-badge.right { right: 14px; }

/* ==========================================================================
   ACTION HUB (DOWNLOAD BUTTONS)
   ========================================================================== */
.gen-action-hub {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 16px 18px;
  background: var(--ivory);
  border-top: 1px solid var(--swatch-border);
}

@media (max-width: 900px) {
  .gen-action-hub { grid-template-columns: 1fr; }
}

.btn-action-primary {
  background: var(--dark);
  color: var(--paper);
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(22, 32, 30, .18);
  transition: all .2s var(--ease);
}
.btn-action-primary:hover {
  background: var(--sage);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 89, 73, .25);
}

.btn-action-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: all .2s var(--ease);
  box-shadow: var(--soft-shadow);
}
.btn-action-secondary:hover {
  border-color: var(--clay);
  color: var(--clay);
  background: rgba(156, 75, 48, 0.04);
  transform: translateY(-1px);
}

/* ==========================================================================
   HISTORY SECTION
   ========================================================================== */
.gen-history-section {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.gen-history-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}

.gen-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.gen-history-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: var(--soft-shadow);
}
.gen-history-card:hover {
  border-color: var(--clay);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(52, 48, 42, .1);
}

.gen-history-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
}

.gen-history-info {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: var(--header-hl);
}

.gen-history-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-display);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gen-history-time {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--dim);
  margin-top: 2px;
  letter-spacing: .04em;
}

/* ==========================================================================
   DIALOG / MODAL — Warm Paper Luxury Folio
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(16, 23, 22, .55);
  backdrop-filter: blur(5px);
  padding: 20px;
}

.modal {
  width: min(540px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--heavy-shadow);
  padding: 0;
  overflow: hidden;
}

.modal .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--header-hl);
  padding: 16px 22px;
  border-bottom: 1px solid var(--swatch-border);
}

.modal .modal-head h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -.01em;
}

.modal .modal-head .label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clay);
}

.modal .modal-body { padding: 22px; }

/* ==========================================================================
   FORM INPUTS — Global
   ========================================================================== */
input[type="range"] {
  accent-color: var(--clay);
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  font-family: var(--font-sans);
  font-size: 13px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(56, 89, 73, .1);
}

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.badge-pill.success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(30,107,71,.2); }
.badge-pill.warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(179,104,5,.2); }
.badge-pill.danger  { background: var(--danger-soft);  color: var(--danger);  border: 1px solid rgba(163,40,23,.2); }
.badge-pill.clay    { background: var(--clay-soft);    color: var(--clay);    border: 1px solid rgba(156,75,48,.2); }
.badge-pill.sage    { background: var(--sage-soft);    color: var(--sage);    border: 1px solid rgba(56,89,73,.2); }

/* ==========================================================================
   GENERATE BUTTON TAG
   ========================================================================== */
.gen-btn-tag {
  background: rgba(255,255,255,.22);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: .08em;
}

/* ==========================================================================
   CHECKBOX ROWS — gen-check-row
   ========================================================================== */
.gen-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 1px solid rgba(221,214,202,.5);
  gap: 10px;
}
.gen-check-row:last-child { border-bottom: none; }
.gen-check-row span { flex: 1; line-height: 1.4; }
.gen-check-row input[type="checkbox"] {
  accent-color: var(--clay);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   PARAM LABEL & VALUE
   ========================================================================== */
.gen-param-label {
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.gen-param-value {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--clay);
  background: var(--clay-soft);
  padding: 1px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
}

/* ==========================================================================
   MODEL CARD — refined tags
   ========================================================================== */
.gen-model-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(251,248,242,.7);
  background: rgba(255,255,255,.1);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .04em;
}

.gen-model-speed {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--sage);
  letter-spacing: .04em;
}

.thumb-sub {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--dim);
  margin-top: 3px;
  letter-spacing: .04em;
}

/* ==========================================================================
   HEADER RIGHT
   ========================================================================== */
.gen-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gen-domain-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--dim);
  text-transform: lowercase;
}

/* ==========================================================================
   SECTION TOGGLE HELPER
   ========================================================================== */
.gen-section.collapsed .gen-section-content { display: none; }
.gen-section.collapsed .gen-section-chevron { transform: rotate(-90deg); }

/* ==========================================================================
   MODAL DIALOGS — WARM EDITORIAL LUXURY SYSTEM
   ========================================================================== */
.gen-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 23, 22, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn .18s var(--ease) forwards;
}

.gen-modal-backdrop.open {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.gen-modal-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px rgba(16, 23, 22, 0.18), 0 4px 12px rgba(16, 23, 22, 0.08);
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gen-modal-header {
  background: var(--header-hl);
  border-bottom: 1px solid var(--swatch-border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gen-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gen-modal-title-wrap h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}

.gen-modal-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(30, 107, 71, 0.2);
}

.gen-modal-close-btn {
  background: transparent;
  border: 1px solid var(--swatch-border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}

.gen-modal-close-btn:hover {
  background: var(--paper);
  color: var(--clay);
  border-color: var(--clay);
}

.gen-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gen-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gen-status-tile {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gen-status-tile.tile-full {
  grid-column: 1 / -1;
}

.gen-status-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
}

.gen-status-val {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.gen-status-val.highlight-green {
  color: var(--success);
}

.gen-status-val.code {
  font-family: var(--font-mono);
  font-size: 11px;
  word-break: break-all;
}

.gen-guide-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.gen-guide-step:last-child {
  border-bottom: none;
}

.gen-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage);
  border: 1px solid var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.gen-step-content h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.gen-step-content p {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.5;
}

.gen-modal-footer {
  padding: 14px 20px;
  background: var(--ivory);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* My listings & sales (Sell dialog) */
.cnc-sell-remove {
  font: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
  border: 1.5px solid #A23B2E; background: #FFFFFF; color: #A23B2E;
  border-radius: 8px; padding: 3px 9px;
}
.cnc-sell-remove:hover { background: #A23B2E; color: #FFFFFF; }

/* 2026-09-28 night (user point 16): logo and page title together in the header (the separate sidebar logo tile is gone) */
.gen-header-left.has-logo { flex-direction: row; align-items: center; gap: 12px; }
.gen-head-logo { display: flex; flex-shrink: 0; text-decoration: none; }
.gen-head-logo .cr-logo { display: block; }
.gen-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gen-sidebar { padding-top: 14px; }

/* 2026-09-29 23:16 (user): after 45 s -- a see-through arrow pointing at the Gallery button, closable */
.gen-wait-arrow { position: fixed; z-index: 90; width: 330px; padding: 14px 38px 14px 18px; border-radius: 14px;
  background: rgba(22, 32, 30, 0.78); color: #FFFFFF; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .18); animation: genWaitIn .35s ease-out; }
.gen-wait-arrow::before { content: ""; position: absolute; left: -15px; top: 30px; border-style: solid; border-width: 13px 15px 13px 0;
  border-color: transparent rgba(22, 32, 30, 0.78) transparent transparent; }
.gen-wait-arrow.free { left: 90px; bottom: 30px; }
.gen-wait-arrow.free::before { display: none; }
.gen-wait-t { font-weight: 800; font-size: 14.5px; margin-bottom: 4px; }
.gen-wait-b { font-size: 12.8px; line-height: 1.5; color: rgba(255, 255, 255, .88); }
.gen-wait-b a { color: #F2B79E; font-weight: 800; text-decoration: underline; }
.gen-wait-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #FFFFFF; font-size: 12px; line-height: 1; }
.gen-wait-x:hover { background: rgba(255, 255, 255, .3); }
@keyframes genWaitIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gen-wait-arrow { animation: none; } }

/* 2026-10-01 20:13 (user): the same header on every page -- the title stays on one line */
@media (min-width: 761px) {
  .gen-hero-header h1 { white-space: nowrap; }
  .gen-head-text { flex-shrink: 0; }
}

/* 2026-10-02 21:24 (user): Plugins tab in the sidebar with a NEW tag */
.gen-nav-new { position: absolute; top: -3px; right: -6px; font-style: normal; font-size: 7.5px; font-weight: 800; line-height: 1;
  letter-spacing: .06em; padding: 2px 4px 2px; border-radius: 6px; background: #1E6B47; color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(30, 107, 71, .35); pointer-events: none; }
.gen-nav-item.active .gen-nav-new { background: #FFFFFF; color: #9C4B30; }
