:root {
  color-scheme: light;
  --ink: #1e252a;
  --muted: #5e6765;
  --paper: #f8f5ef;
  --paper-dark: #ece5d8;
  --accent: #d54b42;
  --accent-dark: #ad302a;
  --teal: #176c67;
  --line: #d7cfc1;
  --success-dark: #0e8a46;
  --danger: #ad302a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button, input, label { font: inherit; }
button { cursor: pointer; }

.icon-svg { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; stroke: currentColor; }
.icon-button { display: grid; width: 38px; height: 38px; flex-shrink: 0; place-items: center; border: 0; border-radius: 50%; background: var(--paper-dark); color: var(--ink); font-size: 1.1rem; }
.icon-button-danger { color: var(--danger); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.is-hidden { display: none !important; }

.app-shell { width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px 60px; }

.logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.logo-mark { width: 32px; height: 32px; flex-shrink: 0; }
.logo-word { font-family: Georgia, "Times New Roman", serif; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.subtitle { margin: 0 0 24px; color: var(--muted); font-weight: 700; }

h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.9rem; letter-spacing: -.02em; }
h2 { margin: 32px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; }

.panel { max-width: 380px; margin: 12vh auto 0; text-align: center; }
.panel form { display: flex; flex-direction: column; gap: 12px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.bar h1 { flex: 1; }

.button { min-height: 48px; border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 800; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button-primary { background: var(--accent); color: white; }
.button-secondary { background: transparent; border: 2px solid var(--ink); color: var(--ink); }

.text-input { display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); margin-top: 4px; }
.text-input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); text-align: left; }

.error-text { color: var(--danger); font-weight: 700; }
.save-status { min-height: 1.2em; font-size: .85rem; font-weight: 700; color: var(--success-dark); }
.save-status.is-error { color: var(--danger); }

.kaarten-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kaarten-list-item-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-align: left; }
.kaarten-list-item-button:hover { border-color: var(--teal); }
.kaarten-list-item-button.is-template { background: #e8e8e8; }
.kaarten-list-item-button .icon-svg { flex-shrink: 0; color: var(--muted); font-size: 1.3rem; }
.kaarten-list-item-label { display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.kaarten-list-item-label small { font-weight: 500; color: var(--muted); }

.card-form { display: flex; flex-direction: column; gap: 14px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.teksten-section-heading { margin: 8px 0 0; font-size: 1rem; }
.teksten-section-hint { margin: 0 0 4px; font-size: .8rem; color: var(--muted); }
.teksten-group-heading { margin: 14px 0 0; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--teal); }
.teksten-field-row { margin-top: 4px; }

.opdrachten-grid { display: grid; gap: 14px; }
.opdracht-card { display: flex; flex-direction: column; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.opdracht-positie { margin: 0; font-weight: 800; color: var(--teal); }

.image-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.image-slot { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.image-preview { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--paper-dark); border: 1px solid var(--line); }
.upload-button, .download-button { text-align: center; min-height: auto; padding: 8px 12px; }

.share-section { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.share-link { font-weight: 700; color: var(--teal); word-break: break-all; }
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.qr-holder svg { width: 220px; height: 220px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; padding: 14px 18px; border-radius: 12px; background: var(--ink); color: white; font-weight: 700; text-align: center; z-index: 10; }
