/* NPO FunX huisstijl: paars #7b38b4, donkerpaars #291436, NPO grijs #e6e6e6. */
:root {
  --paars: #7b38b4;
  --paars-hover: #8c4bc6;
  --donker: #291436;
  --lichtpaars: #b79fcf;
  --grijs: #e6e6e6;
  --bg: #f5f4f7;
  --panel: #fff;
  --line: #e6e6e6;
  --text: #291436;
  --muted: #6e6178;
  --ok: #076553;
  --bad: #d20f1d;
  --live: #d20f1d;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

header {
  padding: 18px 16px 14px;
  padding-top: max(18px, env(safe-area-inset-top));
  background: #fff;
  text-align: center;
}
.logo { display: block; width: min(220px, 60vw); height: auto; margin: 0 auto; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 16px 30px;
  background: var(--paars);
  color: #fff;
  text-align: center;
}
.hero .x {
  position: absolute;
  right: -40px; top: 50%;
  width: 200px; height: 200px;
  transform: translateY(-50%);
  fill: none; stroke: var(--lichtpaars); stroke-width: 6;
  opacity: .35;
}
.hero h1, .hero p { position: relative; max-width: 560px; margin-left: auto; margin-right: auto; }
h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.hero p { margin-top: 8px; margin-bottom: 0; font-size: 15px; color: #f1e9f8; }

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 16px max(40px, env(safe-area-inset-bottom));
}

.pick { display: grid; gap: 12px; }
.big {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 2px solid var(--paars);
  color: var(--paars);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, transform .05s;
}
.big:hover { background: #f3ecfa; }
.big:active { transform: scale(.985); }
.big.rec { background: var(--paars); color: #fff; }
.big.rec:hover { background: var(--paars-hover); border-color: var(--paars-hover); }
/* Computer (muis): de camera-knoppen openen daar ook alleen de bestandskiezer. */
@media (hover: hover) and (pointer: fine) {
  .big.cam { display: none; }
  .big.file { background: var(--paars); color: #fff; }
  .big.file:hover { background: var(--paars-hover); border-color: var(--paars-hover); }
}
.big svg {
  width: 28px; height: 28px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
}

.field { margin-top: 24px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 10px;
}
.field input:focus { outline: none; border-color: var(--paars); }
.muted { color: var(--muted); font-weight: 400; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

#list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
#list:empty { display: none; }
#list li {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.top { display: flex; align-items: baseline; gap: 12px; }
.fname { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state { flex: none; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
li.done .state { color: var(--ok); font-weight: 700; }
li.error .state { color: var(--bad); font-weight: 700; }
.sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
li.error .sub { color: var(--bad); }

.bar { height: 6px; margin-top: 10px; border-radius: 3px; background: var(--grijs); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--paars); transition: width .3s; }
li.done .bar i { background: var(--ok); }
li.error .bar i { background: var(--bad); }

.row-actions { display: flex; gap: 8px; margin-top: 10px; }
.row-actions button {
  font: inherit; font-size: 14px; font-weight: 700;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  color: var(--paars); background: #fff; border: 2px solid var(--paars);
}
.row-actions button:hover { background: #f3ecfa; }

/* Live in de studio */
.live {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--donker);
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.live:hover { background: #3a1d4d; }
.live b { display: block; font-size: 17px; font-weight: 800; text-transform: uppercase; }
.live small { display: block; color: var(--lichtpaars); font-size: 13px; }
.live > span:nth-child(2) { flex: 1; }
.live svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dot {
  width: 12px; height: 12px; flex: none;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(210, 15, 29, .7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(210, 15, 29, 0); }
  100% { box-shadow: 0 0 0 0 rgba(210, 15, 29, 0); }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
