/* Hochzeits-Foto-App – Theme „Nina & Simon 2026"
   Mobil-first, ruhig, elegant, gut lesbar (auch für ältere Gäste). */

:root {
  --cream: #fbf6ef;
  --cream-2: #f3eadd;
  --paper: #fffdf9;
  --ink: #38312c;
  --ink-soft: #6f655c;
  --blush: #c98b86;
  --blush-dark: #b06b66;
  --gold: #b08d57;
  --line: #e7ddcf;
  --ok: #4c7c5a;
  --err: #b04a40;
  --shadow: 0 10px 30px rgba(80, 60, 40, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", "Iowan Old Style", serif;
  font-weight: 600;
  letter-spacing: 0.3px;
}

button { font-family: inherit; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Dekorative Kopfzeile --- */
.crest {
  text-align: center;
  padding: 26px 16px 10px;
}
.crest .eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 13px;
  color: var(--gold);
}
.crest .names {
  font-size: clamp(34px, 9vw, 56px);
  margin: 6px 0 2px;
  color: var(--ink);
}
.crest .date {
  color: var(--ink-soft);
  font-style: italic;
}
.divider {
  width: 64px;
  height: 1px;
  background: var(--gold);
  margin: 14px auto;
  position: relative;
}
.divider::after {
  content: "♥";
  color: var(--blush);
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cream);
  padding: 0 8px;
  font-size: 14px;
}

/* --- Karten / Gate --- */
.center-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px 48px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  width: 100%;
  max-width: 420px;
}
.card p.lead {
  color: var(--ink-soft);
  margin-top: 0;
  text-align: center;
}

label {
  display: block;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 14px 0 6px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 16px 14px;
  font-size: 19px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input:focus {
  outline: none;
  border-color: var(--blush);
  box-shadow: 0 0 0 3px rgba(201, 139, 134, 0.18);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 20px;
  font-size: 19px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  min-height: 56px;
}
.btn-primary {
  background: var(--blush);
  color: #fff;
  box-shadow: 0 6px 16px rgba(176, 107, 102, 0.35);
}
.btn-primary:hover { background: var(--blush-dark); }
.btn-primary:disabled { background: #d9c4c2; box-shadow: none; cursor: default; }
.btn-ghost {
  background: transparent;
  color: var(--blush-dark);
  border: 1.5px solid var(--blush);
}
.btn-ghost:hover { background: rgba(201, 139, 134, 0.08); }
.btn-sm { width: auto; padding: 11px 18px; font-size: 16px; min-height: 44px; }

.msg { margin-top: 14px; text-align: center; font-size: 16px; min-height: 22px; }
.msg.error { color: var(--err); }
.msg.ok { color: var(--ok); }

/* --- App-Kopf --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(251, 246, 239, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.app-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.app-header .title { font-size: 22px; }
.app-header .title small { display: block; font-size: 12px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }

/* --- Aktionsbereich --- */
.hero {
  text-align: center;
  padding: 20px 0 8px;
}
.hero h2 { font-size: clamp(24px, 6vw, 32px); margin: 4px 0; }
.hero p { color: var(--ink-soft); margin: 6px auto 18px; max-width: 540px; }

.upload-cta { max-width: 420px; margin: 0 auto; }
.hint { color: var(--ink-soft); font-size: 14px; text-align: center; margin-top: 10px; }
.closed-note {
  background: #fdf3e7;
  border: 1px solid #ecd9bd;
  color: #8a6d3b;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
}

/* --- Upload-Panel --- */
.upload-panel {
  max-width: 480px;
  margin: 18px auto 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.upload-panel .row { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-soft); }
.upload-panel .eta { font-size: 19px; color: var(--ink); font-weight: 600; text-align: center; margin: 6px 0 12px; }
.progress {
  height: 14px;
  background: #efe6da;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blush), var(--gold));
  transition: width 0.25s ease;
}
.upload-files { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14px; max-height: 160px; overflow: auto; }
.upload-files li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.upload-files li .state { color: var(--ink-soft); white-space: nowrap; }
.upload-files li.done .state { color: var(--ok); }
.upload-files li.fail .state { color: var(--err); }

/* --- Galerie --- */
.gallery-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.gallery-head h3 { margin: 0; font-size: 20px; }
.count-pill { font-size: 14px; color: var(--ink-soft); }

/* --- Album-Leiste (Filter-Chips) --- */
.album-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.album-bar:empty { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
}
.chip .n { color: var(--ink-soft); font-size: 13px; margin-left: 4px; }
.chip.active {
  background: var(--blush);
  border-color: var(--blush);
  color: #fff;
}
.chip.active .n { color: rgba(255, 255, 255, 0.85); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding-bottom: 60px;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (min-width: 860px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }

.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #ece3d6;
  cursor: pointer;
  border: none;
  padding: 0;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tile .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 34px;
  pointer-events: none;
}
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 50px 16px;
}
.empty .big { font-size: 40px; }

/* --- Admin: Alben-Verwaltung --- */
.albums-admin {
  max-width: 720px;
  margin: 10px auto 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.albums-admin h3 { margin: 0 0 4px; }
.album-create { display: flex; gap: 8px; margin: 12px 0 6px; }
.album-create input { flex: 1; padding: 12px 12px; font-size: 16px; }
.album-create .btn { white-space: nowrap; }
.album-list { list-style: none; padding: 0; margin: 8px 0 0; }
.album-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.album-list .a-name { flex: 1; font-weight: 600; }
.album-list .a-count { color: var(--ink-soft); font-size: 14px; }
.album-list .a-actions { display: flex; gap: 6px; }
.icon-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.icon-btn.danger { color: var(--err); border-color: #e6c4c0; }

/* Album-Auswahl auf jeder Kachel im Admin */
.tile .album-select {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  max-width: calc(100% - 12px);
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

/* --- Viewer --- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(28, 22, 18, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer img, .viewer video {
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: contain;
}
.viewer .nav, .viewer .close {
  position: absolute;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  font-size: 26px;
  cursor: pointer;
}
.viewer .close { top: 16px; right: 16px; }
.viewer .nav.prev { left: 12px; top: 50%; transform: translateY(-50%); }
.viewer .nav.next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 540px) { .viewer .nav { width: 44px; height: 44px; bottom: 18px; top: auto; transform: none; } .viewer .nav.prev { left: 18px; } .viewer .nav.next { right: 18px; } }

/* --- Fußzeile --- */
.foot {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 26px 16px 36px;
}
.foot a { color: var(--gold); }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
