:root {
  /* Kleuren uit de beamersjabloon van de kerk */
  --bg: #e2e2e2; --surface: #ffffff; --line: #c4c4c4; --field: #8a8a8a; --ink: #1c1c1c; --muted: #4c4f54;
  --accent: #5e0e1a; --primary: #5e0e1a; --on-accent: #ffffff; --accent-soft: #dcecf6; --link: #105378;
  --candle: #7d5304; --candle-soft: #f6e9c8;
  --stop: #a3322b; --stop-soft: #f6dedb; --ok: #3d6a12; --ok-soft: #e4f1cf;
  --logo-light: block; --logo-dark: none;
  --display: Calibri, Carlito, "Segoe UI", system-ui, sans-serif;
  --body: Calibri, Carlito, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, "Cascadia Mono", monospace;
  color-scheme: light;
}
/* Donker: warm van toon, afgeleid van het wijnrood, met de blauwtinten uit de sjabloon */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1416; --surface: #281b1e; --line: #4b373b; --field: #7a6569; --ink: #f1e9ea; --muted: #bcadb0;
    --accent: #efbcc4; --primary: #8f2233; --on-accent: #ffffff; --accent-soft: #24394a; --link: #90c9e8;
    --candle: #e6b95c; --candle-soft: #40331a;
    --stop: #f0948c; --stop-soft: #47241f; --ok: #b7dc72; --ok-soft: #2b3a1b;
    color-scheme: dark;
    --logo-light: none; --logo-dark: block;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1416; --surface: #281b1e; --line: #4b373b; --field: #7a6569; --ink: #f1e9ea; --muted: #bcadb0;
  --accent: #efbcc4; --primary: #8f2233; --on-accent: #ffffff; --accent-soft: #24394a; --link: #90c9e8;
  --candle: #e6b95c; --candle-soft: #40331a;
  --stop: #f0948c; --stop-soft: #47241f; --ok: #b7dc72; --ok-soft: #2b3a1b;
  color-scheme: dark;
  --logo-light: none; --logo-dark: block;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--body) }
button, input, select { font: inherit; color: inherit }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px }
a { color: var(--link) }
.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 16px }
main.wrap { padding-block: 24px 48px }

.top { background: var(--surface); border-bottom: 3px solid var(--primary) }
.top .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; align-items: center; padding-block: 8px }
.brand { display: flex; align-items: flex-end; gap: 10px; color: var(--muted); text-decoration: none }
.brand img { height: 72px; width: auto }
.brand .logo-light { display: var(--logo-light) }
.brand .logo-dark { display: var(--logo-dark) }
.brand small { font-size: 15px }
.top-right { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center }
nav a { font-weight: 600 }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center }
nav form { margin: 0 }
.link { background: none; border: 0; padding: 0; font-weight: 600; color: var(--link); text-decoration: underline; cursor: pointer }

h1 { font: 700 32px/1.2 var(--display); color: var(--accent); margin: 0 0 4px; text-wrap: balance; overflow-wrap: anywhere }
h2 { font: 700 21px/1.3 var(--display); margin: 0 0 10px }
.lede { color: var(--muted); margin: 0 0 12px }
.head { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: flex-start; margin-bottom: 20px }
.head > div { min-width: 0 }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start }
.narrow { max-width: 440px; margin: 32px auto 0 }
.narrow-left { max-width: 560px }
.card { display: grid; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; min-width: 0 }
.card h1, .card h2, .card p { margin-bottom: 0 }
.reveal { margin-bottom: 20px; border-color: var(--candle) }

.field { display: grid; gap: 4px; min-width: 0 }
.field label, .lbl { font-size: 14px; font-weight: 600 }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px }
input:not([type="hidden"]), select { width: 100%; padding: 8px 10px; border: 1px solid var(--field); border-radius: 4px; background: var(--surface) }
.code-input { font: 600 20px var(--mono); letter-spacing: .08em }
.hint { font-size: 14px; color: var(--muted); margin: 0 }
code { font-family: var(--mono); font-size: 15px }
.wrap-any { overflow-wrap: anywhere }
.family-code { font-size: 26px; letter-spacing: .1em }

.btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 4px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--ink) }
.btn:hover { border-color: var(--accent) }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-accent) }
.btn.danger { color: var(--stop) }
.btn.small { padding: 4px 9px; font-size: 14px }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px }
.actions form, .row-actions form { margin: 0 }

.error, .notice { padding: 8px 12px; border-radius: 4px; margin: 0 0 12px }
.error { background: var(--stop-soft) }
.notice { background: var(--ok-soft) }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line) }
.rows li { border-bottom: 1px solid var(--line) }
.row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 11px 6px; color: inherit; text-decoration: none }
a.row:hover { background: var(--accent-soft) }
.row-main { display: grid; min-width: 0; flex: 1 1 220px }
.row-main b { font-weight: 500; overflow-wrap: anywhere }
.row-main small, .row small { color: var(--muted); font-size: 14px; overflow-wrap: anywhere }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px }
.chip { font-size: 14px; padding: 3px 9px; border-radius: 3px; background: var(--accent-soft); white-space: nowrap }
.chip-wacht_op_bevestiging, .chip-familie_bezig { background: var(--candle-soft) }
.chip-in_sharepoint, .chip-afgerond { background: var(--ok-soft) }
.chip-geannuleerd { background: var(--stop-soft) }

.qr { background: #fff; padding: 8px; width: 220px; max-width: 100%; justify-self: center; border-radius: 4px }
.qr svg { display: block; width: 100%; height: auto }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px }

.table-wrap { overflow-x: auto }
table { border-collapse: collapse; width: 100%; font-size: 15px }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
th { font-size: 14px; color: var(--muted) }
td:first-child { font-family: var(--mono); font-size: 14px; white-space: nowrap }

@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr) } }

/* Samenstellen door de familie */
.sect-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 8px }
.sect-head h2 { margin: 0 }
.head-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.head-tools form { margin: 0 }
.side { display: grid; gap: 28px; min-width: 0 }
.order .item { padding: 0 }
.block-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 4px 12px; padding: 11px 2px; align-items: start }
.clock { font-family: var(--mono); font-size: 14px; color: var(--muted); padding-top: 2px }
.block-main { min-width: 0 }
.block-title { font-weight: 500; overflow-wrap: anywhere }
.meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 10px; overflow-wrap: anywhere }
.kind { font-weight: 700; color: var(--accent) }
.thumbs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; align-items: center }
.thumbs img { width: 44px; height: 25px; object-fit: cover; border-radius: 2px; display: block }
.block-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end }
.btn.icon { padding: 5px 10px; min-width: 36px }
.btn:disabled { opacity: .45; cursor: not-allowed }
.btn.wide { width: 100%; padding: 10px }
.editor { display: grid; gap: 12px; padding: 12px; margin: 0 0 12px 66px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; min-width: 0 }
.editor input.short { max-width: 110px }
.editor-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center }
.confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center }
.file-btn { position: relative; overflow: hidden }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; border: 0 }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.drop { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 4px }
.drop.over { border-color: var(--accent); background: var(--accent-soft) }
.album { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px }
.album.small { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)) }
.photo { position: relative; min-width: 0 }
.pick { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: var(--line); border-radius: 3px; overflow: hidden; cursor: pointer }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block }
.pick[aria-pressed="true"] { outline: 3px solid var(--candle); outline-offset: -3px }
.pick:disabled { cursor: default }
.tag { position: absolute; inset: auto 0 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; line-height: 1.5; text-align: center }
.remove { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; line-height: 18px; padding: 0; border: 0; border-radius: 3px; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer }
.uploads { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px }
.uploads:empty { display: none }
.uploads li { display: grid; gap: 2px; overflow-wrap: anywhere }
.uploads progress { width: 100%; accent-color: var(--primary) }
.checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px }
.checks li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; font-size: 15px; align-items: baseline }
.lvl { font-size: 12px; font-weight: 600; text-align: center; padding: 1px 0; border-radius: 3px }
.lvl.ok { background: var(--ok-soft); color: var(--ok) }
.lvl.warn { background: var(--candle-soft); color: var(--candle) }
.lvl.stop { background: var(--stop-soft); color: var(--stop) }
.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 8px 14px; border-radius: 4px; background: var(--ink); color: var(--bg); font-size: 15px; z-index: 20 }
@media (max-width: 860px) { .album { grid-template-columns: repeat(6, minmax(0, 1fr)) } }
@media (max-width: 520px) {
  .block-row { grid-template-columns: 46px minmax(0, 1fr) }
  .block-actions { grid-column: 1 / -1; justify-content: flex-start }
  .editor { margin-left: 0 }
  .album { grid-template-columns: repeat(4, minmax(0, 1fr)) }
}

/* Handleiding */
.manual { max-width: 72ch; overflow-wrap: anywhere }
.manual h1 { margin-bottom: 12px }
.manual h2 { font-size: 24px; margin: 28px 0 8px }
.manual h3 { font: 700 19px/1.3 var(--display); margin: 20px 0 6px }
.manual p, .manual ul, .manual ol { margin: 0 0 12px }
.manual li { margin-bottom: 4px }
.manual table { margin-bottom: 16px; display: block; overflow-x: auto }
.manual pre { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto }
.manual pre code { font-size: 14px }
/* Tempo van foto's bij muziek */
.hint.warn { color: var(--candle); font-weight: 600 }
.block-main .hint.warn { margin-top: 3px }
.pace.fast { color: var(--candle); font-weight: 600 }

/* Kerk op de inlogpagina van de familie */
.church-photo { display: block; width: 104px; height: auto; border-radius: 3px; justify-self: center }

/* Hoofdfoto met kader */
.card-form { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line) }
.card-form h3 { font: 700 19px/1.3 var(--display); margin: 0 }
.card-preview { width: 100%; height: auto; display: block; border-radius: 3px }

/* Bijknippen */
.trim { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line) }
.trim-player { width: 100%; max-height: 260px; display: block }
.trim-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 62px auto; gap: 8px; align-items: center }
.trim-row input { padding: 0; accent-color: var(--primary) }
.trim-row output { font-family: var(--mono); font-size: 15px; text-align: right }
@media (max-width: 520px) {
  .trim-row { grid-template-columns: 48px minmax(0, 1fr) 62px }
  .trim-row .btn { grid-column: 2 / -1; justify-self: end }
}

.check { display: flex; gap: 8px; align-items: center; font-size: 15px }
.field input[type="checkbox"], .check input { width: 18px; height: 18px; flex: none; accent-color: var(--primary) }
