:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #2e2a26;
  --muted: #8a8078;
  --accent: #c9a961;
  --line: #e6dfd5;
  --danger: #a3564a;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 2px;
  --shadow: 0 10px 40px rgba(46, 42, 38, 0.07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- tipografi ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.lede { font-size: 1.05rem; color: #57504a; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

.rule {
  width: 56px;
  height: 1px;
  background: var(--accent);
  border: 0;
  margin: 22px auto;
}
.rule-left { margin-left: 0; }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--accent);
  margin: 26px 0;
}
.ornament::before, .ornament::after {
  content: "";
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent));
  flex: 1;
  max-width: 110px;
}
.ornament::after { background: linear-gradient(to left, transparent, var(--accent)); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero-photo {
  width: min(320px, 72vw);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin: 0 auto 34px;
  border-radius: 200px 200px var(--radius) var(--radius);
  box-shadow: var(--shadow);
  background: #efe9e0;
}
.hero-photo.round { border-radius: 50%; aspect-ratio: 1; width: min(240px, 60vw); }
.amp { font-family: var(--serif); font-style: italic; color: var(--accent); }

/* ---------- kart ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 18px 0;
}
.card-accent { border-top: 2px solid var(--accent); }

.event-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .event-grid { grid-template-columns: 1fr 1fr; } }

.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 14px; margin: 16px 0 0; font-size: 0.94rem; }
.kv dt { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 16px 30px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
  min-height: 52px;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { width: 100%; padding: 22px 30px; font-size: 0.92rem; min-height: 66px; }
.btn-sm { padding: 9px 14px; font-size: 0.7rem; min-height: 0; letter-spacing: 0.1em; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.is-busy { opacity: 0.45; pointer-events: none; }

/* Dosya girişi gizli ama render edilmiş kalmalı: display:none olursa
   iOS Safari'de <label> ile açılan seçicide çoklu seçim bozuluyor. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- kaydırma ipucu ---------- */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 26px auto 0;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.4s ease;
}
.scroll-cue .label {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  animation: cue-blink 1.6s ease-in-out infinite;
}
.scroll-cue .arrow {
  font-size: 1.5rem;
  line-height: 1;
  animation: cue-bounce 1.6s ease-in-out infinite;
}
.scroll-cue.gone { opacity: 0; pointer-events: none; }

@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(9px); opacity: 1; }
}
@keyframes cue-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue .arrow, .scroll-cue .label { animation: none; opacity: 0.9; }
}

/* ---------- form ---------- */
.field { margin: 18px 0; }
label { display: block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
input:focus { outline: none; border-color: var(--accent); }

/* ---------- yükleme kuyruğu ---------- */
.queue { margin: 22px 0; display: grid; gap: 10px; }
.qitem {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.qthumb { width: 56px; height: 56px; object-fit: cover; background: #efe9e0; border-radius: var(--radius); }
.qname { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qstatus { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; }
.qstatus.err { color: var(--danger); }
.qstatus.done { color: #4a7a52; }
.bar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s ease; }

.notice {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  padding: 14px 16px;
  font-size: 0.9rem;
  margin: 18px 0;
}
.notice.err { border-left-color: var(--danger); }

/* ---------- galeri ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 24px 0;
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; } }
.tile {
  position: relative;
  aspect-ratio: 1;
  background: #efe9e0;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.6rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.tile .who {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 8px 6px;
  font-size: 0.68rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  text-align: left;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- lightbox ---------- */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.lb.open { display: flex; }
.lb img, .lb video { max-width: 100%; max-height: 82vh; object-fit: contain; }
.lb-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.lb-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- duvar ---------- */
body.wall { background: #14120f; color: #f6f1e8; overflow: hidden; }
.wall-stage { position: fixed; inset: 0; }
.wall-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  display: grid;
  place-items: center;
}
.wall-slide.on { opacity: 1; }
.wall-slide img { width: 100%; height: 100%; object-fit: contain; }
.wall-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(42px) brightness(0.35);
  transform: scale(1.15);
  z-index: -1;
}
.wall-caption {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 28px 40px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.wall-names { font-family: var(--serif); font-size: 2rem; }
.wall-who { font-size: 1rem; letter-spacing: 0.1em; color: #e3d5b7; }
.wall-empty { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 40px; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
}
.tab.on { border-color: var(--accent); color: var(--accent); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); padding: 14px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 400; }
.stat span { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.tile.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile .flag {
  position: absolute;
  top: 6px; left: 6px;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 3px 6px;
  border-radius: 2px;
}
.tile .flag.ok { background: var(--accent); color: #fff; }

.sticky-actions {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 12px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  z-index: 5;
}

footer { padding: 60px 0 40px; text-align: center; color: var(--muted); font-size: 0.78rem; }

/* ---------- mobil: açılış ekranı sıkıştırılır ---------- */
@media (max-width: 640px) {
  .wrap, .wrap-wide { padding: 0 18px; }
  .hero { padding: 26px 0 16px; }
  .hero-photo { width: min(190px, 46vw); margin-bottom: 20px; }
  .hero-photo.round { width: min(150px, 38vw); }
  h1 { font-size: clamp(2.1rem, 8.5vw, 3rem); }
  .ornament { margin: 16px 0; }
  .lede { font-size: 1rem; }
  .card { padding: 22px 18px; }
  footer { padding: 40px 0 30px; }
}

.hidden { display: none !important; }
