/* ============================================
   8 Emerald Design Hub — Design System
   ============================================ */

:root {
  --emerald:        #10B981;
  --emerald-light:  #34D399;
  --emerald-dark:   #059669;
  --hero-bg:        #0A1A0F;
  --text-primary:   #111827;
  --text-secondary: #4B5563;
  --text-muted:     #9CA3AF;
  --bg-page:        #F9FAFB;
  --bg-card:        #FFFFFF;
  --border:         #E5E7EB;
  --green:          #059669;
  --green-bg:       #D1FAE5;
  --blue:           #1D4ED8;
  --blue-bg:        #DBEAFE;
  --orange:         #D97706;
  --orange-bg:      #FEF3C7;
  --red:            #DC2626;
  --red-bg:         #FEE2E2;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.14);
  --radius:         3px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
}

/* ── NAVIGATION ─────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--hero-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 1rem;
}

.nav-logo {
  color: var(--emerald);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo span {
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  margin: 0 0.3em;
}

.nav-spacer { flex: 1; }

.nav-lock-status {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── LOCK GATE ──────────────────────────────── */

.lock-gate-wrap {
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lock-gate {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 400px;
  width: 100%;
}

.lock-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lock-prompt svg { color: var(--text-muted); }

.lock-prompt > p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.lock-eyebrow {
  display: inline-block;
  background: var(--emerald);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  margin-bottom: 0.25rem;
}

.lock-input-row {
  display: flex;
  gap: 0.5rem;
}

.lock-input-row input {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 180px;
  transition: border-color 0.15s;
}

.lock-input-row input:focus { border-color: var(--emerald); }

.lock-input-row button {
  padding: 0.6rem 1.25rem;
  background: var(--emerald);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.lock-input-row button:hover { background: var(--emerald-dark); }

.lock-error {
  font-size: 12px;
  color: var(--red);
  display: none;
  font-weight: 500;
}

.protected-content { display: none; }

/* ── FLOOR TAB BAR ──────────────────────────── */

.floor-tab-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 52px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.floor-tabs-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
}

.floor-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.9rem 1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  color: var(--text-secondary);
  gap: 0.15rem;
  margin-bottom: -1px;
}

.floor-tab:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}

.floor-tab.active {
  border-bottom-color: var(--emerald);
  color: var(--emerald-dark);
}

.floor-tab-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.floor-tab-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.floor-tab.active .floor-tab-count { color: var(--emerald); }

/* ── ROOM SELECTOR ──────────────────────────── */

.room-selector-section {
  padding: 1.75rem 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.65rem;
}

.room-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}

.room-card:hover {
  border-color: var(--emerald-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.room-card.selected {
  border-color: var(--emerald);
  background: var(--green-bg);
}

.room-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.room-card.selected .room-card-name { color: var(--emerald-dark); }

.room-card-sqft {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ── ROOM DETAIL PANEL ──────────────────────── */

.room-detail {
  background: var(--bg-card);
  border-top: 3px solid var(--emerald);
  border-bottom: 1px solid var(--border);
  margin-top: 0.5rem;
}

.room-detail-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.room-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.75rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.room-floor-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--emerald-dark);
  margin-bottom: 0.3rem;
}

.room-name-heading {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
}

.room-sqft {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.3rem;
}

.close-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.close-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--bg-page);
}

/* ── ROOM SUB-TABS ──────────────────────────── */

.room-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.room-tabs::-webkit-scrollbar { display: none; }

.room-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.8rem 1.1rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
}

.room-tab:hover { color: var(--text-primary); }

.room-tab.active {
  border-bottom-color: var(--emerald);
  color: var(--emerald-dark);
}

/* ── TAB PANES ──────────────────────────────── */

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.tab-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.tab-pane-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.tab-pane-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── BUTTONS ────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
}

.btn-primary:hover {
  background: var(--emerald-dark);
  border-color: var(--emerald-dark);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ── MOOD BOARD ─────────────────────────────── */

.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.mood-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #E5E7EB;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
}

.mood-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.mood-item:hover img { transform: scale(1.04); }

.mood-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
}

.mood-item:hover .mood-item-caption { opacity: 1; }

.empty-state-board {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-page);
}

.empty-state-board svg {
  display: block;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.empty-state-board p { font-size: 14px; }

/* ── FINISHES ───────────────────────────────── */

.finish-category-group { margin-bottom: 2rem; }

.finish-category-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.finish-category-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.finish-category-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.finish-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.finish-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.finish-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.finish-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
}

.finish-brand {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}

.finish-color-spec {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
  background: var(--bg-page);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 0.3rem;
}

.finish-notes-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.5;
  font-style: italic;
}

.finish-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.finish-link {
  font-size: 12px;
  color: var(--emerald-dark);
  text-decoration: none;
  font-weight: 600;
}

.finish-link:hover { text-decoration: underline; }

.finish-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 2px;
  transition: all 0.15s;
}

.finish-delete-btn:hover {
  color: var(--red);
  background: var(--red-bg);
}

/* ── STATUS PILLS ───────────────────────────── */

.finish-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-considering { background: #F3F4F6;          color: #6B7280;           }
.pill-shortlisted { background: var(--blue-bg);   color: var(--blue);       }
.pill-selected    { background: var(--green-bg);  color: var(--green);      }
.pill-ordered     { background: var(--orange-bg); color: var(--orange);     }
.pill-installed   { background: #064E3B;           color: #A7F3D0;           }

/* ── EMPTY STATE ────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.empty-state strong { color: var(--text-secondary); }

/* ── UPLOAD ZONE ────────────────────────────── */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-page);
  transition: all 0.15s;
}

.upload-zone:hover {
  border-color: var(--emerald);
  background: #F0FDF8;
}

.upload-zone svg {
  display: block;
  margin: 0 auto 1rem;
  color: var(--text-muted);
}

.upload-zone p {
  font-size: 14px;
  margin-bottom: 1rem;
}

.floor-plan-area { min-height: 300px; }

.floor-plan-img {
  max-width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

/* ── NOTES ──────────────────────────────────── */

.notes-wrap { position: relative; }

.notes-textarea {
  width: 100%;
  min-height: 320px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-card);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.notes-textarea:focus { border-color: var(--emerald); }
.notes-textarea::placeholder { color: var(--text-muted); }

.notes-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
  text-align: right;
  min-height: 1.2em;
}

/* ── AI PLACEHOLDER ─────────────────────────── */

.ai-placeholder {
  text-align: center;
  padding: 5rem 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.ai-placeholder-icon {
  font-size: 2.5rem;
  color: var(--emerald);
  display: block;
  margin-bottom: 1rem;
}

.ai-placeholder h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.ai-placeholder p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto 0.5rem;
  line-height: 1.6;
}

.ai-coming-soon {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  margin-top: 1.25rem !important;
  font-style: italic;
}

/* ── MODALS ─────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius);
  transition: all 0.15s;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-page);
}

.modal-body { padding: 1.5rem; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── FORM FIELDS ────────────────────────────── */

.form-field { margin-bottom: 1rem; }
.form-field:last-child { margin-bottom: 0; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-optional { font-weight: 400; color: var(--text-muted); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--emerald); }

.form-textarea { resize: vertical; line-height: 1.5; }

/* ── LIGHTBOX ───────────────────────────────── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  gap: 1rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-caption {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  text-align: center;
  max-width: 600px;
  font-weight: 500;
}

/* ── AI VISUALIZER ──────────────────────────── */

.ai-wrap { display: flex; flex-direction: column; gap: 2rem; }

.ai-columns {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.ai-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ai-step { display: flex; flex-direction: column; gap: 0.5rem; }

.ai-step-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.ai-step-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Reference image picker */
.ai-ref-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.ai-ref-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0.75rem;
  text-align: center;
  grid-column: 1 / -1;
}

.ai-ref-item {
  aspect-ratio: 1;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  background: #E5E7EB;
}

.ai-ref-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-ref-item:hover { border-color: var(--emerald-light); }
.ai-ref-item.selected { border-color: var(--emerald); box-shadow: 0 0 0 2px var(--green-bg); }

/* Selected reference preview */
.ai-ref-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--emerald);
}

.ai-ref-preview img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  display: block;
}

.ai-ref-clear {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}

.ai-ref-clear:hover { background: rgba(0,0,0,0.85); }

/* Prompt */
.ai-prompt-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-card);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.ai-prompt-textarea:focus { border-color: var(--emerald); }
.ai-prompt-textarea::placeholder { color: var(--text-muted); font-size: 13px; }

/* Generate button */
.ai-generate-btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.ai-generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-cost-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

/* Output area */
.ai-output-col { position: relative; }

.ai-output-area {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ai-output-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 2rem;
}

.ai-output-icon {
  font-size: 2rem;
  color: var(--border);
  display: block;
  margin-bottom: 0.75rem;
}

.ai-output-placeholder p { font-size: 13px; }

/* Loading */
.ai-loading {
  text-align: center;
  padding: 3rem 2rem;
}

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

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

.ai-loading p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ai-loading-note {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  font-weight: 400 !important;
  margin-top: 0.4rem;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* Animated dots */
.ai-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* Result */
.ai-result-img {
  width: 100%;
  display: block;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ai-result-img:hover { opacity: 0.95; }

.ai-result-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

/* History */
.ai-history-wrap {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.ai-history-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.ai-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.ai-history-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.ai-history-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.ai-history-item:hover img { transform: scale(1.03); }

.ai-history-item-meta {
  padding: 0.5rem 0.65rem;
  background: var(--bg-card);
}

.ai-history-prompt {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-history-date {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Responsive */
@media (max-width: 900px) {
  .ai-columns { grid-template-columns: 1fr; }
  .ai-output-area { min-height: 240px; }
}

/* ── FOOTER ─────────────────────────────────── */

.site-footer {
  background: var(--hero-bg);
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 2rem;
  font-size: 12px;
  margin-top: 3rem;
}

.site-footer strong { color: rgba(255,255,255,0.6); }

/* ── RESPONSIVE ─────────────────────────────── */

@media (max-width: 768px) {
  .site-nav { padding: 0 1.25rem; }
  .floor-tab-bar { padding: 0 1.25rem; }
  .room-selector-section { padding: 1.25rem 1.25rem 1rem; }
  .room-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .room-detail-inner { padding: 0 1.25rem 2rem; }
  .mood-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .finish-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tab-pane-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .room-name-heading { font-size: 1.35rem; }
}

@media (max-width: 480px) {
  .room-grid { grid-template-columns: repeat(2, 1fr); }
  .floor-tab-label { font-size: 13px; }
  .lock-input-row { flex-direction: column; align-items: center; }
  .lock-input-row input { width: 100%; max-width: 260px; }
}
