:root {
  --gold-bar: #f4c63d;
  --gold-bar-dark: #dfb024;
  --gold-btn: #f6ca44;
  --green-btn: #16a34a;
  --dark-hdr: #23262b;
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --border: #dcdde1;
  --border-soft: #ebebef;
  --text: #1f2328;
  --mute: #6b7280;
  --danger: #d9534f;
  --accent-blue: #2563eb;
  --editor-bg: #2c2f34;
  --editor-dock: #1e2024;
  --editor-panel: #f4f5f7;
  --sans: 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg-page);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

/* Top Utility Bar */
.tnb {
  background: #ffffff;
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--mute);
  flex-wrap: wrap;
  gap: 8px;
}
.tnb-left { display: flex; align-items: center; gap: 10px; }
.tnb-brand { font-weight: 800; color: #1f2328; font-size: 15px; letter-spacing: -0.02em; }
.tnb-badge {
  background: #eef6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 2px 9px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 11px;
}
.tnb-right { display: flex; align-items: center; gap: 14px; }
.tnb-right button {
  background: none;
  border: none;
  color: var(--mute);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--sans);
  font-weight: 600;
}
.tnb-right button:hover { color: var(--text); text-decoration: underline; }

/* Navigation Bar */
.gnb {
  background: var(--gold-bar);
  border-bottom: 1px solid var(--gold-bar-dark);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 40;
}
.gnb-group { display: flex; align-items: center; gap: 6px; height: 100%; }
.gnb-tab {
  background: transparent;
  border: none;
  height: 100%;
  padding: 0 18px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: #3d3210;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s;
}
.gnb-tab:hover { background: rgba(255, 255, 255, 0.25); }
.gnb-tab.active { background: rgba(255, 255, 255, 0.45); color: #111; font-weight: 700; }
.gnb-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #2f2609;
}
.pill-cnt {
  background: #2f2609;
  color: #ffd859;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 700;
}

/* Main Workspace */
.main-wrap {
  max-width: 1380px;
  margin: 22px auto 64px;
  padding: 0 24px;
}

.page-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #2b2f36;
  padding-bottom: 10px;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-title-bar h1 {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1f2328;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
  text-decoration: none;
}
.btn:hover:not(:disabled) { background: #f1f5f9; border-color: #94a3b8; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.gold { background: var(--gold-btn); border-color: #dfb024; color: #261d04; }
.btn.gold:hover:not(:disabled) { background: #eab92c; }
.btn.green { background: var(--green-btn); border-color: #15803d; color: #ffffff; }
.btn.green:hover:not(:disabled) { background: #15803d; }
.btn.danger { background: var(--danger); border-color: #c9302c; color: #ffffff; }
.btn.dark { background: #23262b; border-color: #181a1e; color: #ffffff; }
.btn.dark:hover:not(:disabled) { background: #343840; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 5px; }
.btn.xs { padding: 3px 7px; font-size: 11px; border-radius: 4px; }

/* Instant Folder Upload Hero Zone */
.hero-upload-zone {
  background: linear-gradient(135deg, #ffffff 0%, #fffdf6 100%);
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  transition: all 0.18s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.hero-upload-zone.dragover {
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: 0 8px 28px rgba(217, 119, 6, 0.12);
}
.hero-upload-copy h2 {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}
.hero-upload-copy p {
  font-size: 13px;
  color: #475569;
  max-width: 740px;
}
.hero-upload-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.upload-progress-banner {
  width: 100%;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 8px;
  padding: 12px 16px;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.upload-progress-track {
  width: 100%;
  height: 10px;
  background: #334155;
  border-radius: 99px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width 0.2s ease;
}

/* Photobook Project Cards */
.pb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  gap: 20px;
}
.pb-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.pb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  border-color: var(--gold-bar-dark);
}
.pb-cover {
  height: 200px;
  background: #1f2937;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pb-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(17, 24, 39, 0.84);
  color: #fde047;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}
.pb-orient-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(17, 24, 39, 0.78);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
}
.pb-swatches {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 6px;
  border-radius: 99px;
}
.swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
}
.pb-body {
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.pb-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pb-title { font-size: 17px; font-weight: 800; color: #111827; }
.pb-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.mood-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
}
.mood-tag.ai { background: #fef3c7; color: #92400e; }
.mood-tag.jev { background: #e0e7ff; color: #3730a3; }
.pb-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

/* Data Table (Exports Archive) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border-top: 2px solid #334155;
  background: #fff;
}
.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
  vertical-align: middle;
}
.data-table tr:hover td { background: #fafbfd; }

/* Modals */
dialog.ks-modal {
  margin: auto;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0;
  max-width: 960px;
  width: calc(100vw - 32px);
  max-height: 92vh;
  background: #fff;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.48);
}
dialog.ks-modal.wide { max-width: 1240px; }
dialog.ks-modal[open] { display: flex; flex-direction: column; }
dialog.ks-modal::backdrop { background: rgba(15, 18, 24, 0.62); }

.ks-modal-hdr {
  background: var(--dark-hdr);
  color: #fff;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
}
.ks-modal-hdr .close-x {
  background: none;
  border: none;
  color: #ccc;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.ks-modal-hdr .close-x:hover { color: #fff; }
.ks-modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.ks-modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border-soft);
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.field-lbl {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.field-lbl input, .field-lbl select {
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: var(--sans);
}

.analysis-report-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jev-report-box {
  background: linear-gradient(135deg, #f5f3ff 0%, #fffbeb 100%);
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jev-prob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 8px;
}
.jev-prob-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11.5px;
}
.jev-prob-card .jp-lbl { color: #64748b; font-weight: 600; font-size: 10.5px; }
.jev-prob-card .jp-val { color: #1e293b; font-weight: 800; margin-top: 2px; }
.jev-mini-bar {
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 4px;
}
.jev-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #f59e0b);
}

.ratio-bar {
  height: 9px;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  background: #e2e8f0;
}
.ratio-p { background: #3b82f6; }
.ratio-l { background: #f59e0b; }
.ratio-s { background: #10b981; }

.theme-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}
.theme-choice-card {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s;
  font-family: var(--sans);
}
.theme-choice-card:hover { border-color: #94a3b8; }
.theme-choice-card.active {
  border-color: #d97706;
  background: #fffbeb;
}
.theme-choice-card .t-title { font-size: 12.5px; font-weight: 700; color: #111827; margin-bottom: 2px; }
.theme-choice-card .t-desc { font-size: 11px; color: #64748b; }

/* ==================== PIXNOTE FULLSCREEN SPREAD EDITOR ==================== */
.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--editor-bg);
  display: none;
  flex-direction: column;
  color: #fff;
}
.editor-overlay.open { display: flex; }

.ed-topbar {
  min-height: 48px;
  background: #ffffff;
  color: #222;
  border-bottom: 1px solid #d1d5db;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ed-logo {
  font-weight: 900;
  letter-spacing: 0.03em;
  font-size: 15px;
  color: #111;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ed-logo span.sub {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  padding-left: 10px;
  border-left: 1px solid #d1d5db;
}
.ed-top-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ed-top-btn {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #333;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ed-top-btn:hover { background: #f3f4f6; }
.ed-top-btn.active { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.ed-save-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 6px 18px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.ed-save-btn:hover { background: #b91c1c; }

.ed-body {
  flex: 1;
  display: grid;
  grid-template-columns: 64px 276px minmax(0, 1fr);
  min-height: 0;
}

.ed-dock {
  background: var(--editor-dock);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 4px;
  overflow-y: auto;
}
.ed-dock-btn {
  width: 56px;
  padding: 7px 4px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  border-radius: 6px;
}
.ed-dock-btn span.ic { font-size: 16px; }
.ed-dock-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.ed-dock-btn.active { color: #fff; background: #dc2626; }

.ed-drawer {
  background: var(--editor-panel);
  color: #222;
  border-right: 1px solid #d1d5db;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ed-drawer-hdr {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  font-size: 13px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ed-drawer-body {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}
.ed-filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ed-filter-pill {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 99px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}
.ed-filter-pill.active {
  background: #23262b;
  color: #fde047;
  border-color: #23262b;
}
.ed-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ed-photo-item {
  position: relative;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  padding: 3px;
  cursor: grab;
}
.ed-photo-item img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}
.ed-photo-item .used-cnt {
  position: absolute;
  top: 5px;
  left: 5px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}
.ed-photo-item .orient-tag {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(17, 24, 39, 0.78);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.ed-canvas-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #b6bac2;
  position: relative;
}
.ed-prop-bar {
  background: rgba(255, 255, 255, 0.96);
  color: #222;
  padding: 6px 14px;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 38px;
  font-size: 12px;
}
.ed-stage {
  flex: 1;
  display: flex;
  overflow: auto;
  min-width: 0;
  min-height: 0;
  padding: 40px 76px 24px;
  position: relative;
}
.ed-canvas-holder {
  margin: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#edCanvas {
  background: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
  cursor: default;
}

/* Editor Stage Left/Right Floating Navigation Arrows & Page Indicator */
.ed-stage-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 82px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(24, 27, 32, 0.78);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 220;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: all 0.16s ease;
  backdrop-filter: blur(6px);
}
.ed-stage-arrow:hover:not(:disabled) {
  background: var(--gold-bar);
  color: #1f1702;
  border-color: var(--gold-bar-dark);
  transform: translateY(-50%) scale(1.06);
}
.ed-stage-arrow:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}
.ed-stage-arrow.left { left: 356px; }
.ed-stage-arrow.right { right: 16px; }

.ed-stage-page-pill {
  position: fixed;
  top: 96px;
  left: calc(340px + (100vw - 340px) / 2);
  transform: translateX(-50%);
  background: rgba(24, 27, 32, 0.84);
  color: #fde047;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 215;
  backdrop-filter: blur(4px);
}

.ed-bottom-strip {
  height: 118px;
  min-width: 0;
  background: #e5e7eb;
  border-top: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  color: #222;
}
.ed-strip-bar {
  padding: 4px 12px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3f4f6;
  border-bottom: 1px solid #d1d5db;
}
.ed-thumbs-scroll {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  overflow-x: auto;
}
.ed-sheet-thumb {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: grab;
  padding: 2px 4px;
  border-radius: 5px;
  transition: transform 0.14s, background 0.14s, box-shadow 0.14s;
}
.ed-sheet-thumb:active {
  cursor: grabbing;
}
.ed-sheet-thumb.dragging {
  opacity: 0.45;
  transform: scale(0.95);
}
.ed-sheet-thumb.drag-over {
  background: #fef3c7;
  box-shadow: 0 0 0 2px #f59e0b;
  transform: translateY(-2px);
}
.ed-sheet-thumb canvas {
  border: 2px solid #cbd5e1;
  background: #fff;
  border-radius: 2px;
  width: 128px;
  height: 47px;
}
.ed-sheet-thumb.active canvas {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}
.ed-sheet-thumb span {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}
.ed-sheet-thumb .sheet-hover-actions {
  position: absolute;
  top: 4px;
  right: 6px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.14s;
}
.ed-sheet-thumb:hover .sheet-hover-actions {
  opacity: 1;
}
.sheet-mini-act {
  width: 19px;
  height: 19px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.sheet-mini-act:hover {
  background: var(--gold-bar);
  color: #111;
}
.sheet-mini-act.del:hover {
  background: #dc2626;
  color: #fff;
}

.ed-page-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  cursor: grab;
  transition: all 0.14s;
}
.ed-page-list-row:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.ed-page-list-row.active {
  border-color: #d97706;
  background: #fffbeb;
}
.ed-page-list-row.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #1f2328;
  color: #fde047;
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.2s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* Preview Flip Stage & Floating Arrows */
.prev-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  padding: 18px 68px;
}
.prev-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 76px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(18, 20, 24, 0.72);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
  z-index: 10;
  backdrop-filter: blur(6px);
}
.prev-arrow-btn:hover {
  background: var(--gold-bar);
  color: #1a1504;
  border-color: var(--gold-bar-dark);
  transform: translateY(-50%) scale(1.06);
}
.prev-arrow-btn.left { left: 14px; }
.prev-arrow-btn.right { right: 14px; }

.prev-mode-tabs {
  display: inline-flex;
  background: #1f2328;
  border-radius: 6px;
  padding: 3px;
  gap: 4px;
}
.prev-mode-btn {
  background: transparent;
  color: #cbd5e1;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.prev-mode-btn.active {
  background: var(--gold-bar);
  color: #221b05;
}

/* ==================== PHOTO REPLACE MODAL & DRAWER HOVER ACTIONS ==================== */
.ed-photo-item {
  position: relative;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  padding: 3px;
  cursor: grab;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.ed-photo-item:hover {
  border-color: #f59e0b;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.ed-photo-item .ph-hover-bar {
  position: absolute;
  inset: 3px;
  background: rgba(15, 23, 42, 0.68);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 3px;
  padding: 4px;
}
.ed-photo-item:hover .ph-hover-bar {
  opacity: 1;
}
.ph-mini-btn {
  width: 92%;
  padding: 3px 5px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  cursor: pointer;
}
.ph-mini-btn:hover {
  background: var(--gold-bar);
  border-color: var(--gold-bar-dark);
}
.ph-mini-btn.danger {
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  border-color: transparent;
}
.ph-mini-btn.danger:hover {
  background: #dc2626;
}

.ed-replace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px;
  max-height: 54vh;
  overflow-y: auto;
  padding: 4px;
}
.ed-replace-card {
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  padding: 4px;
  cursor: pointer;
  transition: all 0.14s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ed-replace-card:hover {
  border-color: #f59e0b;
  background: #fffbeb;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}
.ed-replace-card.current {
  border-color: #2563eb;
  background: #eff6ff;
}
.ed-replace-card img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.ed-replace-card .rc-name {
  font-size: 10.5px;
  color: #334155;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ed-replace-card .rc-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(15, 23, 42, 0.8);
  color: #fde047;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.prop-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 5px;
}
.prop-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  display: inline-block;
}
