/* LMP Reel Studio: ruhige, hochwertige Oberfläche. Die Markenfarben gelten nur im Video. */
:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --ink: #1d1d1b;
  --muted: #6f6b64;
  --line: #e4e0d8;
  --accent: #1d1d1b;
  --accent-ink: #ffffff;
  --danger: #a33a2c;
  --ok: #2f6b45;
  --radius: 14px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141412;
    --surface: #1e1e1b;
    --ink: #f1eee8;
    --muted: #a39e94;
    --line: #34322e;
    --accent: #f1eee8;
    --accent-ink: #141412;
  }
}
:root[data-theme="dark"] {
  --bg: #141412; --surface: #1e1e1b; --ink: #f1eee8; --muted: #a39e94;
  --line: #34322e; --accent: #f1eee8; --accent-ink: #141412;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  -webkit-tap-highlight-color: transparent;
}
h1 { font: 600 28px/1.15 var(--serif); margin: 8px 0 6px; letter-spacing: .2px; }
button, input, select { font: inherit; color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brandmark { display: flex; flex-direction: column; }
.brandmark__title { font: 600 17px/1.1 var(--serif); letter-spacing: .4px; }
.brandmark__sub { font-size: 11px; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; }
.total { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; }

main { max-width: 560px; margin: 0 auto; padding: 8px 16px; }
.panel { display: none; }
.panel.is-active { display: block; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.empty { color: var(--muted); text-align: center; padding: 28px 8px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 14px 0;
}
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.field__label { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.field__label output { text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 500; }
.field__help { font-size: 13px; color: var(--muted); }
input[type="text"], select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  font-size: 16px; /* verhindert Zoom in iOS */
}
input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-weight: 500; text-decoration: none; cursor: pointer; text-align: center;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--ghost { border-color: var(--line); }
.btn--block { display: flex; width: 100%; margin: 8px 0; }
.btn--round { width: 46px; min-width: 46px; padding: 0; border-radius: 50%; }
.btn--small { min-height: 36px; padding: 6px 10px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .45; }
.row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.row > * { flex: 1; }

.segmented { display: flex; border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; background: var(--bg); }
.segmented button { flex: 1; min-height: 38px; border: 0; border-radius: 8px; background: transparent; font-size: 15px; }
.segmented button.is-on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }

.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 500; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.switch--small { font-size: 14px; color: var(--muted); }

/* Medienliste */
.items { list-style: none; padding: 0; margin: 12px 0; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; overflow: hidden; }
.item__head { display: flex; gap: 12px; align-items: center; padding: 10px; }
.item__thumb { width: 54px; height: 96px; border-radius: 8px; background: var(--line) center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.item__meta { flex: 1; min-width: 0; }
.item__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__sub { font-size: 13px; color: var(--muted); }
.item__badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); margin-top: 4px; }
.item__badge--warn { color: var(--danger); border-color: currentColor; }
.item__tools { display: flex; flex-direction: column; gap: 6px; }
.item__tools .btn { min-height: 34px; width: 40px; padding: 0; }
.item__body { border-top: 1px solid var(--line); padding: 4px 12px 12px; }
.item__body[hidden] { display: none; }
.item__toggle { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; min-height: 40px; color: var(--muted); font-size: 14px; }

/* Marke */
.logo-preview { height: 110px; border-radius: 10px; margin: 8px 0; display: grid; place-items: center; color: var(--muted);
  background: repeating-conic-gradient(#8d8982 0 25%, #a7a39b 0 50%) 50%/18px 18px; }
.logo-preview img { max-width: 80%; max-height: 90px; }
.color-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.color-row:first-of-type { border-top: 0; }
.color-row input[type="color"] { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: var(--bg); flex: none; }
.color-row > div { flex: 1; display: flex; flex-direction: column; font-size: 15px; }
.color-row > div span { font-size: 12px; color: var(--muted); }
.color-row .hex { width: 112px; padding: 10px 8px; flex: none; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.font-sample { padding: 14px; border-radius: 10px; background: #1d1d1b; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.font-sample b { font-size: 26px; font-weight: 600; }
.font-sample span { font-size: 15px; opacity: .85; }
.templates { list-style: none; padding: 0; margin: 8px 0; }
.templates li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.templates li span { flex: 1; font-weight: 500; }
.templates .is-empty { color: var(--muted); font-size: 14px; }

/* Vorschau */
.stage { position: relative; width: min(100%, 340px); aspect-ratio: 9 / 16; margin: 10px auto; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage__safe { position: absolute; inset: 13% 13% 20% 4%; border: 1.5px dashed rgba(255,255,255,.7); border-radius: 6px; pointer-events: none; }
.player { display: flex; align-items: center; gap: 12px; width: min(100%, 340px); margin: 0 auto; }
.player__time { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); min-width: 52px; text-align: right; }

.progress__bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 8px; }
.progress__bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress__text { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.result video { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; margin-top: 12px; }

details.details { margin-top: 8px; font-size: 14px; color: var(--muted); }
details.details summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; }
details.details pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.checks { list-style: none; padding: 0; margin: 8px 0; font-size: 14px; }
.checks li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.checks li b { width: 18px; flex: none; }
.checks .ok b { color: var(--ok); }
.checks .bad b { color: var(--danger); }
.checks .info b { color: var(--muted); }
.checks small { display: block; color: var(--muted); }
.version { text-align: center; font-size: 12px; color: var(--muted); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar button { flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); min-height: 50px; }
.tabbar__icon { font-size: 18px; line-height: 1.2; font-family: var(--serif); }
.tabbar button.is-active { color: var(--ink); font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-size: 14px; transition: .25s; z-index: 30;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
