/* ===== DESIGN TOKENS ===== */
:root {
  --deep-black: #0a080c;
  --rich-purple: #3b1a5a;
  --mid-purple: #5c2d8a;
  --light-purple: #9b59b6;
  --pale-purple: #d7b8f0;
  --muted-lilac: #c4a8df;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --ivory: #f5f0e8;
  --warm-white: #fdf8f2;
  --candle-red: #c0392b;
  --candle-orange: #e67e22;
  --candle-yellow: #f1c40f;
  --text-dark: #1a0f2e;
  --text-mid: #4a3060;
  --text-light: #8a7098;
  --glass: rgba(59,26,90,0.35);
  --glass-border: rgba(201,168,76,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--deep-black);
  color: var(--ivory);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== PARTICLES ===== */
.particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--gold-light);
  border-radius: 50%;
  opacity: 0;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1.5); }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(92,45,138,0.45) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 70% 80%, rgba(59,26,90,0.35) 0%, transparent 60%),
    linear-gradient(180deg, #0a080c 0%, #100a1a 50%, #0d0615 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(201,168,76,0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(201,168,76,0.04) 60px);
  pointer-events: none;
}

.hero-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(10,8,12,0) 50%, rgba(10,8,12,0.8) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 60px 20px 80px;
  max-width: 700px;
  width: 100%;
}

.in-loving-memory {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 0.3s forwards;
}

/* ===== PORTRAIT ===== */
.portrait-frame {
  position: relative;
  width: 200px; height: 200px;
  margin: 0 auto 30px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 0.6s forwards;
}

.portrait-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--gold);
}
.outer-ring {
  inset: -16px;
  border-color: rgba(201,168,76,0.3);
  animation: rotateSlow 20s linear infinite;
}
.inner-ring {
  inset: -6px;
  border-color: rgba(201,168,76,0.6);
  border-style: dashed;
  animation: rotateSlow 15s linear infinite reverse;
}
@keyframes rotateSlow { to { transform: rotate(360deg); } }

.portrait-photo {
  width: 200px; height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 40px rgba(92,45,138,0.6), 0 0 80px rgba(59,26,90,0.4), inset 0 0 20px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #1a0f2e 0%, #2d1045 100%);
  display: flex; align-items: center; justify-content: center;
}

.portrait-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.portrait-initials {
  display: none;
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* ===== CANDLE ===== */
.candle-wrap {
  display: flex; justify-content: center;
  margin: 6px 0 20px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 0.9s forwards;
}

.candle {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
}

.flame {
  position: relative;
  width: 18px; height: 36px;
  display: flex; align-items: flex-end; justify-content: center;
  margin-bottom: -2px;
}

.flame::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 36px;
  background: radial-gradient(ellipse 60% 100% at 50% 100%, var(--candle-orange) 30%, var(--candle-red) 60%, transparent 100%);
  border-radius: 50% 50% 30% 30% / 60% 60% 30% 30%;
  filter: blur(1px);
  animation: flickerOuter 2s ease-in-out infinite alternate;
}

.flame-inner {
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 20px;
  background: radial-gradient(ellipse 60% 100% at 50% 100%, var(--candle-yellow) 20%, var(--candle-orange) 70%, transparent 100%);
  border-radius: 50% 50% 30% 30% / 60% 60% 30% 30%;
  animation: flickerInner 1.5s ease-in-out infinite alternate;
}

@keyframes flickerOuter {
  0%   { transform: translateX(-50%) scaleX(1) scaleY(1); opacity: 1; }
  33%  { transform: translateX(-52%) scaleX(0.88) scaleY(1.06); opacity: 0.92; }
  66%  { transform: translateX(-48%) scaleX(1.05) scaleY(0.97); opacity: 0.96; }
  100% { transform: translateX(-50%) scaleX(0.95) scaleY(1.04); opacity: 1; }
}
@keyframes flickerInner {
  0%   { transform: translateX(-50%) scaleX(1) scaleY(1); }
  50%  { transform: translateX(-52%) scaleX(0.85) scaleY(1.1); }
  100% { transform: translateX(-48%) scaleX(1.1) scaleY(0.92); }
}

.candle-body {
  width: 22px; height: 60px;
  background: linear-gradient(180deg, #e8d5c0 0%, #d4b896 40%, #c9a87a 100%);
  border-radius: 3px 3px 0 0;
  position: relative;
  box-shadow: inset -4px 0 8px rgba(0,0,0,0.2), 0 0 20px rgba(230,126,34,0.3);
}

.candle-base {
  width: 28px; height: 6px;
  background: linear-gradient(180deg, #b8956a 0%, #8a6a42 100%);
  border-radius: 3px;
}

.drips span {
  position: absolute;
  width: 4px;
  background: linear-gradient(180deg, #e8d5c0, #d4b896);
  border-radius: 0 0 4px 4px;
  opacity: 0.7;
}
.drips span:nth-child(1) { height: 10px; top: 2px; left: 2px; }
.drips span:nth-child(2) { height: 7px;  top: 0;  right: 4px; }
.drips span:nth-child(3) { height: 5px;  top: 4px; left: 8px; }

/* Glow halo under candle */
.candle::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 20px;
  background: radial-gradient(ellipse, rgba(230,126,34,0.35) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2s ease-in-out infinite alternate;
}
@keyframes glowPulse {
  0%  { opacity: 0.6; transform: translateX(-50%) scaleX(1); }
  100%{ opacity: 1;   transform: translateX(-50%) scaleX(1.2); }
}

/* ===== HERO TEXT ===== */
.name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-shadow: 0 2px 20px rgba(201,168,76,0.4);
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 1.1s forwards;
}

.dates {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted-lilac);
  letter-spacing: 0.15em;
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 1.3s forwards;
}

.hero-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--pale-purple);
  max-width: 480px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 1.5s forwards;
}

.scroll-hint {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 1.8s forwards;
  color: var(--text-light);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.arrow-down {
  animation: bounce 2s ease-in-out infinite;
  font-size: 1.2rem;
  color: var(--gold);
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== DIVIDER ===== */
.ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 0.5em;
  margin: 10px 0;
  opacity: 0.6;
}

/* ===== SECTIONS ===== */
.form-section, .wall-section {
  position: relative;
  padding: 80px 20px;
}

.form-section {
  background: linear-gradient(180deg, #0d0615 0%, #110820 50%, #0d0615 100%);
}

.wall-section {
  background: linear-gradient(180deg, #0a080c 0%, #0e0618 50%, #0a080c 100%);
}

.section-inner {
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--gold-light);
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.section-sub {
  text-align: center;
  color: var(--muted-lilac);
  font-style: italic;
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.section-sub strong {
  color: var(--gold);
  font-style: normal;
}

/* ===== FORM ===== */
.status-banner {
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  text-align: center;
  border: 1px solid;
}
.status-banner.success {
  background: rgba(46,139,46,0.15);
  border-color: rgba(46,139,46,0.4);
  color: #88dd88;
}
.status-banner.error {
  background: rgba(180,30,30,0.15);
  border-color: rgba(180,30,30,0.4);
  color: #ff9999;
}
.status-banner.closed {
  background: rgba(92,45,138,0.2);
  border-color: rgba(155,89,182,0.4);
  color: var(--pale-purple);
}

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

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pale-purple);
  margin-bottom: 8px;
}

label span { color: var(--gold); }
label .optional { color: var(--text-light); font-size: 0.8em; text-transform: none; letter-spacing: 0; }

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 6px;
  color: var(--ivory);
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(201,168,76,0.6);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
  background: rgba(255,255,255,0.07);
}

select option { background: #1a0f2e; color: var(--ivory); }

textarea { resize: vertical; min-height: 120px; }

/* File drop */
.file-drop {
  position: relative;
  border: 1px dashed rgba(201,168,76,0.3);
  border-radius: 8px;
  min-height: 100px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  overflow: hidden;
}
.file-drop:hover { border-color: rgba(201,168,76,0.7); background: rgba(201,168,76,0.04); }
.file-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-drop-label {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
  color: var(--text-light);
  font-size: 0.9rem;
}
.upload-icon { font-size: 2rem; }
.file-drop-label small { font-size: 0.78rem; color: var(--text-light); opacity: 0.7; }

.file-preview {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(10,8,12,0.7);
}
.file-preview img {
  max-height: 90px; max-width: 90%;
  border-radius: 4px;
  border: 1px solid var(--gold);
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #3b1a5a 0%, #5c2d8a 50%, #3b1a5a 100%);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 8px;
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-submit::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-submit:hover { box-shadow: 0 0 30px rgba(92,45,138,0.5); transform: translateY(-1px); }
.btn-submit:hover::before { opacity: 1; }
.btn-submit:active { transform: translateY(0); }

/* ===== TRIBUTE CARDS ===== */
.wall-controls {
  text-align: center;
  margin-bottom: 30px;
}

.btn-download {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 6px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.3s;
}
.btn-download:hover {
  background: rgba(201,168,76,0.1);
  box-shadow: 0 0 20px rgba(201,168,76,0.2);
}

.tributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.loading-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  padding: 40px;
}

.tribute-card {
  background: linear-gradient(145deg, rgba(59,26,90,0.3) 0%, rgba(17,8,32,0.5) 100%);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.tribute-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
.tribute-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(59,26,90,0.5);
}

.card-header {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 14px;
}

.card-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--rich-purple), var(--mid-purple));
  border: 2px solid rgba(201,168,76,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold);
}
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.card-meta { flex: 1; }
.card-name {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 2px;
}
.card-relation {
  font-size: 0.8rem;
  color: var(--muted-lilac);
  font-style: italic;
}
.card-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.card-message {
  font-size: 0.95rem;
  color: var(--ivory);
  line-height: 1.7;
  font-style: italic;
}

.card-photo {
  margin-top: 14px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
}
.card-photo img {
  width: 100%; height: 160px;
  object-fit: cover; display: block;
}

.card-candle {
  position: absolute;
  bottom: 14px; right: 16px;
  font-size: 1.1rem;
  opacity: 0.5;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #060408;
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid rgba(201,168,76,0.15);
  color: var(--text-light);
  font-size: 0.9rem;
}
.candle-row {
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  margin-bottom: 12px;
  opacity: 0.7;
}
.footer-sub { color: var(--text-light); font-size: 0.8rem; margin-top: 6px; }

/* ===== PRINT AREA ===== */
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea {
    display: block !important;
    font-family: Georgia, serif;
    color: #000;
    background: #fff;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .form-row.two-col { grid-template-columns: 1fr; }
  .tributes-grid { grid-template-columns: 1fr; }
  .portrait-frame { width: 160px; height: 160px; }
  .portrait-photo { width: 160px; height: 160px; }
}

/* ===== SUCCESS MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 2, 10, 0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: linear-gradient(145deg, #1a0f2e, #2d1045);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 16px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 80px rgba(92,45,138,0.3);
  animation: slideUp 0.4s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-candle { font-size: 2.8rem; margin-bottom: 14px; animation: glowPulse 2s ease-in-out infinite alternate; }
.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}
.modal-msg {
  color: var(--muted-lilac);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 28px;
}
.modal-close-btn {
  padding: 12px 36px;
  background: linear-gradient(135deg, #3b1a5a, #5c2d8a);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 8px;
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
}
.modal-close-btn:hover {
  box-shadow: 0 0 24px rgba(92,45,138,0.6);
  transform: translateY(-1px);
}

/* ===== PDF UPLOAD ===== */
.pdf-drop { border-color: rgba(201,168,76,0.25); }
.pdf-drop:hover { border-color: rgba(201,168,76,0.6); }

.pdf-selected {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ivory);
  font-size: 0.9rem;
}
.pdf-icon { font-size: 1.5rem; flex-shrink: 0; }
.remove-file {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--text-light);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}
.remove-file:hover { border-color: #e74c3c; color: #e74c3c; }

/* PDF badge on tribute cards */
.card-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  color: var(--gold);
  font-size: 0.8rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.card-pdf-link:hover { background: rgba(201,168,76,0.2); }

/* Field hint */
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

/* textarea not required when PDF uploaded */
textarea.optional-field { border-color: rgba(201,168,76,0.15); }

/* ===== YEARS & DATES-SUB ===== */
.dates {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.25em;
  margin-bottom: 4px;
}
.dates-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted-lilac);
  letter-spacing: 0.15em;
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeSlideUp 1s ease 1.3s forwards;
}

/* ===== TRIBUTE REF BADGE ===== */
.card-ref {
  display: inline-block;
  margin-top: 14px;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: var(--text-light);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 4px;
  padding: 3px 9px;
  letter-spacing: 0.08em;
}
.card-ref::before { content: 'REF: '; color: var(--gold); opacity: 0.7; }

/* Per-tribute download button */
.btn-dl-single {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  margin-left: 8px;
  padding: 4px 12px;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 4px;
  color: var(--gold);
  font-size: 0.76rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  font-family: 'EB Garamond', serif;
}
.btn-dl-single:hover { background: rgba(201,168,76,0.1); border-color: var(--gold); }

/* ===== MODAL REF BOX ===== */
.modal-ref-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  padding: 12px 18px;
  margin: 0 0 24px;
  font-size: 0.82rem;
  color: var(--muted-lilac);
  line-height: 1.8;
}
.modal-ref-box strong {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ===== BROCHURE PREVIEW MODAL ===== */
.brochure-box {
  max-width: 600px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.brochure-preview {
  background: #fff;
  color: #1a0f2e;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 16px 0;
  font-family: Georgia, serif;
  text-align: left;
  border: 1px solid rgba(201,168,76,0.3);
}

.brochure-header {
  text-align: center;
  border-bottom: 1.5px solid #c9a84c;
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.brochure-header-title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  color: #3b1a5a;
  letter-spacing: 0.05em;
}
.brochure-header-dates {
  font-size: 0.78rem;
  color: #7a5490;
  font-style: italic;
  margin-top: 3px;
}

.brochure-name {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: #3b1a5a;
  font-weight: 600;
  margin-bottom: 3px;
}
.brochure-meta {
  font-size: 0.82rem;
  color: #7a5490;
  margin-bottom: 14px;
}

.brochure-photo {
  max-width: 160px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #c9a84c;
  margin-bottom: 12px;
  display: block;
}

.brochure-editable {
  width: 100%;
  border: 1px dashed #c9a84c;
  border-radius: 6px;
  padding: 12px 14px;
  font-family: Georgia, serif;
  font-size: 0.98rem;
  font-style: italic;
  color: #1a0f2e;
  line-height: 1.75;
  resize: vertical;
  background: #fdfaf4;
  outline: none;
  transition: border-color 0.2s;
}
.brochure-editable:focus { border-color: #3b1a5a; }

.edit-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #9b59b6;
  font-style: italic;
}

.brochure-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.btn-brochure-action {
  padding: 10px 20px;
  border-radius: 7px;
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid;
}
.btn-print {
  background: linear-gradient(135deg, #3b1a5a, #5c2d8a);
  color: var(--gold-light);
  border-color: rgba(201,168,76,0.5);
}
.btn-print:hover { box-shadow: 0 0 20px rgba(92,45,138,0.5); transform: translateY(-1px); }

.btn-word {
  background: rgba(201,168,76,0.1);
  color: var(--gold);
  border-color: rgba(201,168,76,0.4);
}
.btn-word:hover { background: rgba(201,168,76,0.2); }

.btn-close {
  background: transparent;
  color: var(--text-light);
  border-color: rgba(255,255,255,0.15);
}
.btn-close:hover { color: var(--ivory); border-color: rgba(255,255,255,0.3); }

/* ===== CARD ACTIONS BAR ===== */
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(201,168,76,0.1);
}

.btn-dl-single {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 5px;
  color: var(--gold);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  font-family: 'EB Garamond', serif;
}
.btn-dl-single:hover { background: rgba(201,168,76,0.1); border-color: var(--gold); }

/* ===== ADMIN LOGIN MODAL ===== */
.admin-modal-box { max-width: 380px; }

.admin-input-wrap { margin: 16px 0 10px; }

.admin-password-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 8px;
  color: var(--ivory);
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  text-align: center;
  letter-spacing: 0.15em;
}
.admin-password-input:focus {
  border-color: rgba(201,168,76,0.7);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.admin-error {
  color: #ff9999;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 10px;
  background: rgba(180,30,30,0.15);
  border: 1px solid rgba(180,30,30,0.3);
  border-radius: 6px;
  padding: 8px 12px;
}

.admin-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-cancel {
  background: transparent !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: var(--text-light) !important;
}
.btn-cancel:hover { color: var(--ivory) !important; }

/* ===== ADMIN TOGGLE BUTTONS ===== */
.btn-admin-toggle {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 6px;
  color: var(--text-light);
  font-family: 'EB Garamond', serif;
  font-size: 0.88rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.btn-admin-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-logout {
  border-color: rgba(180,30,30,0.3);
  color: #cc8888;
}
.btn-logout:hover {
  border-color: #e74c3c;
  color: #ff9999;
}

/* Admin-only elements hidden by default — shown via JS */
.admin-only { display: none; }
