/* ============================================================
   LUMAVE — Kamera-Webapp (mobile only)
   Dark Editorial · near-black · white · lime (#DFFF5C)
   Matches the Lumave one-pager: Host Grotesk + Newsreader italic
   accents, film grain, pill buttons, filmic "graded" look.
   ============================================================ */

/* ---------- Brand fonts (self-hosted, shared with the site) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/Newsreader-Italic.ttf") format("truetype");
  font-weight: 200 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("../assets/fonts/HostGrotesk.ttf") format("truetype");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens (from the Lumave site) ---------- */
:root {
  --bg:        #040404;
  --bg-2:      #0A0A0A;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);

  --text:      #FFFFFF;
  --text-soft: rgba(255, 255, 255, 0.66);
  --text-mute: rgba(255, 255, 255, 0.52);

  --line:      rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);

  --accent:      #DFFF5C;
  --accent-ink:  #040404;
  --accent-dim:  rgba(223, 255, 92, 0.14);
  --accent-glow: rgba(223, 255, 92, 0.28);
  --danger:      #ff8f6b;

  --font-sans:  "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
img, picture, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; -webkit-appearance: none; }
input { font: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Fine film grain over everything (matches the site) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- App shell (phone column, centered on desktop) ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin-inline: auto;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 120px rgba(0,0,0,0.6);
}
@media (min-width: 481px) {
  body { background: #000; }
  .app { border-inline: 1px solid var(--line-soft); }
}

/* ---------- View system ---------- */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), visibility 0.5s;
}
.view.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.02s;
}

/* ---------- Shared typography ---------- */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { display: none; }

.accent-serif {
  font-family: var(--font-serif);
  font-weight: 200;
  font-style: italic;
  color: var(--accent);
  font-size: 1.08em;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 1.05em 1.8em;
  min-height: 52px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.5s var(--ease-out),
              background-color 0.4s var(--ease-out), opacity 0.3s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:active { box-shadow: 0 0 0 1px var(--accent), 0 10px 30px -8px var(--accent-glow); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
/* Ausgegrauter Primär-Button (Zutritt gesperrt bis Name + Einwilligung) */
.btn--primary[disabled] {
  opacity: 1;
  background: var(--surface-2);
  color: var(--text-mute);
  box-shadow: none;
}
.btn__icon { transition: transform 0.4s var(--ease-out); }

/* ============================================================
   JOIN VIEW
   ============================================================ */
.join {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: calc(var(--safe-t) + 2rem) 1.6rem calc(var(--safe-b) + 2rem);
  text-align: center;
  overflow-y: auto;
}
.join__logo {
  width: 148px;
  height: auto;
  margin: 0 auto 0.4rem;
  animation: fadeUp 0.9s var(--ease-out) 0.1s both;
}
.join .eyebrow { animation: fadeUp 0.9s var(--ease-out) 0.18s both; }
.join__title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2rem, 8.5vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  animation: fadeUp 0.9s var(--ease-out) 0.26s both;
}
.join__title .accent-serif { display: inline-block; }
.join__sub {
  color: var(--text-soft);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 34ch;
  margin-inline: auto;
  animation: fadeUp 0.9s var(--ease-out) 0.34s both;
}
.join__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.4rem;
  text-align: left;
  animation: fadeUp 0.9s var(--ease-out) 0.42s both;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding-left: 0.2rem;
}
.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 400;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.field input::placeholder { color: var(--text-mute); }
.field input:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__error {
  min-height: 1.1em;
  font-size: 0.82rem;
  color: var(--danger);
  padding-left: 0.2rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.field__error.is-visible { opacity: 1; }

.join__micro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-size: 0.8rem;
  color: var(--text-mute);
  animation: fadeUp 0.9s var(--ease-out) 0.5s both;
}
.join__micro svg { color: var(--accent); flex: none; }

/* Zustimmung Datenschutz & AGB */
.consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.1rem;
  padding: 0.5rem 0.2rem;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.consent__box {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.consent__mark {
  flex: none;
  width: 26px; height: 26px;
  margin-top: 1px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
              transform 0.15s var(--ease-out);
}
.consent__mark svg {
  width: 16px; height: 16px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.consent__box:checked ~ .consent__mark { background: var(--accent); border-color: var(--accent); }
.consent__box:checked ~ .consent__mark svg { opacity: 1; transform: scale(1); }
.consent__box:focus-visible ~ .consent__mark { outline: 2px solid var(--accent); outline-offset: 3px; }
.consent:active .consent__mark { transform: scale(0.92); }
.consent__text {
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 300;
  color: var(--text-soft);
}
.consent__text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   CAMERA VIEW
   ============================================================ */
.view--camera { background: #000; }

.cam-top {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-t) + 0.9rem) 1.2rem 0.9rem;
  background: linear-gradient(180deg, rgba(4,4,4,0.85) 0%, rgba(4,4,4,0) 100%);
}
.cam-top__logo { width: 104px; height: auto; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.04);
  transition: transform 0.2s var(--ease-out), border-color 0.3s, color 0.3s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 22px; height: 22px; }

/* Viewfinder */
.viewfinder {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #050505;
}
.viewfinder video,
.viewfinder .vf-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.viewfinder video { transform: scaleX(1); }
.viewfinder video.is-mirrored { transform: scaleX(-1); }
.vf-fallback { display: none; }
.viewfinder.is-fallback .vf-fallback { display: block; }
.viewfinder.is-fallback video { display: none; }

/* Framing brackets — analog viewfinder feel */
.vf-frame {
  position: absolute;
  inset: 7% 6%;
  z-index: 5;
  pointer-events: none;
}
.vf-frame span {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(223,255,92,0.7);
}
.vf-frame span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.vf-frame span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.vf-frame span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.vf-frame span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.vf-center {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}
.vf-center::before, .vf-center::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.4);
}
.vf-center::before { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.vf-center::after { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }

/* subtle vignette + grain inside the finder */
.vf-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 45%, transparent 55%, rgba(0,0,0,0.45) 100%);
}
.vf-recdot {
  position: absolute;
  top: 4%; left: 7%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  pointer-events: none;
}
.vf-recdot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: recPulse 2s var(--ease-in-out) infinite;
}
@keyframes recPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* White capture flash — App-Ebene, damit der GANZE Bildschirm leuchtet
   (Frontblitz-Wirkung). Über Korn (60) und Lightbox (70), unter Toast (80). */
.flash-overlay {
  position: absolute;
  inset: 0;
  z-index: 75;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.flash-overlay.is-firing { animation: flashFire 0.42s var(--ease-out); }
@keyframes flashFire {
  0% { opacity: 0; }
  8% { opacity: 0.95; }
  100% { opacity: 0; }
}
/* Frontblitz: Display hell HALTEN, bis die Aufnahme im Kasten ist … */
.flash-overlay.is-hold { opacity: 0.98; }
/* … und danach weich ausblenden. */
.flash-overlay.is-fade { animation: flashFade 0.35s var(--ease-out); }
@keyframes flashFade { from { opacity: 0.98; } to { opacity: 0; } }
/* Mechanical shutter blink */
.shutter-blink {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
.shutter-blink.is-firing { animation: blink 0.18s steps(2, end); }
@keyframes blink { 0%,100% { opacity: 0; } 50% { opacity: 1; } }

/* Camera status / permission card */
.vf-status {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  background: rgba(4,4,4,0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.vf-status.is-visible { display: flex; }
.vf-status__icon { width: 48px; height: 48px; color: var(--accent); }
.vf-status__icon svg { width: 100%; height: 100%; }
.vf-status h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.vf-status p { color: var(--text-soft); font-weight: 300; font-size: 0.95rem; max-width: 30ch; }
.spinner {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Bottom control deck */
.cam-bottom {
  position: relative;
  z-index: 20;
  padding: 1rem 1.4rem calc(var(--safe-b) + 1.1rem);
  background: linear-gradient(0deg, rgba(4,4,4,0.94) 0%, rgba(4,4,4,0.75) 60%, rgba(4,4,4,0) 100%);
}

/* Film counter — the "Übersichtszahl" */
.counter {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5em;
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}
.counter__num {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.counter__num.is-low { color: var(--accent); }
.counter__slash { color: var(--text-mute); font-weight: 600; font-size: 1rem; }
.counter__total { color: var(--text-mute); font-weight: 600; font-size: 1rem; }
.counter__label {
  margin-left: 0.4em;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  align-self: center;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
}

/* Flash toggle (left) */
.ctrl {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  min-width: 56px;
  padding: 0.4rem;
}
.ctrl__ico {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  transition: transform 0.2s var(--ease-out), border-color 0.3s, color 0.3s, background-color 0.3s;
}
.ctrl:active .ctrl__ico { transform: scale(0.92); }
.ctrl__ico svg { width: 22px; height: 22px; }
.ctrl__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.ctrl.is-active .ctrl__ico { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.ctrl.is-active .ctrl__label { color: var(--accent); }

/* Gallery button with thumbnail + badge (right) */
.ctrl--gallery { position: relative; }
.thumb {
  width: 48px; height: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; filter: blur(6px) saturate(0.9) sepia(0.2); }
.thumb.is-empty::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(255,230,176,0.25) 0%, transparent 55%),
    linear-gradient(160deg, #2a211a 0%, #140f0c 100%);
}
.badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}
.badge:empty, .badge.is-hidden { display: none; }

/* Shutter (center) */
.shutter {
  width: 78px; height: 78px;
  border-radius: 50%;
  padding: 5px;
  background: transparent;
  border: 3px solid rgba(255,255,255,0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s var(--ease-out);
}
.shutter__core {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--text);
  transition: background-color 0.2s var(--ease-out), transform 0.12s var(--ease-out);
}
.shutter:active { transform: scale(0.95); }
.shutter:active .shutter__core { background: var(--accent); transform: scale(0.9); }
.shutter[disabled] { opacity: 0.4; pointer-events: none; }
.shutter[disabled] .shutter__core { background: var(--text-mute); }
.shutter:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ============================================================
   GALLERY / DEVELOPMENT VIEW
   ============================================================ */
.view--gallery { background: var(--bg); }
.g-top {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.6rem;
  padding: calc(var(--safe-t) + 0.9rem) 1.1rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}
.g-top__title {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.g-top__title strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.g-top__title span {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.develop-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.1rem 1.1rem calc(var(--safe-b) + 1.6rem);
}
.develop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Developing film cell */
.dev-cell {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0b09;
  border: 1px solid var(--line-soft);
  animation: cellIn 0.6s var(--ease-out) both;
}
@keyframes cellIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.dev-cell img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(26px) saturate(0.8) brightness(0.85);
  transform: scale(1.15);
  transition: filter 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}
.dev-cell::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 120% at 50% 40%, rgba(0,0,0,0) 45%, rgba(10,6,3,0.7) 100%),
    linear-gradient(160deg, rgba(200,150,90,0.18) 0%, rgba(200,150,90,0) 60%);
  pointer-events: none;
}
.dev-cell__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 0.8rem;
}
.dev-cell__ico { width: 22px; height: 22px; color: var(--accent); opacity: 0.9; }
.dev-cell__ico svg { width: 100%; height: 100%; }
.dev-cell__time {
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.dev-cell__state {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.dev-cell__meta {
  position: absolute;
  z-index: 2;
  left: 10px; bottom: 8px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
}

/* Google-Drive-Upload-Status */
.dev-cell__up {
  position: absolute;
  z-index: 3;
  left: 8px; top: 8px;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(4,4,4,0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--text-mute);
}
.dev-cell__up svg { width: 15px; height: 15px; }
.dev-cell__up[data-status="up"] { color: var(--text); animation: upPulse 1.2s var(--ease-in-out) infinite; }
.dev-cell__up[data-status="done"] { color: var(--accent-ink); background: var(--accent); }
@keyframes upPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
/* progress ring bottom */
.dev-cell__bar {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.12);
}
.dev-cell__bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transition: width 1s linear;
}

/* Revealed state */
.dev-cell.is-ready { cursor: pointer; }
.dev-cell.is-ready img {
  /* Kein CSS-Grading mehr: das Bild ist bereits die LUT-entwickelte Version. */
  filter: none;
  transform: scale(1);
}
.dev-cell.is-ready .dev-cell__overlay { opacity: 0; pointer-events: none; transition: opacity 0.6s; }
.dev-cell.is-ready .dev-cell__bar { display: none; }
.dev-cell.is-ready .dev-cell__ready {
  position: absolute;
  z-index: 3;
  right: 8px; top: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.5s var(--ease-out) both;
}
.dev-cell__ready { display: none; }
.dev-cell.is-ready .dev-cell__ready { display: flex; }
.dev-cell__ready svg { width: 14px; height: 14px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Empty state */
.g-empty {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.g-empty.is-visible { display: flex; }
.g-empty__ico { width: 46px; height: 46px; color: var(--text-mute); }
.g-empty h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.g-empty p { color: var(--text-soft); font-weight: 300; max-width: 28ch; }

/* Info strip about the 48h rule */
.g-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  margin-bottom: 1.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--accent-dim);
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.g-note svg { flex: none; color: var(--accent); margin-top: 1px; }

/* ---------- Lightbox (revealed photo) ---------- */
.lightbox {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 1rem) 1rem calc(var(--safe-b) + 1rem);
  background: rgba(2,2,2,0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lightbox.is-open { display: flex; animation: fadeIn 0.3s var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  /* Kein CSS-Grading: die Lightbox zeigt die LUT-entwickelte Version. */
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox__close {
  position: absolute;
  top: calc(var(--safe-t) + 0.8rem);
  right: 1rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.lightbox__close svg { width: 22px; height: 22px; }

/* ---------- Blitz-Hinweis-Dialog ---------- */
.flash-warn {
  position: absolute;
  inset: 0;
  z-index: 76;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.flash-warn.is-open { display: flex; }
.flash-warn__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,2,2,0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s var(--ease-out);
}
.flash-warn__panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.8rem 1.4rem 1.4rem;
  text-align: center;
  animation: warnIn 0.3s var(--ease-out);
}
@keyframes warnIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.flash-warn__ico {
  width: 52px; height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.flash-warn__ico svg { width: 24px; height: 24px; }
.flash-warn__panel h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.flash-warn__panel p {
  color: var(--text-soft);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.4rem;
}
.flash-warn__panel .btn + .btn { margin-top: 0.6rem; }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-b) + 8.5rem);
  z-index: 80;
  transform: translate(-50%, 12px);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: rgba(20,20,20,0.94);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0.3s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast--accent { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* shake for full-film feedback */
.shake { animation: shake 0.4s var(--ease-in-out); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .dev-cell img { transition: none !important; }
}
