@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #EDE6D6;
  --bg-card: #FBF8EF;
  --bg-card-hover: #F2EAD6;
  --bg-surface: #F5EFE0;
  --border-subtle: rgba(28, 22, 14, 0.12);
  --border-focus: rgba(28, 22, 14, 0.32);
  
  --text-main: #2B2420;
  --text-muted: #6E6255;
  --text-dim: #8A7D6D;
  
  --color-gold: #B8912E;
  --color-green: #3F6B4A;
  --color-red: #A1403F;
  --color-cyan: #06b6d4;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-rank: 'Bebas Neue', Impact, 'Arial Black', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Responsive visibility helpers */
.show-mobile {
  display: none !important;
}

.hide-mobile {
  display: inline !important;
}

.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 36px 90px 36px;
}

/* Centered combinator text & divider line */
.site-header-center {
  text-align: center;
  padding: 10px 0 6px 0;
}

.site-title-combinator {
  font-family: var(--font-sans);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #211a14;
  line-height: 1;
}

.site-title-combinator a {
  color: inherit;
  text-decoration: none;
}

.site-header-description {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 680px;
  margin: 12px auto 4px auto;
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-align: center;
}



.site-divider {
  border: none;
  height: 2px;
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(28, 22, 14, 0.06) 12%, 
    rgba(28, 22, 14, 0.22) 32%, 
    rgba(28, 22, 14, 0.45) 50%, 
    rgba(28, 22, 14, 0.22) 68%, 
    rgba(28, 22, 14, 0.06) 88%, 
    transparent 100%
  );
  margin: 22px auto 38px auto;
  width: 100%;
  border-radius: 999px;
}


@media (max-width: 680px) {
  .main-wrapper {
    padding: 16px 14px 60px 14px;
  }
  .site-title-combinator {
    font-size: 2.2rem;
  }
}

.timeline-feed-section {
  width: 100%;
  margin-top: 10px;
}

/* Timeline Toolbar Top Row */
.timeline-toolbar {
  background: rgba(251, 248, 239, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 6px 16px rgba(50, 40, 25, 0.08);
}

.timeline-toolbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.timeline-title-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-main-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #211a14;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.timeline-stats-badge {
  background: rgba(184, 145, 46, 0.14);
  border: 1px solid rgba(184, 145, 46, 0.35);
  color: #8c6418;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.timeline-toolbar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Add Event Button */
.btn-add-event {
  background: linear-gradient(135deg, #b8912e 0%, #8c6418 100%);
  color: #1c140a;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-event:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #c9a227 0%, #b8912e 100%);
  color: #1c140a;
}

.btn-add-event svg {
  stroke-width: 2.8;
}

/* Chronological Order Toggle Button Group */
.order-toggle-group {
  display: inline-flex;
  background: rgba(28, 22, 14, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.order-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.order-btn:hover {
  color: #211a14;
  background: rgba(28, 22, 14, 0.06);
}

.order-btn.active {
  background: #2b2420;
  color: #ede6d6;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(50, 40, 25, 0.15);
}

/* Secondary Filter Row */
.timeline-filters-subrow {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(28, 22, 14, 0.06);
}

.timeline-search-box {
  position: relative;
  min-width: 240px;
  flex: 1;
  max-width: 380px;
}

.timeline-search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.timeline-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 36px;
  color: #211a14;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition-fast);
}

.timeline-search-input:focus {
  border-color: rgba(184, 145, 46, 0.6);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(184, 145, 46, 0.25);
}

/* Year Filter Pills */
.year-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.year-pills-row::-webkit-scrollbar {
  display: none;
}

.year-pill-btn {
  background: rgba(28, 22, 14, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.year-pill-btn:hover {
  background: rgba(28, 22, 14, 0.08);
  color: #211a14;
  border-color: rgba(28, 22, 14, 0.2);
}

.year-pill-btn.active {
  background: #b8912e;
  color: #1c140a;
  border-color: #b8912e;
  font-weight: 700;
}

.vertical-timeline-container {
  position: relative;
  padding: 10px 0 60px 0;
  max-width: 1100px;
  margin: 0 auto;
}

/* Continuous glowing vertical spine running through the whole timeline */
.timeline-vertical-spine-line {
  position: absolute;
  top: 15px;
  bottom: 0;
  left: 28px;
  width: 3px;
  background: linear-gradient(
    180deg,
    #b8912e 0%,
    rgba(184, 145, 46, 0.6) 20%,
    rgba(161, 64, 63, 0.5) 60%,
    rgba(63, 107, 74, 0.4) 100%
  );
  border-radius: 999px;
  z-index: 1;
}

/* Year Separation Section */
.timeline-year-section {
  position: relative;
  margin-bottom: 48px;
}

.timeline-year-section:last-child {
  margin-bottom: 0;
}

/* YEAR MARKER */
.timeline-year-marker-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.year-marker-node {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ede6d6;
  border: 3.5px solid #b8912e;
  margin-left: 20px;
  flex-shrink: 0;
}

.year-marker-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  background: linear-gradient(135deg, rgba(184, 145, 46, 0.16) 0%, rgba(251, 248, 239, 0.85) 100%);
  border: 1px solid rgba(184, 145, 46, 0.45);
  border-radius: 12px;
  padding: 6px 18px 6px 16px;
  box-shadow: 0 3px 10px rgba(50, 40, 25, 0.10);
}

.year-text-bold {
  font-family: var(--font-rank);
  font-size: 2.2rem;
  line-height: 1;
  color: #8c6418;
  letter-spacing: 0.03em;
}

.year-event-count-badge {
  font-size: 0.74rem;
  font-weight: 600;
  color: #4a4038;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.year-divider-track {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 145, 46, 0.4) 0%, rgba(28, 22, 14, 0.05) 60%, transparent 100%);
}

/* Event List within Year */
.timeline-year-events {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 2;
  padding-left: 64px;
}

/* Individual Timeline Event Entry */
.timeline-event-entry {
  position: relative;
  display: flex;
  align-items: flex-start;
  transition: transform var(--transition-fast);
}

/* Event node on the spine connecting to the card */
.timeline-event-node-anchor {
  position: absolute;
  left: -44px;
  top: 26px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ede6d6;
  border: 2.5px solid #4f8468;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  z-index: 3;
}

.timeline-event-connector-line {
  position: absolute;
  left: -32px;
  top: 31px;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, rgba(79, 132, 104, 0.7) 0%, rgba(28, 22, 14, 0.1) 100%);
}

.timeline-event-entry:hover .timeline-event-node-anchor {
  transform: scale(1.4);
  border-color: #b8912e;
  background: #b8912e;
}

/* TIMELINE CARD */
.timeline-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  box-shadow: 0 4px 14px rgba(50, 40, 25, 0.08);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
}

.timeline-event-entry:hover .timeline-card {
  transform: translateX(6px);
  border-color: rgba(184, 145, 46, 0.5);
  box-shadow: 0 8px 20px rgba(50, 40, 25, 0.12);
}

/* Card Thumbnail */
.timeline-card-media {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  position: relative;
  background: #e8e0cc;
  overflow: hidden;
}

.timeline-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.timeline-event-entry:hover .timeline-card-img {
  transform: scale(1.05);
}

/* Card Body */
.timeline-card-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.timeline-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.timeline-date-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #8c6418;
  background: rgba(184, 145, 46, 0.12);
  border: 1px solid rgba(184, 145, 46, 0.3);
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.timeline-category-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #6e6255;
  background: rgba(28, 22, 14, 0.06);
  border: 1px solid rgba(28, 22, 14, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-source-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.timeline-card-title {
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.35;
  color: #211a14;
  margin-bottom: 8px;
}

.timeline-card-title a {
  color: inherit;
  transition: color var(--transition-fast);
}

.timeline-card-title a:hover {
  color: #355c49;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timeline-card-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #4a4038;
  margin-bottom: 16px;
  flex: 1;
}

/* Card Action Footer */
.timeline-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(28, 22, 14, 0.06);
  margin-top: auto;
}

.btn-read-article {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #355c49;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.btn-read-article:hover {
  color: #355c49;
  text-decoration: underline;
  transform: translateX(3px);
}

.timeline-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-edit-event {
  background: rgba(28, 22, 14, 0.04);
  border: 1px solid rgba(28, 22, 14, 0.1);
  color: #4a4038;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.btn-edit-event:hover {
  color: #355c49;
  background: rgba(79, 132, 104, 0.12);
  border-color: rgba(79, 132, 104, 0.35);
}

.btn-delete-event {
  background: rgba(28, 22, 14, 0.04);
  border: 1px solid rgba(28, 22, 14, 0.08);
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.btn-delete-event:hover {
  color: #7a2f2e;
  background: rgba(161, 64, 63, 0.12);
  border-color: rgba(161, 64, 63, 0.35);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 32, 22, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.is-active {
  display: flex;
  opacity: 1;
}

.modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  background: #fbf8ef;
  border: 1px solid rgba(28, 22, 14, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(50, 40, 25, 0.18);
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay,
.modal-card,
.modal-body,
.form-textarea {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.modal-overlay::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.form-textarea::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

@keyframes modalPopIn {
  from { transform: scale(0.94) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(28, 22, 14, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #211a14;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1c140a;
  background: #b8912e;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(28, 22, 14, 0.1);
  color: #211a14;
}

.modal-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-row-2col,
.form-row-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #4a4038;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: #f5efe0;
  border: 1px solid rgba(28, 22, 14, 0.12);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #2b2420;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #b8912e;
  box-shadow: 0 0 0 3px rgba(184, 145, 46, 0.25);
  background: #211a14;
}

.form-textarea {
  min-height: 58px;
  height: 58px;
  resize: none;
}

/* Article URL with Fetch Button */
.article-fetch-input-group {
  display: flex;
  gap: 8px;
}

.btn-fetch-meta,
.btn-fetch-article {
  background: #f0e9d8;
  border: 1px solid rgba(28, 22, 14, 0.18);
  color: #2b2420;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-fetch-meta:hover,
.btn-fetch-article:hover {
  background: #e8dfc9;
  color: #355c49;
  border-color: rgba(79, 132, 104, 0.4);
}

.btn-fetch-meta:disabled,
.btn-fetch-article:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Thumbnail Live Preview Box - Compact without overflowing */
.thumbnail-preview-container,
.thumbnail-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5efe0;
  border: 1px dashed rgba(28, 22, 14, 0.16);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  max-height: 72px;
}

.thumb-img-wrapper,
.thumbnail-preview-img-wrapper {
  width: 80px;
  height: 52px;
  background: #e8e0cc;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-img-wrapper img,
.thumbnail-preview-img,
#thumbnailPreviewImg {
  width: 100%;
  height: 100%;
  max-height: 52px;
  object-fit: cover;
  display: block;
}

.thumb-preview-meta,
.thumbnail-preview-meta {
  flex: 1;
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.35;
  overflow: hidden;
}

.thumb-status-tag,
.thumbnail-status-text {
  display: inline-block;
  color: #8c6418;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.thumb-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid rgba(28, 22, 14, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-modal-cancel:hover {
  background: rgba(28, 22, 14, 0.06);
  color: #211a14;
}

.btn-modal-save {
  background: linear-gradient(135deg, #b8912e 0%, #8c6418 100%);
  color: #1c140a;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-modal-save:hover {
  background: linear-gradient(135deg, #c9a227 0%, #b8912e 100%);
  transform: translateY(-1px);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #fbf8ef;
  border: 1px solid rgba(184, 145, 46, 0.4);
  color: #211a14;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(50, 40, 25, 0.15);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(40px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-notice.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Empty State */
.timeline-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(251, 248, 239, 0.4);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-top: 20px;
}

.timeline-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #211a14;
  margin-bottom: 6px;
}

.timeline-empty-desc {
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline-toolbar {
    padding: 14px 16px;
  }
  .timeline-toolbar-main {
    flex-direction: column;
    align-items: stretch;
  }
  .timeline-toolbar-controls {
    justify-content: space-between;
  }
  .timeline-card {
    flex-direction: column;
  }
  .timeline-card-media {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 180px;
  }
  .timeline-year-events {
    padding-left: 48px;
  }
  .timeline-event-node-anchor {
    left: -38px;
  }
  .timeline-event-connector-line {
    left: -28px;
    width: 28px;
  }
  .timeline-vertical-spine-line {
    left: 20px;
  }
  .year-marker-node {
    margin-left: 12px;
  }
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

.preview-mode-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #8c6418, #b8912e, #8c6418);
  border-bottom: 1px solid rgba(184, 145, 46, 0.45);
  box-shadow: 0 2px 8px rgba(50, 40, 25, 0.12);
  padding: 10px 20px;
}

.preview-banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #b8912e;
  color: #1c140a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
}

.pulse-ring {
  width: 7px;
  height: 7px;
  background: #1c140a;
  border-radius: 50%;
  animation: bannerPulse 1.4s infinite ease-in-out;
}

@keyframes bannerPulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.8; }
}

.preview-banner-text {
  font-size: 0.84rem;
  color: #8c6418;
  font-weight: 500;
}

.preview-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-preview-publish {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #3f6b4a;
  color: #211a14;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-preview-publish:hover {
  background: #2c4f39;
  transform: translateY(-1px);
}

.btn-preview-exit, .btn-preview-admin {
  font-size: 0.8rem;
  font-weight: 600;
  color: #8c6418;
  background: rgba(28, 20, 10, 0.25);
  border: 1px solid rgba(255, 235, 153, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.btn-preview-exit:hover, .btn-preview-admin:hover {
  background: rgba(28, 20, 10, 0.4);
  color: #211a14;
}

.timeline-draft-indicator {
  display: inline-block;
  background: rgba(184, 145, 46, 0.15);
  border: 1px solid rgba(184, 145, 46, 0.4);
  color: #8c6418;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
}

.admin-quick-bar {
  background: #e3d9c4;
  border-bottom: 1px solid rgba(28, 22, 14, 0.08);
  padding: 6px 20px;
  font-size: 0.8rem;
}

.admin-quick-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-quick-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-pill {
  background: rgba(184, 145, 46, 0.15);
  color: #8c6418;
  border: 1px solid rgba(184, 145, 46, 0.35);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.admin-unpublished-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8c6418;
  font-weight: 500;
}

.amber-dot {
  width: 7px;
  height: 7px;
  background: #c9a227;
  border-radius: 50%;
  animation: bannerPulse 1.4s infinite ease-in-out;
}

.admin-live-notice {
  color: var(--text-dim);
}

.admin-quick-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.admin-quick-link:hover {
  color: #211a14;
  background: rgba(28, 22, 14, 0.06);
}

.admin-quick-link.btn-highlight {
  background: rgba(184, 145, 46, 0.2);
  color: #8c6418;
  border: 1px solid rgba(184, 145, 46, 0.4);
  font-weight: 600;
}

.admin-quick-link.logout {
  color: #7a2f2e;
}

.admin-quick-link.logout:hover {
  background: rgba(161, 64, 63, 0.15);
  color: #7a2f2e;
}

.site-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-dot {
  opacity: 0.4;
}

.footer-admin-link {
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-admin-link:hover {
  color: #8c6418;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-body {
  background-color: #ede6d6;
  min-height: 100vh;
}

.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid rgba(28, 22, 14, 0.1);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 8px 24px rgba(50, 40, 25, 0.10);
}

.admin-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.admin-badge {
  display: inline-block;
  background: rgba(184, 145, 46, 0.15);
  color: #8c6418;
  border: 1px solid rgba(184, 145, 46, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.admin-login-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #211a14;
  text-transform: lowercase;
  margin-bottom: 8px;
}

.admin-login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .form-input {
  padding-right: 44px;
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.btn-toggle-pw:hover {
  color: var(--text-main);
}

.btn-admin-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #b8912e;
  color: #1c140a;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 11px 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-admin-primary:hover {
  background: #c9a227;
  transform: translateY(-1px);
}

.btn-admin-primary.btn-block {
  width: 100%;
  margin-top: 10px;
}

.admin-login-hint {
  margin-top: 24px;
  padding: 12px 14px;
  background: rgba(28, 22, 14, 0.03);
  border: 1px dashed rgba(28, 22, 14, 0.12);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-login-hint .hint-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.admin-login-hint code {
  color: #8c6418;
  font-family: monospace;
}

.admin-login-footer {
  margin-top: 20px;
  text-align: center;
}

.admin-login-footer .back-link {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color var(--transition-fast);
}

.admin-login-footer .back-link:hover {
  color: var(--text-main);
}

/* Admin Alert Messages */
.admin-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.admin-alert-danger {
  background: rgba(161, 64, 63, 0.12);
  border: 1px solid rgba(161, 64, 63, 0.3);
  color: #7a2f2e;
}

.admin-alert-success {
  background: rgba(63, 107, 74, 0.12);
  border: 1px solid rgba(63, 107, 74, 0.3);
  color: #2c4f39;
}

/* Admin Dashboard Container */
.admin-dashboard-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 30px 80px 30px;
}

.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(28, 22, 14, 0.08);
}

.admin-navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #211a14;
  text-transform: lowercase;
  line-height: 1;
}

.admin-navbar-pill {
  background: rgba(184, 145, 46, 0.15);
  border: 1px solid rgba(184, 145, 46, 0.35);
  color: #8c6418;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
}

.admin-navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-admin-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(184, 145, 46, 0.15);
  color: #8c6418;
  border: 1px solid rgba(184, 145, 46, 0.4);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-admin-preview:hover {
  background: rgba(184, 145, 46, 0.28);
  transform: translateY(-1px);
}

.btn-admin-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-admin-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.btn-admin-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(161, 64, 63, 0.1);
  color: #7a2f2e;
  border: 1px solid rgba(161, 64, 63, 0.25);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-admin-logout:hover {
  background: rgba(161, 64, 63, 0.22);
  color: #7a2f2e;
}

/* Admin Status Card */
.admin-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  transition: all var(--transition-normal);
}

.admin-status-card.has-draft-changes {
  background: linear-gradient(135deg, rgba(184, 145, 46, 0.12), rgba(140, 100, 24, 0.08));
  border: 1px solid rgba(184, 145, 46, 0.35);
}

.admin-status-card.is-published-clean {
  background: linear-gradient(135deg, rgba(63, 107, 74, 0.08), rgba(44, 79, 57, 0.05));
  border: 1px solid rgba(63, 107, 74, 0.25);
}

.status-card-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(28, 22, 14, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-pulse-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b8912e;
}

.status-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #211a14;
  margin-bottom: 4px;
}

.status-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.last-published-time {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-left: 4px;
}

.status-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-admin-preview-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #b8912e;
  color: #1c140a;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-admin-preview-glow:hover {
  background: #c9a227;
  transform: translateY(-1px);
}

.btn-publish-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #3f6b4a;
  color: #211a14;
  border: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-publish-glow:hover {
  background: #2c4f39;
  transform: translateY(-1px);
}

.btn-discard {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(28, 22, 14, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-discard:hover {
  background: rgba(161, 64, 63, 0.15);
  border-color: rgba(161, 64, 63, 0.3);
  color: #7a2f2e;
}

/* Admin Grid Layout */
.admin-grid-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .admin-grid-layout {
    grid-template-columns: 1fr;
  }
}

.admin-panel-card {
  background: var(--bg-card);
  border: 1px solid rgba(28, 22, 14, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: 0 4px 14px rgba(50, 40, 25, 0.08);
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card-header-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.card-icon {
  width: 36px;
  height: 36px;
  background: rgba(184, 145, 46, 0.1);
  color: #8c6418;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.admin-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #211a14;
  margin-bottom: 4px;
}

.admin-card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.badge-draft-pill {
  background: rgba(184, 145, 46, 0.12);
  border: 1px solid rgba(184, 145, 46, 0.3);
  color: #8c6418;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.label-desc {
  font-size: 0.78rem;
  font-weight: normal;
  color: var(--text-dim);
  text-transform: none;
  margin-left: 4px;
}

/* Header Live Preview Box */
.header-live-preview-box {
  margin: 16px 0;
  padding: 16px 20px;
  background: #e8e0cc;
  border: 1px solid rgba(28, 22, 14, 0.08);
  border-radius: var(--radius-md);
  text-align: center;
}

.preview-box-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.preview-header-render .preview-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #211a14;
  text-transform: lowercase;
  line-height: 1;
  margin-bottom: 6px;
}

.preview-header-render .preview-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto;
}

.branding-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(28, 22, 14, 0.06);
}

.publish-now-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
}

.publish-now-checkbox input {
  accent-color: #3f6b4a;
  width: 16px;
  height: 16px;
}

/* Admin Events Section */
.admin-events-section {
  background: var(--bg-card);
  border: 1px solid rgba(28, 22, 14, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: 0 4px 14px rgba(50, 40, 25, 0.08);
}

.admin-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.events-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #211a14;
}

.events-count-badge {
  background: rgba(28, 22, 14, 0.06);
  border: 1px solid rgba(28, 22, 14, 0.1);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.events-controls-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 12px;
  width: 260px;
}

.admin-search-box svg {
  color: var(--text-dim);
}

.admin-search-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.84rem;
  padding: 8px 0;
  width: 100%;
  outline: none;
}

.admin-table-container {
  overflow-x: auto;
}

.admin-events-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-events-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(28, 22, 14, 0.08);
}

.admin-events-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(28, 22, 14, 0.04);
  vertical-align: middle;
}

.admin-event-row:hover td {
  background: rgba(28, 22, 14, 0.02);
}

.table-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid rgba(28, 22, 14, 0.08);
}

.table-date-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.table-year-badge {
  font-family: var(--font-rank);
  font-size: 1.15rem;
  color: #8c6418;
  line-height: 1;
}

.table-date-text {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.table-event-details {
  max-width: 520px;
}

.table-event-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #211a14;
  line-height: 1.35;
  margin-bottom: 4px;
}

.table-event-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.table-article-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: #355c49;
  margin-top: 4px;
}

.table-article-link:hover {
  text-decoration: underline;
}

.table-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.table-action-btn.edit-btn {
  background: rgba(79, 132, 104, 0.12);
  color: #355c49;
  border: 1px solid rgba(79, 132, 104, 0.3);
}

.table-action-btn.edit-btn:hover {
  background: rgba(79, 132, 104, 0.25);
}

.table-action-btn.delete-btn {
  background: rgba(161, 64, 63, 0.12);
  color: #7a2f2e;
  border: 1px solid rgba(161, 64, 63, 0.3);
}

.table-action-btn.delete-btn:hover {
  background: rgba(161, 64, 63, 0.25);
  color: #7a2f2e;
}

.table-empty-cell {
  text-align: center;
  padding: 40px !important;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Timezone (GYT) & Published Time Displays */
.admin-tz-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(63, 107, 74, 0.12);
  color: #2c4f39;
  border: 1px solid rgba(63, 107, 74, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.last-published-time {
  display: inline-block;
  margin-left: 6px;
  color: #6e6255;
  font-size: 0.82rem;
}

.preview-last-published {
  display: inline-block;
  margin-left: 6px;
  color: #4a4038;
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Media Manager */
.btn-media-manager {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(237, 230, 214, 0.7);
  color: #355c49;
  border: 1px solid rgba(79, 132, 104, 0.28);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-media-manager:hover {
  background: rgba(79, 132, 104, 0.16);
  border-color: rgba(79, 132, 104, 0.5);
  color: #355c49;
  transform: translateY(-1px);
}

.thumbnail-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.thumbnail-input-group .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.btn-pick-thumbnail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(237, 230, 214, 0.9);
  color: #8c6418;
  border: 1px solid rgba(184, 145, 46, 0.35);
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pick-thumbnail:hover {
  background: rgba(184, 145, 46, 0.18);
  border-color: rgba(184, 145, 46, 0.6);
  color: #8c6418;
}

/* Media Modal Card */
.media-modal-card {
  max-width: 920px !important;
  width: 96% !important;
  height: 86vh !important;
  max-height: 86vh !important;
  background: #fbf8ef !important;
  border: 1px solid rgba(28, 22, 14, 0.14) !important;
}

.media-modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.media-modal-subtitle {
  font-size: 0.8rem;
  color: #6e6255;
  margin: 0;
}

.media-modal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Navigation & Action Bar */
.media-nav-bar {
  padding: 10px 20px;
  background: rgba(245, 239, 224, 0.85);
  border-bottom: 1px solid rgba(28, 22, 14, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.media-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #4a4038;
  flex-wrap: wrap;
}

.crumb-link {
  color: #355c49;
  cursor: pointer;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.crumb-link:hover {
  background: rgba(79, 132, 104, 0.15);
  color: #355c49;
}

.crumb-sep {
  color: #8a7d6d;
  font-size: 0.75rem;
}

.crumb-current {
  color: #2b2420;
  font-weight: 600;
  padding: 2px 6px;
}

.media-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-media-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(237, 230, 214, 0.8);
  border: 1px solid rgba(28, 22, 14, 0.12);
  color: #2b2420;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-media-action:hover {
  background: rgba(232, 224, 204, 0.9);
  border-color: rgba(28, 22, 14, 0.25);
  color: #211a14;
}

.btn-media-upload {
  background: rgba(63, 107, 74, 0.18);
  border-color: rgba(63, 107, 74, 0.35);
  color: #2c4f39;
}

.btn-media-upload:hover {
  background: rgba(63, 107, 74, 0.3);
  border-color: rgba(63, 107, 74, 0.55);
  color: #2c4f39;
}

.media-search-wrap {
  position: relative;
}

.media-search-input {
  background: rgba(245, 239, 224, 0.8);
  border: 1px solid rgba(28, 22, 14, 0.12);
  border-radius: var(--radius-sm);
  color: #2b2420;
  padding: 6px 10px;
  font-size: 0.78rem;
  width: 140px;
  transition: width 0.25s ease, border-color 0.2s ease;
}

.media-search-input:focus {
  outline: none;
  border-color: rgba(79, 132, 104, 0.6);
  width: 190px;
}

/* Inline Create Folder Form */
.media-inline-folder-form {
  padding: 10px 20px;
  background: rgba(237, 230, 214, 0.7);
  border-bottom: 1px solid rgba(28, 22, 14, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.media-inline-folder-form .form-input {
  max-width: 280px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-folder-create {
  background: #355c49;
  color: #211a14;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-folder-create:hover {
  background: #355c49;
}

.btn-folder-cancel {
  background: transparent;
  color: #6e6255;
  border: 1px solid rgba(28, 22, 14, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
}

.btn-folder-cancel:hover {
  color: #2b2420;
  background: rgba(28, 22, 14, 0.05);
}

/* Modal Body & Dropzone */
.media-modal-body {
  flex: 1;
  padding: 18px 20px;
  overflow-y: auto;
  position: relative;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.media-modal-body::-webkit-scrollbar {
  display: none !important;
}

.media-modal-body.drag-over {
  background: rgba(79, 132, 104, 0.08);
  outline: 2px dashed rgba(79, 132, 104, 0.6);
  outline-offset: -10px;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 14px;
}

/* Folder Card */
.media-card-folder {
  background: rgba(237, 230, 214, 0.5);
  border: 1px solid rgba(28, 22, 14, 0.08);
  border-radius: 8px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

.media-card-folder:hover {
  background: rgba(237, 230, 214, 0.85);
  border-color: rgba(79, 132, 104, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(50, 40, 25, 0.10);
}

.media-folder-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(79, 132, 104, 0.12);
  color: #355c49;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.media-folder-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a4038;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-folder-meta {
  font-size: 0.7rem;
  color: #6e6255;
  margin-top: 3px;
}

/* File / Image Card */
.media-card-file {
  background: rgba(237, 230, 214, 0.4);
  border: 1px solid rgba(28, 22, 14, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.media-card-file:hover {
  background: rgba(237, 230, 214, 0.85);
  border-color: rgba(184, 145, 46, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(50, 40, 25, 0.10);
}

.media-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  background: #e8e0cc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-card-file:hover .media-thumb-img {
  transform: scale(1.05);
}

.media-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 32, 22, 0.75);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.media-card-file:hover .media-thumb-overlay {
  opacity: 1;
}

.media-btn-overlay {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.media-btn-overlay:hover {
  background: #355c49;
  border-color: #4f8468;
  transform: scale(1.1);
}

.media-btn-overlay.delete-overlay-btn:hover {
  background: #a1403f;
  border-color: #7a2f2e;
}

.media-picker-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(184, 145, 46, 0.95);
  color: #1c140a;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.is-picker-mode .media-card-file:hover .media-picker-badge {
  opacity: 1;
}

.media-file-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-file-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2b2420;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-file-subtext {
  font-size: 0.68rem;
  color: #6e6255;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Empty State in Media */
.media-empty-folder {
  grid-column: 1 / -1;
  padding: 50px 20px;
  text-align: center;
  color: #6e6255;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.media-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(28, 22, 14, 0.04);
  color: #8a7d6d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading State */
.media-loading-state {
  position: absolute;
  inset: 0;
  background: rgba(251, 248, 239, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #355c49;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 10;
}

.media-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(79, 132, 104, 0.2);
  border-top-color: #4f8468;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Modal Footer in Media */
.media-modal-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.media-footer-info {
  font-size: 0.8rem;
  color: #6e6255;
}

