/* ===================================================
   EDITOR + PUBLISH MODAL — STYLES
   =================================================== */

/* ── Editor Toggle Button ── */
#editorToggleBtn {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 10000;
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  color: white;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}
#editorToggleBtn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
#editorToggleBtn.active-mode { background: #27ae60; }

/* ── Publish Button (di panel) ── */
#publishBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(231,76,60,0.4);
  letter-spacing: 0.05em;
  animation: publishPulse 2.5s ease infinite;
}
#publishBtn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(231,76,60,0.6); }
@keyframes publishPulse {
  0%,100% { box-shadow: 0 4px 16px rgba(231,76,60,0.4); }
  50%      { box-shadow: 0 4px 28px rgba(231,76,60,0.7); }
}

/* ── Published Banner (top bar) ── */
.published-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9997;
  background: linear-gradient(135deg, #27ae60, #1e8449);
  color: white;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.published-banner i { margin-right: 0.4rem; }
.published-banner-actions { display: flex; gap: 0.5rem; }
.pub-action-btn {
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 0.78rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  display: flex; align-items: center; gap: 0.3rem;
}
.pub-action-btn:hover { background: rgba(255,255,255,0.3); }
.pub-action-btn.wa { background: rgba(37,211,102,0.4); }

/* ── Editor Panel ── */
#editorPanel {
  position: fixed;
  top: 0; right: -340px;
  width: 320px; height: 100vh;
  background: #fff;
  z-index: 9998;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  overflow: hidden;
  border-left: 3px solid #c9a84c;
}
#editorPanel.active { right: 0; }

.editor-panel-header {
  background: linear-gradient(135deg, #2d1515, #1a0a0a);
  padding: 1.2rem 1.5rem;
  flex-shrink: 0;
}
.editor-panel-header h3 {
  color: #c9a84c;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.editor-panel-header p { color: rgba(255,255,255,0.5); font-size: 0.75rem; margin-top: 0.2rem; }

.editor-panel-body { flex: 1; overflow-y: auto; padding: 1.2rem; }
.editor-panel-body::-webkit-scrollbar { width: 4px; }
.editor-panel-body::-webkit-scrollbar-thumb { background: #c9a84c; border-radius: 2px; }

.editor-section {
  margin-bottom: 1.5rem;
  background: #fdf8f3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
}
.editor-section-title {
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  color: white; padding: 0.6rem 1rem;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.5rem;
}
.editor-section-body { padding: 1rem; }

.quick-edit-btn {
  display: flex; align-items: center; gap: 0.6rem;
  width: 100%; padding: 0.6rem 0.8rem; margin-bottom: 0.5rem;
  background: white; border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px; font-size: 0.85rem; color: #3a2e2e;
  cursor: pointer; transition: all 0.2s; font-family: 'Lato', sans-serif;
  text-align: left;
}
.quick-edit-btn:hover { background: #c9a84c; color: white; border-color: #c9a84c; transform: translateX(4px); }
.quick-edit-btn i { width: 20px; text-align: center; color: #c9a84c; flex-shrink: 0; }
.quick-edit-btn:hover i { color: white; }

.color-picker-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.color-picker-row label { font-size: 0.85rem; color: #3a2e2e; flex: 1; }
.color-picker-row input[type="color"] {
  width: 44px; height: 36px; border: 2px solid rgba(201,168,76,0.3);
  border-radius: 8px; cursor: pointer; padding: 2px; background: white;
}
.preset-colors { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.preset-color {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s; flex-shrink: 0;
}
.preset-color:hover { transform: scale(1.2); border-color: #3a2e2e; }

.editor-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.7rem; margin-bottom: 0.6rem;
  border: none; border-radius: 8px; font-size: 0.85rem;
  font-family: 'Lato', sans-serif; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.editor-action-btn.save   { background: #27ae60; color: white; }
.editor-action-btn.export { background: #2980b9; color: white; }
.editor-action-btn.import { background: #8e44ad; color: white; }
.editor-action-btn.reset  { background: #e74c3c; color: white; }
.editor-action-btn:hover  { opacity: 0.85; transform: translateY(-1px); }

/* ── Editable highlight ── */
.editable-active { position: relative; transition: outline 0.2s ease !important; }
.editable-active:hover { outline: 2px solid #c9a84c !important; outline-offset: 4px !important; }
.editable-active::after {
  content: '✏️ Klik untuk edit';
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  background: rgba(201,168,76,0.95); color: white;
  font-size: 0.7rem; padding: 3px 8px; border-radius: 4px;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity 0.2s; z-index: 9999; font-family: 'Lato', sans-serif;
}
.editable-active:hover::after { opacity: 1; }

/* ── Edit Modal ── */
#editModal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 99999; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s; padding: 1rem;
}
#editModal.active { opacity: 1; pointer-events: all; }
.edit-modal-box {
  background: white; border-radius: 16px; width: 100%; max-width: 500px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3); overflow: hidden;
  transform: scale(0.9); transition: transform 0.3s;
}
#editModal.active .edit-modal-box { transform: scale(1); }
.edit-modal-header {
  background: linear-gradient(135deg, #2d1515, #1a0a0a);
  padding: 1.2rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
}
.edit-modal-header h4 { color: #c9a84c; font-family: 'Playfair Display', serif; font-size: 1rem; }
.edit-modal-close {
  background: rgba(255,255,255,0.1); border: none; color: white;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.edit-modal-close:hover { background: rgba(255,255,255,0.25); }
.edit-modal-body { padding: 1.5rem; }
.edit-modal-body label { display: block; font-size: 0.85rem; font-weight: 700; color: #3a2e2e; margin-bottom: 0.5rem; }
.edit-modal-body textarea,
.edit-modal-body input[type="text"] {
  width: 100%; padding: 0.8rem; border-radius: 8px;
  border: 2px solid rgba(201,168,76,0.25); font-family: 'Lato', sans-serif;
  font-size: 0.9rem; color: #3a2e2e; outline: none; transition: border-color 0.2s; resize: vertical;
}
.edit-modal-body textarea:focus,
.edit-modal-body input[type="text"]:focus { border-color: #c9a84c; box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
.edit-modal-body input[type="file"] {
  width: 100%; padding: 0.6rem; border: 2px dashed rgba(201,168,76,0.4);
  border-radius: 8px; font-size: 0.85rem; cursor: pointer; background: #fdf8f3;
}
.btn-save-edit {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; margin-top: 1rem; padding: 0.8rem;
  background: linear-gradient(135deg, #c9a84c, #9a7a2e); color: white;
  border: none; border-radius: 8px; font-size: 0.95rem;
  font-family: 'Lato', sans-serif; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-save-edit:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Editor Badge ── */
.editor-badge {
  position: fixed; top: 4.5rem; right: 1.2rem;
  background: rgba(39,174,96,0.95); color: white;
  padding: 0.4rem 0.9rem; border-radius: 50px; font-size: 0.75rem;
  font-family: 'Lato', sans-serif; z-index: 9999;
  display: none; align-items: center; gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.editor-badge.show { display: flex; }
.editor-badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: white;
  animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ══════════════════════════════════════════════════
   PUBLISH MODAL
══════════════════════════════════════════════════ */
.pub-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.pub-modal-overlay.active { opacity: 1; pointer-events: all; }

.pub-modal-box {
  background: white; border-radius: 20px;
  width: 100%; max-width: 680px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 100px rgba(0,0,0,0.4);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s ease;
}
.pub-modal-overlay.active .pub-modal-box { transform: translateY(0) scale(1); }

.pub-modal-header {
  background: linear-gradient(135deg, #2d1515, #1a0a0a);
  padding: 1.5rem 2rem;
  display: flex; align-items: flex-start; justify-content: space-between;
  position: sticky; top: 0; z-index: 2;
}
.pub-modal-header h3 {
  color: #c9a84c; font-family: 'Playfair Display', serif;
  font-size: 1.3rem; display: flex; align-items: center; gap: 0.6rem;
}
.pub-modal-header p { color: rgba(255,255,255,0.55); font-size: 0.82rem; margin-top: 0.3rem; }
.pub-modal-close {
  background: rgba(255,255,255,0.1); border: none; color: white;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
.pub-modal-close:hover { background: rgba(255,255,255,0.25); }

.pub-modal-body { padding: 2rem; }

/* Step label */
.pub-step-label {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.85rem; font-weight: 700; color: #6b5b4e;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem;
}
.pub-step-label span {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  color: white; font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Package cards */
.pub-packages { display: flex; flex-direction: column; gap: 1rem; }
.pub-pkg {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem 1.5rem; border-radius: 14px;
  border: 2px solid rgba(201,168,76,0.2);
  background: #fdf8f3; cursor: pointer;
  transition: all 0.25s; position: relative; overflow: hidden;
}
.pub-pkg:hover { border-color: #c9a84c; transform: translateX(4px); }
.pub-pkg.selected { border-color: #c9a84c; background: rgba(201,168,76,0.08); }
.pub-pkg.popular { border-color: #c9a84c; }
.pub-pkg-badge {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  color: white; font-size: 0.7rem; font-weight: 700;
  padding: 0.25rem 0.7rem; border-radius: 0 14px 0 10px;
}
.pub-pkg-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.3rem;
}
.pub-pkg-info { flex: 1; }
.pub-pkg-info h4 { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: #2d1515; margin-bottom: 0.2rem; }
.pub-pkg-info p  { font-size: 0.8rem; color: #888; margin-bottom: 0.5rem; }
.pub-pkg-info ul { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.pub-pkg-info li { font-size: 0.8rem; color: #6b5b4e; display: flex; align-items: center; gap: 0.4rem; }
.pub-pkg-info li i { color: #27ae60; font-size: 0.7rem; }
.pub-pkg-info li.no i { color: #ccc; }
.pub-pkg-info li.no { color: #bbb; }
.pub-pkg-price { text-align: right; flex-shrink: 0; }
.pub-pkg-price span { display: block; font-size: 1.2rem; font-weight: 700; color: #c9a84c; font-family: 'Playfair Display', serif; }
.pub-pkg-price small { font-size: 0.75rem; color: #888; }

/* Summary */
.pub-selected-pkg { margin-bottom: 1.5rem; }
.pub-summary {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(135deg, #fdf8f3, #f5ebe0);
  border: 2px solid rgba(201,168,76,0.3); border-radius: 12px;
  padding: 1rem 1.5rem; font-size: 0.9rem; color: #3a2e2e;
}
.pub-summary i { color: #c9a84c; margin-right: 0.3rem; }
.pub-summary-price { margin-left: auto; font-size: 1.3rem; font-weight: 700; color: #c9a84c; font-family: 'Playfair Display', serif; }

/* Form */
.pub-form-group { margin-bottom: 1.2rem; }
.pub-form-group label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.88rem; font-weight: 700; color: #3a2e2e; margin-bottom: 0.4rem;
}
.pub-form-group label i { color: #c9a84c; }
.pub-form-group input {
  width: 100%; padding: 0.85rem 1rem; border-radius: 10px;
  border: 2px solid rgba(201,168,76,0.2); font-family: 'Lato', sans-serif;
  font-size: 0.95rem; color: #3a2e2e; outline: none; transition: border-color 0.2s;
}
.pub-form-group input:focus { border-color: #c9a84c; box-shadow: 0 0 0 3px rgba(201,168,76,0.12); }
.pub-form-group small { font-size: 0.75rem; color: #888; margin-top: 0.3rem; display: block; }
.pub-error {
  background: #fee; border-left: 4px solid #e74c3c;
  padding: 0.8rem 1rem; border-radius: 8px; color: #c0392b;
  font-size: 0.85rem; margin-bottom: 1rem;
}
.pub-form-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; }
.pub-btn-back {
  flex: 0 0 auto; padding: 0.9rem 1.4rem; border-radius: 50px;
  border: 2px solid rgba(201,168,76,0.3); background: white;
  color: #6b5b4e; font-size: 0.9rem; font-family: 'Lato', sans-serif;
  font-weight: 700; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 0.4rem;
}
.pub-btn-back:hover { border-color: #c9a84c; color: #c9a84c; }
.pub-btn-pay {
  flex: 1; padding: 0.9rem; border-radius: 50px; border: none;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white; font-size: 1rem; font-family: 'Lato', sans-serif;
  font-weight: 700; cursor: pointer; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(231,76,60,0.35);
}
.pub-btn-pay:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(231,76,60,0.5); }
.pub-btn-pay:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Loading step */
.pub-loading { text-align: center; padding: 3rem 1rem; }
.pub-spinner {
  width: 56px; height: 56px; border: 4px solid rgba(201,168,76,0.2);
  border-top-color: #c9a84c; border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pub-loading p { color: #6b5b4e; font-size: 1rem; }

.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .pub-pkg { flex-wrap: wrap; }
  .pub-pkg-price { width: 100%; text-align: left; }
  .pub-modal-body { padding: 1.2rem; }

  /* Editor panel as bottom sheet on mobile */
  #editorPanel {
    width: 100%;
    right: auto;
    left: 0;
    top: auto;
    bottom: -100%;
    height: 55vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 3px solid #c9a84c;
    transition: bottom 0.4s cubic-bezier(0.4,0,0.2,1);
  }
  #editorPanel.active {
    right: auto;
    bottom: 0;
  }

  #editorToggleBtn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    top: auto;
    bottom: 1rem;
    right: 1rem;
    z-index: 10002;
  }

  .editor-badge {
    top: auto;
    bottom: 4rem;
    right: 1rem;
  }

  .editor-panel-header {
    padding: 1rem 1.5rem;
    border-radius: 20px 20px 0 0;
  }

  .editor-panel-body {
    max-height: calc(55vh - 60px);
    overflow-y: auto;
  }

  /* Konten undangan diberi ruang bawah agar tidak tertutupi editor */
  body.editor-active .right-panel,
  body.editor-active #mainContent,
  body.editor-active main {
    padding-bottom: 58vh !important;
  }
}

/* ── Gallery Delete Button ── */
.gallery-delete-btn {
  display: none;
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(231,76,60,0.92);
  border: none; color: white;
  font-size: 0.8rem; cursor: pointer;
  align-items: center; justify-content: center;
  z-index: 10; transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.gallery-delete-btn:hover {
  background: #c0392b; transform: scale(1.1);
}

/* Gallery edit button (change photo) — shown in editor mode */
.gallery-edit-btn {
  display: none;
  position: absolute;
  top: 8px; left: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(201,168,76,0.92);
  border: none; color: white;
  font-size: 0.8rem; cursor: pointer;
  align-items: center; justify-content: center;
  z-index: 10; transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.gallery-edit-btn:hover { background: #9a7a2e; transform: scale(1.1); }

/* Gallery editor list item in panel */
.gallery-list-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  background: white; border-radius: 8px;
  border: 1px solid rgba(201,168,76,0.2);
  font-size: 0.82rem; color: #3a2e2e;
}
.gallery-list-thumb {
  width: 36px; height: 36px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(201,168,76,0.2);
  background: #eee;
}
.gallery-list-name { flex: 1; font-size: 0.8rem; color: #6b5b4e; }
.gallery-list-btn {
  width: 28px; height: 28px; border-radius: 6px; border: none;
  cursor: pointer; font-size: 0.75rem; display: flex;
  align-items: center; justify-content: center; transition: all 0.2s;
}
.gallery-list-btn.edit { background: rgba(201,168,76,0.15); color: #c9a84c; }
.gallery-list-btn.edit:hover { background: #c9a84c; color: white; }
.gallery-list-btn.del  { background: rgba(231,76,60,0.12); color: #e74c3c; }
.gallery-list-btn.del:hover  { background: #e74c3c; color: white; }

/* ── QRIS Image ── */
.gift-qris { margin: 0.8rem 0; text-align: center; }
.qris-img {
  max-width: 160px; border-radius: 12px;
  border: 2px solid rgba(201,168,76,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ── Map Embed ── */
.map-embed-wrap {
  display: none;
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(201,168,76,0.2);
}
.map-embed-wrap iframe {
  width: 100%; height: 220px;
  border: none; display: block;
}

/* ══════════════════════════════════════════════════
   CROP MODAL
══════════════════════════════════════════════════ */
.crop-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 200000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.crop-modal-overlay.active {
  opacity: 1; pointer-events: all;
}
.crop-modal-box {
  background: #1a1a1a;
  border-radius: 18px;
  width: 100%; max-width: 720px;
  max-height: 95vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0,0,0,0.7);
  border: 1px solid rgba(201,168,76,0.2);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.crop-modal-overlay.active .crop-modal-box {
  transform: scale(1);
}

/* Header */
.crop-modal-header {
  background: linear-gradient(135deg, #2d1515, #1a0a0a);
  padding: 1rem 1.5rem;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.crop-modal-header h4 {
  color: #c9a84c; font-family: 'Playfair Display', serif;
  font-size: 1.1rem; display: flex; align-items: center; gap: 0.5rem;
}
.crop-modal-header p {
  color: rgba(255,255,255,0.5); font-size: 0.78rem; margin-top: 0.2rem;
}
.crop-modal-close {
  background: rgba(255,255,255,0.1); border: none; color: white;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: 0.95rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
.crop-modal-close:hover { background: rgba(255,255,255,0.25); }

/* Body */
.crop-modal-body {
  flex: 1; overflow: hidden; display: flex; flex-direction: column;
  padding: 1rem;
  gap: 0.8rem;
}

/* Ratio bar */
.crop-ratio-bar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  flex-shrink: 0;
}
.crop-ratio-label {
  font-size: 0.78rem; color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em; text-transform: uppercase; margin-right: 0.3rem;
}
.crop-ratio-btn {
  padding: 0.35rem 0.8rem; border-radius: 50px;
  border: 1px solid rgba(201,168,76,0.3);
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7);
  font-size: 0.78rem; cursor: pointer; transition: all 0.2s;
  font-family: 'Lato', sans-serif;
}
.crop-ratio-btn:hover { border-color: #c9a84c; color: #c9a84c; }
.crop-ratio-btn.active {
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  border-color: #c9a84c; color: white;
}

/* Canvas wrap */
.crop-canvas-wrap {
  flex: 1; min-height: 0;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  max-height: 380px;
}
.crop-canvas-wrap img {
  max-width: 100%; max-height: 100%;
  display: block;
}

/* Controls */
.crop-controls {
  display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap;
  flex-shrink: 0;
}
.crop-ctrl-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8); font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.crop-ctrl-btn:hover {
  background: rgba(201,168,76,0.2); border-color: #c9a84c; color: #c9a84c;
}

/* Footer */
.crop-modal-footer {
  padding: 1rem 1.5rem;
  display: flex; gap: 0.8rem; justify-content: flex-end;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.crop-btn-skip {
  padding: 0.75rem 1.4rem; border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent; color: rgba(255,255,255,0.7);
  font-size: 0.9rem; font-family: 'Lato', sans-serif;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 0.4rem;
}
.crop-btn-skip:hover { border-color: rgba(255,255,255,0.5); color: white; }
.crop-btn-apply {
  padding: 0.75rem 1.8rem; border-radius: 50px; border: none;
  background: linear-gradient(135deg, #c9a84c, #9a7a2e);
  color: white; font-size: 0.95rem; font-family: 'Lato', sans-serif;
  font-weight: 700; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 0.4rem;
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}
.crop-btn-apply:hover {
  transform: translateY(-1px); box-shadow: 0 8px 24px rgba(201,168,76,0.5);
}

/* Cropper.js overrides */
.cropper-view-box, .cropper-face { border-radius: 0; }
.cropper-line { background-color: #c9a84c; }
.cropper-point { background-color: #c9a84c; }
.cropper-dashed { border-color: rgba(201,168,76,0.5); }

@media (max-width: 600px) {
  .crop-modal-box { max-height: 100vh; border-radius: 0; }
  .crop-canvas-wrap { max-height: 260px; }
  .crop-modal-footer { flex-direction: column; }
  .crop-btn-skip, .crop-btn-apply { width: 100%; justify-content: center; }
}

/* ── Timeline edit buttons ── */
.timeline-edit-btns {
  position: absolute;
  top: 4px; right: 4px;
  display: flex; gap: 4px;
  z-index: 10;
}
.tl-edit-btn, .tl-del-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.tl-edit-btn { background: rgba(201,168,76,0.9); color: white; }
.tl-edit-btn:hover { background: #9a7a2e; transform: scale(1.1); }
.tl-del-btn { background: rgba(231,76,60,0.9); color: white; }
.tl-del-btn:hover { background: #c0392b; transform: scale(1.1); }

/* Timeline edit buttons container */
.tl-btns {
  position: absolute;
  top: 8px; right: 8px;
  display: none;
  gap: 4px;
  z-index: 10;
}
.timeline-item {
  position: relative;
}
