/* Clip It — Frontend-Design (Marke: MIMA IT, Token aus Workflows/Design_System/brand/mima_it.json).
   Farben/Schriften ausschliesslich aus der Markenquelle; keine erfundenen Werte. */
:root {
  --brand: #0053A1;        /* blau_primaer */
  --brand-2: #3377B8;      /* blau_sekundaer */
  --bg: #F2F6FA;           /* flaeche_zebra */
  --text: #333333;         /* grau_dunkel_text */
  --muted: #666666;        /* grau_mittel_text */
  --line: #CCCCCC;         /* grau_hell_linie */
  --danger: #D32F2F;       /* warnrot */
  --ok: #0a7a2f;
  --radius: 3px;           /* container/buttons eckenradius */
  --tap: 48px;             /* Mindest-Tap (Handschuh/Stall) */
  --sp: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  margin: 0 auto;
  padding: 16px 16px 96px;
  max-width: 720px;
  line-height: 1.45;
}
h1 { color: var(--brand); font-size: 1.35rem; margin: 0 0 6px; }
h2 { color: var(--brand); font-size: 1.1rem; margin: 8px 0; }
.sub, .hint { color: var(--muted); font-size: .9rem; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  margin: 12px 0;
}
/* Kopfleiste mit Markenakzent */
.app-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 12px; border-bottom: 2px solid var(--brand); margin-bottom: 12px;
}
.app-header .dot { width: 14px; height: 14px; border-radius: 3px; background: var(--brand); }
.app-header .name { font-weight: 700; color: var(--brand); letter-spacing: .2px; }

label { display: block; margin: 12px 0 4px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 12px; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
input[type=checkbox] { width: auto; }
.btn, button {
  display: inline-block; min-height: var(--tap); padding: 12px 16px; font: inherit;
  border: 0; border-radius: var(--radius); background: var(--brand); color: #fff;
  cursor: pointer; text-align: center; text-decoration: none; margin: 4px 4px 0 0;
}
.btn-primary { background: var(--brand); color: #fff; width: 100%; }
.btn-secondary, button.sec, button.secondary { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; }
/* kleine Overlay-Knoepfe in der Galerie nicht in Marken-Buttons umwandeln */
.curate-btn, .del-btn { min-height: 0; padding: 2px 8px; font-size: 12px; margin: 0; }

.progress { height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }

.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; background: var(--bg); color: var(--muted); }
.status-open { background: #E8F1FA; color: var(--brand); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.gallery .item {
  position: relative; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-size: 26px;
}
.gallery .item.mine { border-color: var(--brand); }
.gallery .item.excluded { opacity: .4; }
.gallery .item .curate-btn { position: absolute; top: 4px; right: 4px; }
.gallery .item .del-btn { position: absolute; top: 4px; left: 4px; background: var(--danger); color: #fff; }

.status { margin-top: 12px; min-height: 1.4em; }
.ok, .status.ok { color: var(--ok); }
.err, .status.err { color: var(--danger); }

/* Editor-spezifisch */
.steps { display: flex; gap: 6px; margin: 4px 0 12px; }
.steps span { flex: 1; height: 6px; border-radius: var(--radius); background: #E5E5E5; }
.steps span.on { background: var(--brand); }
ul { list-style: none; padding: 0; }
li { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; flex-wrap: wrap; }
li.out { opacity: .45; }
.kind { font-size: .75rem; background: var(--bg); border-radius: var(--radius); padding: 3px 7px; }
.grow { flex: 1; min-width: 120px; word-break: break-all; font-size: .85rem; }
.ctl { min-width: 56px; min-height: var(--tap); padding: 8px 10px; }
video { width: 100%; border-radius: var(--radius); background: #000; margin-top: 10px; }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; z-index: 5;
}
.bar button { flex: 1; margin: 0; }

/* ── MDS-Tokens (MIA Design System, MIA_MVP/frontend :root) + Gast-Einstieg ──
   Ergänzt 20.09.2026 (T15): konsistente App-Schale für den ersten Screen. Keine erfundenen
   Farben — MDS/App-Schale: primär #0053A1, Erfolg #00823C (mima_it.json / MDS). */
:root {
  --primary-hover: #003d78;
  --primary-light: #e8f0fa;
  --success: #00823C;
  --border-col: #d8dee6;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-6: 24px; --sp-8: 32px;
  --tap-comfort: 54px; --radius-lg: 16px;
}
.k-page { min-height: 100dvh; display: flex; flex-direction: column; gap: var(--sp-6);
  max-width: 520px; margin: 0 auto; padding: var(--sp-6) var(--sp-6) calc(var(--sp-6) + env(safe-area-inset-bottom)); }
.k-mark { display: flex; align-items: center; gap: var(--sp-2); font-weight: 700; color: var(--brand); }
.k-mark .dot { width: 14px; height: 14px; border-radius: 3px; background: var(--brand); }
.k-hero { display: flex; flex-direction: column; gap: var(--sp-3); }
.k-eyebrow { margin: 0; font-size: 13px; color: #5b6673; letter-spacing: .04em; text-transform: uppercase; }
.k-hero h1 { margin: 0; font-size: 2rem; line-height: 1.15; color: var(--text); }
.k-sub { margin: 0; font-size: 1rem; line-height: 1.45; color: #4a545f; }
.k-actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: auto; }
.k-btn { width: 100%; min-height: var(--tap-comfort); border: 1px solid transparent; border-radius: var(--radius-lg);
  font: inherit; font-size: 1.05rem; display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  cursor: pointer; transition: background-color .18s, transform .12s, border-color .18s; }
.k-btn--primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(0,83,161,.22); }
.k-btn--primary:hover, .k-btn--primary:focus-visible { background: var(--primary-hover); }
.k-btn--primary:active { transform: scale(.98); }
.k-btn--ghost { min-height: var(--tap); background: #fff; color: var(--brand); border-color: var(--line); }
.k-btn--ghost:active { background: var(--primary-light); }
.k-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.k-btn--done { background: var(--success); color: #fff; }
.k-consent { margin: 0; font-size: 13px; line-height: 1.5; color: #5b6673; }
.k-link { background: none; border: 0; padding: var(--sp-2) 0; font: inherit; font-size: 13px;
  color: var(--brand); text-decoration: underline; cursor: pointer; }
/* Einwilligungs-/Upload-Sheet (Consent beim ersten Upload statt Text-Wand davor) */
.k-sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgba(0,0,0,.4); }
.k-sheet[hidden] { display: none; }
.k-sheet-card { background: #fff; width: 100%; max-width: 520px; margin: 0 auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--sp-6);
  max-height: 85dvh; overflow: auto; }
.k-sheet-card h2 { margin: 0 0 var(--sp-3); }
.k-sheet-card p { margin: 0 0 var(--sp-3); font-size: .95rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .k-btn { transition: none; } }

/* ── Liga-Pass: Bewegung, Feedback, Zustände (20.09.2026) ──
   Ziel: app-artiges Gefühl (Delight/Feedback) ohne schwere Animationen; Rücksicht auf
   prefers-reduced-motion. Keine neuen Farben — nur MDS-Tokens. */
.btn, .k-btn { transition: transform .12s ease, background-color .18s ease, box-shadow .18s ease, border-color .18s ease; }
.btn:active, .k-btn:active { transform: scale(.98); }
.btn:focus-visible, .k-btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.k-btn--progress { background: var(--primary-light); color: var(--brand); border-color: var(--brand);
  position: relative; overflow: hidden; justify-content: center; }
.k-btn--progress::before { content: ""; position: absolute; inset: 0; width: var(--fortschritt, 0%);
  background: rgba(0, 83, 161, .16); transition: width .25s linear; }
.k-btn--progress > * { position: relative; }
.k-btn--done { background: var(--success); color: #fff; }
.card { animation: k-card-in .28s ease-out both; }
@keyframes k-card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gallery .item.loading { background: linear-gradient(100deg, #eef2f7 30%, #f7f9fc 50%, #eef2f7 70%);
  background-size: 200% 100%; animation: k-shimmer 1.2s linear infinite; }
@keyframes k-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .btn, .k-btn, .card, .gallery .item.loading { animation: none !important; transition: none !important; }
}

/* Galerie: Echtzeit + POV-Filter (JoinMyMoment-Parität) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.chip { flex: 0 0 auto; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: 6px;
  animation: k-pulse 1.6s ease-in-out infinite; }
@keyframes k-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
