@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #FEFCF9;
  --bg-soft: #F7EEE6;
  --card: #FFFFFF;
  --text: #2B2320;
  --text-soft: #6B5F58;
  --gold: #C9A86A;
  --gold-dark: #A98849;
  --rose: #E4B7A0;
  --rose-dark: #C48674;
  --border: rgba(201, 168, 106, 0.35);
  --shadow: 0 6px 24px rgba(120, 90, 60, 0.08);
  --shadow-lg: 0 16px 44px rgba(120, 90, 60, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --font-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(228, 183, 160, 0.18), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(201, 168, 106, 0.12), transparent 45%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 96px;
}

.header {
  text-align: center;
  padding: 32px 8px 20px;
}

.header .eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold-dark);
  margin-bottom: 10px;
}

.header h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 9vw, 56px);
  line-height: 1.05;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.005em;
}

.header h1 .amp {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
  margin: 0 4px;
}

.header p.sub {
  margin: 14px auto 0;
  color: var(--text-soft);
  max-width: 32ch;
  font-size: 15px;
}

.divider {
  width: 64px;
  height: 1px;
  margin: 22px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  margin-top: 20px;
}

.card h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 8px;
}

.card p {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  min-height: 48px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  width: 100%;
}

.btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: transparent;
  color: var(--gold-dark);
  border-color: var(--border);
}
.btn.secondary:hover { background: var(--bg-soft); }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.danger {
  background: #B84C4C;
  border-color: #B84C4C;
  color: #fff;
}
.btn.danger:hover { background: #963c3c; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.btn-row .btn { width: auto; flex: 1 1 140px; }

.input, .textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.18);
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.dropzone {
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 30px 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(247, 238, 230, 0.6));
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dropzone.dragover {
  background: rgba(201, 168, 106, 0.15);
  border-color: var(--gold-dark);
}
.dropzone svg {
  width: 44px;
  height: 44px;
  color: var(--gold);
  margin-bottom: 10px;
}
.dropzone .primary-line {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 4px;
}
.dropzone .hint {
  font-size: 13px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.preview-grid .thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eee;
}
.preview-grid .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-grid .thumb .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.progress-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
}
.progress-item .status {
  width: 18px;
  text-align: center;
}
.progress-item.done .status { color: var(--gold-dark); }
.progress-item.fail .status { color: #B84C4C; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; }

.nav-links {
  text-align: center;
  margin-top: 22px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--gold-dark);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.nav-links a:hover { border-bottom-color: var(--gold-dark); }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 18px;
}
@media (min-width: 540px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(120,90,60,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-empty {
  text-align: center;
  color: var(--text-soft);
  padding: 60px 20px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 10, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}
.lightbox-controls .btn { width: auto; padding: 10px 18px; min-height: 40px; font-size: 14px; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

@media (max-width: 480px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 18px; }
  .lightbox-close { width: 40px; height: 40px; font-size: 18px; }
}

/* Slideshow */
body.slideshow {
  background: #000;
  color: #fff;
  overflow: hidden;
}
.slideshow-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}
.slideshow-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slideshow-slide.active { opacity: 1; }
.slideshow-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.slideshow-info {
  position: fixed;
  bottom: 20px;
  right: 24px;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.04em;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.slideshow-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-serif);
  font-size: 28px;
  text-align: center;
  padding: 32px;
}

/* Host panel */
.host-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.host-header h2 {
  margin: 0;
  font-family: var(--font-serif);
}
.host-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.host-stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  flex: 1 1 120px;
}
.host-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text);
  margin-top: 2px;
}

.host-photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.host-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.host-photo img { width: 100%; height: 100%; object-fit: cover; }
.host-photo .del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(184, 76, 76, 0.92);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.host-photo .meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
}

/* .card p setzt sonst --text-soft und gewinnt per Spezifitaet -> Fehler
   waere kaum sichtbar. Deshalb hier ebenfalls klassen-qualifiziert. */
.card .error-msg,
.error-msg {
  color: #B84C4C;
  font-size: 13px;
  font-weight: 500;
  margin: 10px 0 0;
}

@media (max-width: 480px) {
  .page { padding: 16px 16px 96px; }
  .card { padding: 18px 16px; }
  .header { padding: 20px 8px 12px; }
}
