:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-alt: #f3ede2;
  --ink: #1c1917;
  --muted: #57534e;
  --border: #e5ddd0;
  --accent: #8b1e2d;
  --accent-hover: #6e1522;
  --gold: #a16207;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --info: #1e40af;
  --info-bg: #dbeafe;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
}

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

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

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

.wax-seal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.brand-name {
  display: block;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}

.nav-btn:hover, .nav-btn.active {
  background: var(--surface-alt);
  border-color: var(--border);
}

.nav-admin {
  color: var(--accent);
}

.user-badge {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--surface-alt);
  padding: 6px 10px;
  border-radius: 999px;
}

.main-content {
  padding-top: 32px;
  padding-bottom: 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: #fdecef;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-copy h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.2;
  margin: 0 0 14px;
}

.hero-copy h1 em {
  color: var(--accent);
  font-style: italic;
}

.lead {
  color: var(--muted);
  font-size: 1.03rem;
  margin: 0 0 22px;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.steps-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.94rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.narrow-card {
  max-width: 680px;
  margin: 0 auto;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.tab {
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.stack {
  display: grid;
  gap: 16px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .row-2 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.88rem;
  font-weight: 600;
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.hint, .muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

.btn-outline:hover, .btn-outline.active {
  background: var(--surface-alt);
}

.btn-full {
  width: 100%;
}

.toast {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
}

.toast.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: #bbf7d0;
}

.toast.err {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

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

.letters-grid {
  display: grid;
  gap: 16px;
}

.letter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: grid;
  gap: 10px;
}

.letter-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-pending { background: var(--warn-bg); color: var(--warn); }
.status-printing { background: var(--info-bg); color: var(--info); }
.status-shipped { background: #ede9fe; color: #5b21b6; }
.status-delivered { background: var(--ok-bg); color: var(--ok); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-val {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-lbl {
  font-size: 0.84rem;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.audit-table th, .audit-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.letter-dialog {
  width: min(860px, 94vw);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.letter-dialog::backdrop {
  background: rgba(28, 25, 23, 0.55);
}

.dialog-inner {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dialog-header-actions {
  display: flex;
  gap: 8px;
}

.envelope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.envelope-box {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
}

.envelope-box h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.envelope-box p {
  margin: 2px 0;
  font-size: 0.9rem;
}

.bold {
  font-weight: 700;
}

.letter-paper {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  background: #fffdf8;
  font-family: Georgia, 'Times New Roman', serif;
}

.letter-paper.vintage {
  background: #f5ebd6;
}

.letter-paper.minimal {
  background: #ffffff;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.letter-body-text {
  white-space: pre-wrap;
  margin-top: 12px;
  line-height: 1.75;
}

.admin-update-form {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

@media print {
  .no-print, .topbar, .toast, #view-auth, #view-profile, #view-compose, #view-letters, #view-admin {
    display: none !important;
  }
  .letter-dialog {
    position: static;
    width: 100%;
    border: none;
    box-shadow: none;
  }
}

/* --- Kategori Vitrini & Hareketli Ana Sayfa --- */
.showcase-section {
  margin-top: 48px;
}

.showcase-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
}

.showcase-head h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  margin: 4px 0 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.category-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(28, 25, 23, 0.12);
}

.category-card.cat-asker { border-top-color: #2f5233; }
.category-card.cat-cezaevi { border-top-color: #334155; }
.category-card.cat-sevgili { border-top-color: #be123c; }
.category-card.cat-aile { border-top-color: #b45309; }
.category-card.cat-ozel { border-top-color: #6d28d9; }

.cat-icon {
  font-size: 1.9rem;
  line-height: 1;
}

.category-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.category-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
}

.cat-cta {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
}

.cat-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  margin-left: 6px;
}

/* --- Mektup Yaz + Canlı Önizleme & Fiyat Özeti --- */
.compose-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

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

.preview-column {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 86px;
}

.price-summary-card h3,
.preview-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.preview-subhead {
  margin-top: 20px !important;
}

.price-rows {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.price-total {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 1.05rem;
  color: var(--accent);
}

.live-envelope {
  position: relative;
  border-radius: 10px;
  padding: 26px 20px 20px;
  min-height: 155px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.live-envelope.env-white {
  background: #ffffff;
  color: #1c1917;
}

.live-envelope.env-kraft {
  background: #d9b991;
  color: #2b1d0e;
  border-color: #bfa07a;
}

.live-envelope.env-burgundy {
  background: #6e1522;
  color: #fdf2f4;
  border-color: #540f19;
}

.live-envelope.env-navy {
  background: #172554;
  color: #eff6ff;
  border-color: #1e3a8a;
}

.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(0, 0, 0, 0.07);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.env-stamp {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 44px;
  border: 2px dashed currentColor;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.75;
}

.env-seal {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8b1e2d;
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.env-address {
  margin-top: 44px;
}

.env-to-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
  font-weight: 700;
}

.env-to-name {
  font-weight: 700;
  font-size: 1rem;
  margin-top: 2px;
}

.env-to-city {
  font-size: 0.86rem;
  opacity: 0.85;
}

.live-paper {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  transition: background-color 0.25s ease, font-family 0.25s ease;
}

.live-paper.classic {
  background: #fffdf8;
  font-family: Georgia, 'Times New Roman', serif;
  color: #1c1917;
}

.live-paper.vintage {
  background: #f5ebd6;
  font-family: Georgia, 'Times New Roman', serif;
  color: #3b2611;
  border-color: #d6c3a1;
}

.live-paper.minimal {
  background: #ffffff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #111827;
}

.preview-subject {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 6px;
}

.preview-body {
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* --- Ödeme Ekranı --- */
.payment-summary-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
}

.pay-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 1.1rem;
  color: var(--accent);
}

.status-unpaid {
  background: #fee2e2;
  color: #991b1b;
}

/* --- Ayrı Yazdırma Modları (Sadece Mektup / Sadece Zarf Adresleri) --- */
@media print {
  body.print-letter-only .envelope-grid {
    display: none !important;
  }
  body.print-letter-only .letter-paper {
    border: none !important;
    padding: 16mm 14mm !important;
    box-shadow: none !important;
  }

  body.print-envelope-only .letter-paper {
    display: none !important;
  }
  body.print-envelope-only .envelope-grid {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110mm;
    padding: 10mm;
    gap: 24mm;
  }
  body.print-envelope-only .envelope-box {
    border: none !important;
    background: transparent !important;
    max-width: 95mm;
  }
  body.print-envelope-only .envelope-box:first-child {
    align-self: flex-start;
  }
  body.print-envelope-only .envelope-box:last-child {
    align-self: flex-end;
    text-align: left;
  }
}

/* --- Nostaljik Ana Sayfa Tasarımı --- */
.nostalgic-banner {
  position: relative;
  background: radial-gradient(circle at top left, #fbf4e4 0%, #f3e7cf 55%, #ece0c7 100%);
  border: 1px solid #d9c7a7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(68, 44, 20, 0.1);
}

.airmail-stripe {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    #8b1e2d 0px,
    #8b1e2d 14px,
    #faf7f2 14px,
    #faf7f2 24px,
    #1e3a5f 24px,
    #1e3a5f 38px,
    #faf7f2 38px,
    #faf7f2 48px
  );
  opacity: 0.85;
}

.nostalgic-hero {
  padding: 32px 28px;
  position: relative;
}

.nostalgic-hero .hero-copy {
  position: relative;
}

.postmark {
  position: absolute;
  top: -6px;
  right: 8px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px dashed rgba(139, 30, 45, 0.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-14deg);
  color: rgba(139, 30, 45, 0.55);
  font-family: Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.postmark span {
  font-size: 0.78rem;
}

.postmark small {
  font-size: 0.56rem;
  border-top: 1px solid rgba(139, 30, 45, 0.35);
  margin-top: 3px;
  padding-top: 2px;
}

.nostalgic-quote {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 253, 248, 0.65);
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  color: #4a3728;
  border-radius: 0 8px 8px 0;
}

.nostalgic-banner .steps-list li {
  background: rgba(255, 253, 248, 0.82);
  border-color: #dfd0b4;
}

/* --- Temiz Yazdırma: Tarayıcı Tarih/URL Başlıklarını Tamamen Kaldır --- */
@page {
  margin: 0;
}

@media print {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .letter-dialog {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .dialog-inner {
    padding: 0 !important;
    gap: 0 !important;
  }

  body.print-letter-only .letter-paper {
    border: none !important;
    border-radius: 0 !important;
    padding: 22mm 20mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    min-height: 100vh;
  }
}

/* --- Yeni Zarf Renkleri --- */
.live-envelope.env-cream {
  background: #f6eedc;
  color: #3a2d1f;
  border-color: #dfd0b4;
}

.live-envelope.env-forest {
  background: #1b4332;
  color: #ecfdf5;
  border-color: #143326;
}

.live-envelope.env-rose {
  background: #9d4d63;
  color: #fff1f2;
  border-color: #7f384c;
}

.live-envelope.env-black {
  background: #18181b;
  color: #f4d58d;
  border-color: #b8860b;
}

/* --- Yeni Kağıt Renkleri (Hem Canlı Önizleme Hem Admin Baskı) --- */
.live-paper.blush, .letter-paper.blush {
  background: #fdf2f4;
  color: #4a1c28;
  border-color: #f5ccd5;
}

.live-paper.sky, .letter-paper.sky {
  background: #eff6ff;
  color: #1e3a5f;
  border-color: #bfdbfe;
}

.live-paper.sage, .letter-paper.sage {
  background: #f0f7f2;
  color: #1f3b2c;
  border-color: #c6e2cf;
}

.live-paper.lavender, .letter-paper.lavender {
  background: #f5f3ff;
  color: #3b285c;
  border-color: #ddd6fe;
}

.live-paper.ivory, .letter-paper.ivory {
  background: #fffcf0;
  color: #362814;
  border: 2px double #c8a24b;
}

/* --- Yazı Tipleri (Fontlar) --- */
.font-serif {
  font-family: Georgia, 'Times New Roman', serif !important;
}

.font-handwriting {
  font-family: 'Segoe Script', 'Brush Script MT', 'Comic Sans MS', cursive !important;
  line-height: 1.85 !important;
}

.font-calligraphy {
  font-family: 'Palatino Linotype', 'Book Antiqua', Georgia, serif !important;
  font-style: italic !important;
}

.font-typewriter {
  font-family: 'Courier New', Courier, monospace !important;
  letter-spacing: 0.02em;
}

.font-elegant {
  font-family: Garamond, 'Times New Roman', serif !important;
  letter-spacing: 0.03em;
  font-size: 1.04rem;
}

.font-modern {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

/* --- Yardımcı Kutular, Taslaklar, Fotoğraflar & Ekler --- */
.helper-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.helper-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}

.template-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

.template-pill:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
}

.addon-checks {
  display: grid;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.privacy-check {
  align-items: flex-start;
  background: #fdf2f4;
  border: 1px solid #f5ccd5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.84rem;
}

.photo-thumb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photo-thumb {
  position: relative;
  width: 92px;
  background: #fff;
  padding: 5px 5px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.photo-thumb img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.proof-box {
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: var(--ok-bg);
  border: 1px solid #bbf7d0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.proof-box img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #86efac;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}

/* --- Admin Fotoğraf Büyütme (Lightbox) --- */
.photo-thumb.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photo-thumb.clickable:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.photo-lightbox {
  width: min(760px, 94vw);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.photo-lightbox::backdrop {
  background: rgba(28, 25, 23, 0.72);
}

.lightbox-inner {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 8px;
  display: block;
}

/* --- Yasal Onay Kutuları & Ana Sayfa Mektup Arkadaşlığı Reklamı --- */
.legal-checks {
  display: grid;
  gap: 8px;
}

.legal-check-item {
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.legal-body {
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.7;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 6px;
}

.penpal-promo-banner {
  margin-top: 36px;
  background: linear-gradient(135deg, #2b1d14 0%, #5c1925 60%, #8b1e2d 100%);
  color: #faf7f2;
  border-radius: 16px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 14px 32px rgba(92, 25, 37, 0.22);
}

.penpal-promo-copy {
  max-width: 660px;
}

.penpal-promo-banner .pill {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.penpal-promo-banner h2 {
  font-family: Georgia, 'Times New Roman', serif;
  margin: 6px 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.penpal-promo-banner .muted {
  color: rgba(250, 247, 242, 0.88);
  margin: 0;
}

.penpal-promo-banner .btn-primary {
  background: #faf7f2;
  color: #8b1e2d;
  padding: 12px 22px;
}

.penpal-promo-banner .btn-primary:hover {
  background: #ffffff;
}

/* --- Online / Offline Durum Rozetleri --- */
.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.presence-online {
  background: #dcfce7;
  color: #166534;
}

.presence-offline {
  background: #f5f5f4;
  color: #57534e;
}

/* --- Alt Bilgi (Footer) --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: grid;
  gap: 2px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.footer-link-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --- Doğrulama Kodu, Şifre Sıfırlama & SSS --- */
.inline-action {
  display: flex;
  gap: 8px;
}

.inline-action input {
  flex: 1;
}

.auth-extra {
  text-align: right;
  font-size: 0.86rem;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--bg);
}

.faq-list summary {
  font-weight: 700;
  cursor: pointer;
}

.faq-list p {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- Gerçekçi Çift Yönlü Zarf Önizlemesi --- */
.category-card.cat-gelecek {
  border-top-color: #0f766e;
}

.live-envelope {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.env-postmark {
  position: absolute;
  top: 16px;
  right: 58px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px dashed currentColor;
  display: grid;
  place-items: center;
  font-size: 0.56rem;
  font-weight: 700;
  opacity: 0.45;
  transform: rotate(-16deg);
}

.env-sender-block {
  margin-top: 28px;
  max-width: 62%;
  text-align: left;
}

.env-recipient-block {
  margin-top: 0 !important;
  align-self: flex-end;
  max-width: 72%;
  text-align: left;
  border-left: 2px solid currentColor;
  padding-left: 10px;
}

.env-small-bold {
  font-size: 0.82rem;
  font-weight: 700;
}

.env-small-line {
  font-size: 0.76rem;
  opacity: 0.85;
  line-height: 1.35;
}

/* --- Geleceğe Mektup: Katlanıp Zarfa Konulma Animasyonu --- */
.seal-stage {
  margin-top: 20px;
  padding: 28px 16px;
  border-radius: 12px;
  background: radial-gradient(circle, #fbf4e4 0%, #f1e4ca 100%);
  border: 1px solid #d9c7a7;
  text-align: center;
}

.anim-scene {
  position: relative;
  width: 220px;
  height: 170px;
  margin: 0 auto;
  perspective: 700px;
}

.anim-paper {
  position: absolute;
  left: 35px;
  top: 6px;
  width: 150px;
  height: 110px;
  background: #fffdf8;
  border: 1px solid #d9c7a7;
  border-radius: 6px;
  padding: 16px 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  z-index: 2;
  transform-origin: center center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.anim-paper-line {
  height: 6px;
  border-radius: 4px;
  background: #d6c3a1;
}

.anim-paper-line.short {
  width: 65%;
}

.anim-envelope {
  position: absolute;
  left: 20px;
  bottom: 6px;
  width: 180px;
  height: 108px;
  z-index: 3;
}

.anim-env-back {
  position: absolute;
  inset: 0;
  background: #d9b991;
  border-radius: 8px;
  z-index: 1;
}

.anim-env-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #e7cca5 0%, #d4b082 100%);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 8px 8px;
  z-index: 4;
}

.anim-env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #c8a274;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform: rotateX(180deg);
  z-index: 5;
}

.anim-wax {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #8b1e2d;
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 700;
  display: grid;
  place-items: center;
  z-index: 6;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.seal-stage.playing .anim-paper {
  animation: foldAndInsert 1.3s ease-in-out forwards;
}

.seal-stage.playing .anim-env-flap {
  animation: closeFlap 0.6s ease-in-out 1.15s forwards;
}

.seal-stage.playing .anim-wax {
  animation: stampWax 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1.65s forwards;
}

@keyframes foldAndInsert {
  0% { transform: translateY(0) scaleY(1); opacity: 1; }
  40% { transform: translateY(8px) scaleY(0.45) rotateX(35deg); opacity: 1; }
  100% { transform: translateY(62px) scaleY(0.35) scaleX(0.92); opacity: 0; }
}

@keyframes closeFlap {
  0% { transform: rotateX(180deg); }
  100% { transform: rotateX(0deg); }
}

@keyframes stampWax {
  0% { transform: translateX(-50%) scale(2.2); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* --- Genel Nostaljik Tema Güçlendirmesi --- */
:root {
  --bg: #f3ead8;
  --surface: #fffdf8;
  --surface-alt: #ede1ca;
  --ink: #2b1d14;
  --muted: #665445;
  --border: #d8c7aa;
  --accent: #7f1d2b;
  --accent-hover: #63131f;
}

body {
  background: radial-gradient(circle at top center, #f8f1e3 0%, #efe3cc 100%);
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: Georgia, 'Palatino Linotype', 'Times New Roman', serif;
  color: #2b1d14;
}

.topbar {
  background: rgba(255, 253, 248, 0.95);
  border-bottom: 2px solid #d8c7aa;
}

.card, .letter-card, .stat-box {
  background: #fffdf8;
  border-color: #d8c7aa;
  box-shadow: 0 10px 26px rgba(68, 44, 20, 0.08);
}

/* --- Büyük Ortada Açılan Mühürleme Animasyonu Penceresi --- */
.seal-overlay-dialog {
  width: min(520px, 92vw);
  border: 2px solid #c8a24b;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: 0 28px 70px rgba(28, 18, 10, 0.45);
  overflow: visible;
}

.seal-overlay-dialog::backdrop {
  background: rgba(32, 20, 12, 0.72);
  backdrop-filter: blur(3px);
}

.seal-overlay-inner .seal-stage-lg {
  margin: 0;
  padding: 40px 28px;
  border-radius: 16px;
  border: none;
}

.anim-scene-lg {
  transform: scale(1.38);
  margin: 26px auto 34px;
}

/* === GERÇEK NOSTALJİK ESKİTİLMİŞ PARŞÖMEN & YANIK KENAR TEMASI (SIFIR PEMBE) === */
:root {
  --bg: #e8d8b5;
  --surface: #f7edd6;
  --surface-alt: #ead9b5;
  --ink: #2b1b0e;
  --muted: #5c432c;
  --border: #c6ab7c;
  --accent: #7a3e12;
  --accent-hover: #5c2c0a;
  --gold: #9a6518;
}

body {
  background:
    radial-gradient(ellipse at center, #f1e3c4 0%, #e4d0a6 65%, #d4ba87 100%);
  background-attachment: fixed;
  color: var(--ink);
}

.topbar {
  background: linear-gradient(180deg, #f6ead0 0%, #ecdcba 100%);
  border-bottom: 2px solid #b99763;
  box-shadow: 0 3px 12px rgba(62, 36, 12, 0.12);
}

.wax-seal {
  background: radial-gradient(circle at 35% 35%, #9c4a1a 0%, #6e2f0c 70%, #4d1e06 100%);
  box-shadow: inset 0 0 0 3px rgba(244, 213, 141, 0.35), 0 2px 6px rgba(42, 20, 6, 0.35);
}

.pill {
  background: #ead5a8 !important;
  color: #5c2e0e !important;
  border: 1px solid #bfa068;
}

.card, .letter-card, .stat-box {
  background: linear-gradient(180deg, #faf1dc 0%, #f3e5c6 100%);
  border: 1px solid #c4a673;
  box-shadow:
    inset 0 0 18px rgba(138, 92, 38, 0.14),
    0 8px 22px rgba(56, 33, 12, 0.12);
}

/* Kenarı Yanık Eskitilmiş Parşömen Ana Banner */
.nostalgic-banner {
  position: relative;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 248, 226, 0.65) 0%, transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(168, 114, 48, 0.18) 0%, transparent 50%),
    linear-gradient(160deg, #f6e7c3 0%, #ebd4a3 52%, #dfc188 100%);
  border: 2px solid #8a5624;
  border-radius: 14px;
  box-shadow:
    inset 0 0 46px rgba(102, 52, 12, 0.48),
    inset 0 0 14px rgba(58, 26, 5, 0.58),
    0 16px 36px rgba(46, 24, 8, 0.24);
  animation: burnedEdgeGlow 5.5s ease-in-out infinite alternate;
}

@keyframes burnedEdgeGlow {
  0% {
    box-shadow:
      inset 0 0 42px rgba(102, 52, 12, 0.44),
      inset 0 0 12px rgba(58, 26, 5, 0.52),
      0 14px 32px rgba(46, 24, 8, 0.22);
  }
  100% {
    box-shadow:
      inset 0 0 58px rgba(118, 56, 10, 0.58),
      inset 0 0 18px rgba(48, 20, 4, 0.66),
      0 18px 40px rgba(46, 24, 8, 0.28);
  }
}

.airmail-stripe {
  height: 7px;
  background: repeating-linear-gradient(
    -45deg,
    #6e3410 0px,
    #6e3410 14px,
    #f5e7c8 14px,
    #f5e7c8 24px,
    #3d2b1f 24px,
    #3d2b1f 38px,
    #f5e7c8 38px,
    #f5e7c8 48px
  );
  opacity: 0.78;
}

.postmark {
  border-color: rgba(92, 46, 14, 0.5);
  color: rgba(92, 46, 14, 0.62);
}

.nostalgic-quote {
  border-left-color: #7a3e12;
  background: rgba(250, 240, 214, 0.72);
  color: #3e2714;
}

.nostalgic-banner .steps-list li {
  background: rgba(250, 241, 218, 0.78);
  border-color: #c2a069;
}

/* Mektup Arkadaşlığı Reklam Bandı — Eskitilmiş Deri & Antik Altın */
.penpal-promo-banner {
  background: linear-gradient(135deg, #342010 0%, #523218 55%, #6e421e 100%) !important;
  border: 2px solid #c49a52;
  box-shadow:
    inset 0 0 32px rgba(20, 10, 2, 0.45),
    0 14px 30px rgba(42, 24, 8, 0.28);
}

.penpal-promo-banner .pill {
  background: rgba(244, 213, 141, 0.2) !important;
  color: #f7e4b5 !important;
  border-color: rgba(244, 213, 141, 0.45);
}

.penpal-promo-banner h2 {
  color: #faf0d7 !important;
}

.penpal-promo-banner .btn-primary {
  background: #f3dfb2;
  color: #3b220d;
  border: 1px solid #c8a24b;
}

.penpal-promo-banner .btn-primary:hover {
  background: #faf0d7;
}

.site-footer {
  background: #ebd9b4;
  border-top: 2px solid #bfa06b;
}

/* === SİNEMATİK KOYU NOSTALJİ & ANTİK ALTIN TEMA === */
body {
  background: #0e0b08 !important;
  color: #f3eadb;
}

.topbar {
  background: rgba(16, 12, 9, 0.88) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 106, 0.22) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.brand-name, .nav-btn, h1, h2, h3, strong {
  color: #f6efe2;
}

.brand-sub, .muted, .hint {
  color: #b5a38d;
}

.nav-btn:hover, .nav-btn.active {
  background: rgba(212, 175, 106, 0.14);
  border-color: rgba(212, 175, 106, 0.35);
  color: #f6efe2;
}

.user-badge {
  background: rgba(212, 175, 106, 0.14);
  color: #e4c890;
  border: 1px solid rgba(212, 175, 106, 0.28);
}

/* Sinematik Mum Işıklı Vintage Hero */
.nostalgic-banner {
  background:
    linear-gradient(105deg, rgba(14, 10, 7, 0.9) 0%, rgba(18, 13, 9, 0.72) 52%, rgba(14, 10, 7, 0.86) 100%),
    url('/hero-vintage.jpg') center/cover no-repeat !important;
  border: 1px solid rgba(212, 175, 106, 0.35) !important;
  border-radius: 20px;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.65),
    0 24px 60px rgba(0, 0, 0, 0.65) !important;
  animation: none !important;
}

.airmail-stripe {
  height: 4px;
  background: linear-gradient(90deg, transparent, #c89f5d, #8b1e2d, #c89f5d, transparent) !important;
  opacity: 0.9;
}

.nostalgic-hero {
  padding: 40px 34px;
}

.nostalgic-banner h1 {
  color: #faf3e6;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
}

.nostalgic-banner h1 em {
  color: #d8b26e;
}

.tw-word {
  color: #e0bc79;
}

.tw-cursor {
  display: inline-block;
  color: #e0bc79;
  font-weight: 300;
  margin-left: 2px;
  animation: blinkCursor 0.85s step-end infinite;
}

@keyframes blinkCursor {
  50% { opacity: 0; }
}

.nostalgic-banner .lead {
  color: #d8cbb8;
}

.nostalgic-quote {
  background: rgba(24, 17, 12, 0.68) !important;
  border-left: 3px solid #d4af6a !important;
  color: #e5d5bc !important;
}

.nostalgic-banner .steps-list li {
  background: rgba(20, 15, 11, 0.72) !important;
  border: 1px solid rgba(212, 175, 106, 0.25) !important;
  color: #e8dcc8;
}

.postmark {
  border-color: rgba(212, 175, 106, 0.45) !important;
  color: rgba(212, 175, 106, 0.65) !important;
}

.pill {
  background: rgba(212, 175, 106, 0.16) !important;
  color: #e6c687 !important;
  border: 1px solid rgba(212, 175, 106, 0.38) !important;
}

/* Cam Efektli Koyu Kartlar */
.card, .letter-card, .stat-box, .helper-box, .payment-summary-box {
  background: rgba(24, 19, 15, 0.92) !important;
  border: 1px solid rgba(212, 175, 106, 0.24) !important;
  color: #f3eadb;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45) !important;
}

.auth-card {
  background: rgba(18, 13, 10, 0.84) !important;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 175, 106, 0.35) !important;
}

.tabs {
  background: rgba(255, 255, 255, 0.06);
}

.tab {
  color: #b5a38d;
}

.tab.active {
  background: #d4af6a;
  color: #1a120b;
}

.field input, .field textarea, .field select {
  background: rgba(14, 10, 8, 0.85);
  border: 1px solid rgba(212, 175, 106, 0.28);
  color: #f7f0e4;
}

.field input::placeholder, .field textarea::placeholder {
  color: #8c7b67;
}

.btn-primary {
  background: linear-gradient(135deg, #c89f5d 0%, #a57b3b 100%) !important;
  color: #16100a !important;
  border: none;
  font-weight: 700;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #dab575 0%, #ba8e49 100%) !important;
}

.btn-outline {
  background: transparent;
  border-color: rgba(212, 175, 106, 0.35);
  color: #f3eadb;
}

.btn-outline:hover, .btn-outline.active {
  background: rgba(212, 175, 106, 0.16);
}

.category-card {
  background: linear-gradient(180deg, #1b1510 0%, #140f0b 100%) !important;
  border: 1px solid rgba(212, 175, 106, 0.22) !important;
  border-top: 3px solid #c89f5d !important;
  color: #f3eadb !important;
}

.category-card:hover {
  border-color: rgba(212, 175, 106, 0.55) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6) !important;
}

.cat-cta, .helper-title, .stat-val, .price-total, .pay-total-line, .link-btn {
  color: #e0bc79 !important;
}

.template-pill {
  background: rgba(212, 175, 106, 0.1);
  border-color: rgba(212, 175, 106, 0.3);
  color: #f3eadb;
}

.letter-dialog, .photo-lightbox {
  background: #17120e;
  color: #f3eadb;
  border-color: rgba(212, 175, 106, 0.35);
}

.envelope-box {
  background: #211a14;
  border-color: rgba(212, 175, 106, 0.3);
}

.faq-list details {
  background: #1d1712;
  border-color: rgba(212, 175, 106, 0.25);
}

.site-footer {
  background: #0a0806 !important;
  border-top: 1px solid rgba(212, 175, 106, 0.2) !important;
}

.footer-link-btn {
  color: #b5a38d;
}

.footer-link-btn:hover {
  color: #e0bc79;
}

/* === TAM SAYFA NOSTALJİK ARKA PLAN FOTOĞRAFI === */
body {
  background:
    linear-gradient(180deg, rgba(10, 7, 5, 0.56) 0%, rgba(12, 9, 6, 0.72) 100%),
    url('/bg-nostalgia.jpg') center/cover no-repeat fixed !important;
}

/* === DUMANLI BUHARLI TREN -> POSTACI -> TESLİMAT ANİMASYONU === */
.journey-banner {
  margin-top: 40px;
  padding: 28px 24px !important;
  overflow: hidden;
}

.journey-head {
  text-align: center;
  margin-bottom: 24px;
}

.journey-head h2 {
  margin: 6px 0 6px;
}

.journey-track {
  display: grid;
  grid-template-columns: auto 1.3fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 18px 8px 8px;
}

@media (max-width: 720px) {
  .journey-track {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }
}

.journey-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 78px;
}

.stop-icon {
  font-size: 1.7rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.journey-stop small {
  font-size: 0.75rem;
  color: #d8c3a0;
  font-weight: 600;
}

.journey-rails, .journey-walk {
  position: relative;
  height: 56px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.rail-line {
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #c89f5d 0px,
    #c89f5d 12px,
    transparent 12px,
    transparent 18px
  );
  border-bottom: 1px solid rgba(212, 175, 106, 0.45);
  margin-bottom: 6px;
}

.walk-line {
  width: 100%;
  height: 2px;
  border-bottom: 2px dashed rgba(212, 175, 106, 0.5);
  margin-bottom: 8px;
}

.steam-train {
  position: absolute;
  bottom: 10px;
  left: -60px;
  font-size: 1.65rem;
  display: inline-flex;
  align-items: center;
  animation: trainJourney 6.5s linear infinite;
}

.train-body {
  display: inline-block;
  transform: scaleX(-1);
}

.smoke {
  position: absolute;
  top: -12px;
  left: 6px;
  font-size: 0.9rem;
  opacity: 0;
  filter: grayscale(0.4) brightness(0.9);
}

.smoke.s1 { animation: smokePuff 1.6s ease-out infinite; }
.smoke.s2 { animation: smokePuff 1.6s ease-out 0.5s infinite; }
.smoke.s3 { animation: smokePuff 1.6s ease-out 1.0s infinite; }

.postman-runner {
  position: absolute;
  bottom: 10px;
  left: -30px;
  font-size: 1.5rem;
  animation: postmanDeliver 6.5s ease-in-out infinite;
}

@keyframes trainJourney {
  0% { left: -65px; opacity: 0; }
  8% { opacity: 1; }
  58% { left: calc(100% - 30px); opacity: 1; }
  66% { left: calc(100% + 10px); opacity: 0; }
  100% { left: calc(100% + 10px); opacity: 0; }
}

@keyframes postmanDeliver {
  0%, 56% { left: -30px; opacity: 0; }
  62% { left: 4px; opacity: 1; }
  94% { left: calc(100% - 26px); opacity: 1; }
  100% { left: calc(100% + 10px); opacity: 0; }
}

@keyframes smokePuff {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0.85; }
  100% { transform: translate(-22px, -24px) scale(1.45); opacity: 0; }
}

/* Gönderim penceresindeki mini tren rayı */
.mini-train-track {
  position: relative;
  height: 44px;
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.mini-steam-train {
  position: absolute;
  bottom: 8px;
  left: -50px;
  font-size: 1.4rem;
  animation: miniTrainGo 2.6s ease-in-out infinite;
}

@keyframes miniTrainGo {
  0% { left: -50px; opacity: 0; }
  15% { opacity: 1; }
  85% { left: calc(100% - 20px); opacity: 1; }
  100% { left: calc(100% + 20px); opacity: 0; }
}

/* --- El Yazısı İmza Alanı --- */
.signature-canvas {
  width: 100%;
  max-width: 420px;
  height: 120px;
  background: #fffdf8;
  border: 1px dashed #b99763;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
}

.signature-preview {
  display: block;
  margin-left: auto;
  margin-top: 18px;
  max-width: 180px;
  max-height: 64px;
  object-fit: contain;
}

/* --- Neden MektupPost? 6'lı Özellik Vitrini --- */
.features-showcase {
  margin-top: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 820px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-item {
  text-align: center;
  padding: 24px 20px;
  border-radius: 14px;
  background: rgba(20, 15, 11, 0.72);
  border: 1px solid rgba(212, 175, 106, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 106, 0.55);
}

.feat-icon {
  display: inline-block;
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.feature-item h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  color: #e6c687;
}

.feature-item p {
  margin: 0;
  font-size: 0.88rem;
}

/* === HERO SOL: TİTREYEN YANAN MUM & SAĞ: KENARI TUTUŞUP KÜL UÇURAN KAĞIT === */
.hero-candle {
  position: absolute;
  left: 16px;
  bottom: 14px;
  width: 44px;
  height: 92px;
  pointer-events: none;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0.92;
}

.candle-halo {
  position: absolute;
  top: -12px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 85, 0.45) 0%, rgba(255, 120, 30, 0.14) 48%, transparent 72%);
  animation: candleHalo 2.4s ease-in-out infinite alternate;
}

.candle-flame {
  position: relative;
  width: 14px;
  height: 28px;
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  background: radial-gradient(circle at 50% 70%, #fff7d6 0%, #ffb732 45%, #e85d04 85%, transparent 100%);
  box-shadow: 0 0 18px rgba(255, 166, 43, 0.85);
  transform-origin: bottom center;
  animation: flameFlicker 1.3s ease-in-out infinite alternate;
}

.flame-inner {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 12px;
  border-radius: 50%;
  background: #fffdf5;
}

.candle-wick {
  width: 2px;
  height: 6px;
  background: #2b1b0e;
}

.candle-body {
  position: relative;
  width: 24px;
  height: 46px;
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, #cbb38a 0%, #f5e6c8 45%, #b89b6e 100%);
  box-shadow: inset 0 4px 8px rgba(255, 210, 120, 0.4), 0 4px 10px rgba(0, 0, 0, 0.6);
}

.candle-drip {
  position: absolute;
  top: 0;
  right: 4px;
  width: 5px;
  height: 14px;
  border-radius: 0 0 4px 4px;
  background: #f5e6c8;
}

@keyframes flameFlicker {
  0% { transform: scale(0.95, 1.03) rotate(-3deg); }
  35% { transform: scale(1.04, 0.96) rotate(2deg); }
  70% { transform: scale(0.97, 1.06) rotate(-1.5deg); }
  100% { transform: scale(1.03, 0.98) rotate(3deg); }
}

@keyframes candleHalo {
  0% { transform: scale(0.9); opacity: 0.72; }
  100% { transform: scale(1.14); opacity: 1; }
}

/* Sağ: Kenarı Tutuşup Korlanan & Kül Uçuran Kağıt */
.hero-burning-paper {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 72px;
  height: 82px;
  pointer-events: none;
  z-index: 3;
}

.burn-sheet {
  position: absolute;
  bottom: 0;
  right: 4px;
  width: 58px;
  height: 68px;
  border-radius: 4px 12px 4px 4px;
  background: linear-gradient(145deg, #f3e2be 0%, #dfc28d 65%, #3b1d0a 96%);
  border: 1px solid #8a5624;
  padding: 12px 8px;
  display: grid;
  gap: 7px;
  align-content: start;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
  transform: rotate(5deg);
}

.burn-line {
  height: 3px;
  border-radius: 2px;
  background: rgba(92, 52, 20, 0.45);
}

.burn-line.short {
  width: 60%;
}

.burn-ember-edge {
  position: absolute;
  bottom: -4px;
  left: -4px;
  right: -4px;
  height: 16px;
  background: radial-gradient(ellipse at center, #ff7b00 0%, #d00000 45%, #1a0b04 85%);
  filter: blur(1.5px);
  animation: emberBurn 2.2s ease-in-out infinite alternate;
}

.ash-spark {
  position: absolute;
  bottom: 14px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff9e00;
  box-shadow: 0 0 6px #ff6d00;
  opacity: 0;
}

.ash-spark.a1 { right: 14px; animation: ashFloat 2.8s ease-out infinite; }
.ash-spark.a2 { right: 32px; background: #9ca3af; box-shadow: none; animation: ashFloat 3.3s ease-out 0.8s infinite; }
.ash-spark.a3 { right: 46px; animation: ashFloat 2.5s ease-out 1.4s infinite; }
.ash-spark.a4 { right: 22px; background: #6b7280; box-shadow: none; animation: ashFloat 3.6s ease-out 2.0s infinite; }

@keyframes emberBurn {
  0% { opacity: 0.65; transform: scaleY(0.85); }
  100% { opacity: 1; transform: scaleY(1.25); }
}

@keyframes ashFloat {
  0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
  60% { transform: translate(-12px, -38px) scale(0.75); opacity: 0.7; }
  100% { transform: translate(8px, -74px) scale(0.3); opacity: 0; }
}

@media (max-width: 960px) {
  .hero-candle, .hero-burning-paper {
    display: none;
  }
}

/* === SAYFANIN SOL VE SAĞ BOŞLUKLARINDA BÜYÜK GERÇEKÇİ MUM & YANAN KAĞIT === */
.side-decor {
  position: fixed;
  top: 52%;
  transform: translateY(-50%);
  width: clamp(160px, 16vw, 270px);
  height: 78vh;
  background: url('/side-candle.jpg') center/cover no-repeat;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: lighten;
  opacity: 0.78;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 42%, transparent 82%);
  mask-image: radial-gradient(ellipse at center, #000 42%, transparent 82%);
  animation: realCandleGlow 3.6s ease-in-out infinite alternate;
}

.side-decor-left {
  left: 6px;
}

.side-decor-right {
  right: 6px;
  transform: translateY(-50%) scaleX(-1);
}

@keyframes realCandleGlow {
  0% { filter: brightness(0.92) saturate(0.96); opacity: 0.72; }
  50% { filter: brightness(1.06) saturate(1.08); opacity: 0.86; }
  100% { filter: brightness(0.97) saturate(1.02); opacity: 0.78; }
}

.main-content, .topbar, .site-footer {
  position: relative;
  z-index: 2;
}

@media (max-width: 1320px) {
  .side-decor {
    display: none;
  }
}


/* --- Satır / Karakter Taşması Koruması --- */
.preview-body, .letter-body-text, .env-small-line, .env-to-name, .env-to-city, .preview-subject {
  overflow-wrap: anywhere;
  word-break: break-word;
}
