:root {
  --bg: #140f2a;
  --glow: #2b1f5c;
  --card: #231b49;
  --line: #3a2f6b;
  --text: #efeaff;
  --muted: #a99fd0;
  --gold: #f4c95d;          /* accentkleur voor tekst */
  --btn: #f4c95d;           /* vlak van de hoofdknop */
  --btn-text: #2a1d05;
  --notice-bg: rgba(244, 201, 93, .1);
  --notice-line: rgba(244, 201, 93, .35);
  --notice-text: #f6dfa2;
  --heart: #ff5d7a;
  --head: #4cc9f0;
  --life: #6fe08a;
  --fate: #f4c95d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

/* Licht thema: volgt de instelling van het toestel */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f3ff;
    --glow: #e6dcff;
    --card: #ffffff;
    --line: #d6ccef;
    --text: #1f1740;
    --muted: #5a5080;
    --gold: #7a5200;
    --notice-bg: #fff6dc;
    --notice-line: #e2c26a;
    --notice-text: #5a4100;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% 0%, var(--glow) 0%, var(--bg) 60%) fixed var(--bg);
  color: var(--text);
  font: 100%/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { max-width: 40ch; margin: 20vh auto; padding: 0 20px; text-align: center; }
[data-focus]:focus { outline: none; }
[hidden] { display: none !important; }

.screen { display: none; padding: 24px 20px calc(32px + env(safe-area-inset-bottom)); }
.screen.active { display: block; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: .01em; }
h1 { font-size: 2.75rem; color: var(--gold); }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }

/* Start */
.hero { text-align: center; padding-top: 4vh; }
.hero-hand { width: 150px; height: auto; }
.hero-hand path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hero-hand .outline { stroke: var(--muted); stroke-width: 1.6; }
.hero-hand .l1 { stroke: var(--heart); stroke-width: 2.4; }
.hero-hand .l2 { stroke: var(--head); stroke-width: 2.4; }
.hero-hand .l3 { stroke: var(--life); stroke-width: 2.4; }
.lead { color: var(--muted); max-width: 34ch; margin: 12px auto 28px; }

.actions { display: grid; gap: 12px; margin: 20px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 22px; border-radius: 14px;
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--btn); color: var(--btn-text); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 0.875rem; }
.btn:focus-visible, .chip:focus-visible, .shutter:focus-visible, .card-toggle:focus-visible, #file-input:focus-visible + .btn { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn.primary:focus-visible { outline-color: var(--text); }
.drop-hint { display: none; text-align: center; color: var(--muted); font-size: 0.875rem; margin: -8px 0 0; }
@media (hover: hover) and (pointer: fine) { .drop-hint { display: block; } }
body.dragging #screen-start { outline: 2px dashed var(--gold); outline-offset: -10px; border-radius: 24px; }

.tips { list-style: none; padding: 16px 18px; margin: 24px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--muted); font-size: 0.9375rem; }
.tips li { padding: 4px 0 4px 22px; position: relative; }
.tips li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: 0.75rem; top: 7px; }
.fine { color: var(--muted); font-size: 0.8125rem; text-align: center; margin: 20px auto 0; max-width: 40ch; }

/* Camera */
#screen-camera { padding: 0; }
#screen-camera.active { display: flex; flex-direction: column; height: 100dvh; }
.cam-wrap { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; }
#video { width: 100%; height: 100%; object-fit: cover; display: block; }
#video.mirrored { transform: scaleX(-1); }
.guide { position: absolute; inset: 8% 12%; width: 76%; height: 84%; pointer-events: none; }
.guide path { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 1; stroke-dasharray: 3 3; stroke-linejoin: round; transition: stroke .2s ease; }
.cam-wrap[data-state="ok"] .guide path { stroke: var(--life); stroke-dasharray: none; stroke-width: 1.4; }
.cam-wrap[data-state="back"] .guide path, .cam-wrap[data-state="cut"] .guide path, .cam-wrap[data-state="small"] .guide path, .cam-wrap[data-state="closed"] .guide path { stroke: var(--gold); }
.cam-hint { color: #fff; position: absolute; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(10, 6, 30, .72); font-size: 0.9375rem; font-weight: 600; text-align: center; max-width: calc(100% - 32px); }
.cam-wrap[data-state="ok"] .cam-hint { background: rgba(20, 90, 45, .85); }
.cam-bar { --text: #efeaff; --line: #3a2f6b; --bg: #140f2a; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--bg); }
.cam-bar .btn:first-child { justify-self: start; }
.cam-bar .btn:last-child { justify-self: end; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: var(--btn); cursor: pointer; transition: transform .1s ease; }
.shutter:active { transform: scale(.93); }

/* Bezig */
#screen-busy.active { display: grid; place-items: center; min-height: 100dvh; }
.busy { text-align: center; color: var(--muted); }
.scan { position: relative; width: min(220px, 60vw); margin: 0 auto 20px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); line-height: 0; background: #000; }
.scan canvas { width: 100%; height: auto; display: block; opacity: .85; }
.scan i { position: absolute; left: 0; right: 0; top: 0; height: 28%; background: linear-gradient(to bottom, transparent, rgba(244, 201, 93, .55)); border-bottom: 2px solid #f4c95d; animation: sweep 1.6s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: translateY(-100%); } to { transform: translateY(260%); } }
progress { display: block; width: min(220px, 60vw); height: 6px; margin: 14px auto 0; accent-color: var(--gold); }

/* Resultaat */
.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.photo { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #000; line-height: 0; }
.photo canvas { width: 100%; height: auto; display: block; }
.photo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo svg path, .photo svg text { pointer-events: none; }
.pl { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s ease; }
.pl.halo { stroke: rgba(10, 6, 30, .55); }
.pl.draw { animation: draw 1.3s ease-out both; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.plabel { font-family: system-ui, sans-serif; font-weight: 700; paint-order: stroke; stroke: rgba(10, 6, 30, .8); stroke-linejoin: round; animation: fade .5s ease 1.1s both; transition: opacity .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.pl.hit { stroke: transparent; pointer-events: stroke; cursor: pointer; }
.dimmed:not(.hit) { opacity: .18; }
.hidden-line { opacity: 0 !important; pointer-events: none !important; }

.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.chip {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; text-align: left;
}
.chip i { width: 18px; height: 4px; border-radius: 2px; background: var(--c); flex: none; }
.chip[aria-pressed="false"] { opacity: .45; }
.notice { list-style: none; background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--notice-text); border-radius: 12px; padding: 10px 14px; font-size: 0.875rem; margin: 12px 0 0; }
.notice li + li { margin-top: 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-top: 12px; }
.card p { margin: 8px 0 0; }
.card .obs { color: var(--muted); font-size: 0.9375rem; }
.line-card { transition: border-color .2s ease, box-shadow .2s ease; }
.line-card.is-focused { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
.line-card h3 { font-size: inherit; }
.card-toggle { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; width: 100%; min-height: 44px; padding: 0; background: none; border: 0; border-radius: 8px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.card-toggle .bar { flex-basis: 100%; width: 28px; max-width: 28px; height: 4px; border-radius: 2px; background: var(--c); margin-bottom: 6px; }
.card-toggle .card-title { font: 600 1.25rem/1.3 var(--serif); }
.card-toggle small { font: 400 0.8125rem/1.3 system-ui, sans-serif; color: var(--muted); }
.meter { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--muted); margin-top: 2px !important; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--c); }
.section-title { margin: 28px 0 0; color: var(--gold); }
.hand-type { display: flex; gap: 14px; align-items: flex-start; }
.hand-type .icon { font-size: 2.125rem; line-height: 1; color: var(--gold); font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif; }
.pred h3 { margin: 14px 0 0; font: 600 0.8125rem/1 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.pred h3:first-child { margin-top: 0; }
.pred p { margin: 6px 0 0; }
.lucky { margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.lucky div { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; }
.lucky dd { margin: 0; display: block; font-family: var(--serif); font-size: 1.125rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.lucky dt { font-size: 0.75rem; color: var(--muted); }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); max-width: 528px; margin: 0 auto; border-radius: 14px; padding: 14px 16px; font-size: 0.9375rem; z-index: 10; cursor: pointer; }
.toast.error { background: #3b1630; border: 1px solid #a8436b; color: #ffdbe6; }
.toast.info { background: #163b2a; border: 1px solid #3f9a6b; color: #d8ffe9; }

dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 20px; padding: 24px; max-width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(8, 5, 20, .7); }
dialog p { color: var(--muted); margin: 10px 0 0; }

/* Breed scherm: foto links, lezing rechts */
@media (min-width: 900px) {
  body[data-screen="result"] #app { max-width: 1040px; }
  .result-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .result-photo { position: sticky; top: 24px; }
  .result-text .card:first-child { margin-top: 0; }
}

@media (forced-colors: active) {
  .btn, .chip, .card { border: 1px solid CanvasText; }
  .chip[aria-pressed="false"] { opacity: 1; text-decoration: line-through; }
}

@media (prefers-reduced-motion: reduce) {
  .pl.draw, .plabel, .scan i, #flash.go { animation: none; }
  .btn, .shutter, .guide path, .line-card, .pl, .plabel { transition: none; }
}

/* ---- Aanvullingen ---- */
a { color: var(--gold); }
.link { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--gold); font: inherit; font-size: .875rem; text-decoration: underline; cursor: pointer; }
.fine.left { text-align: left; margin: 8px 0 0; }
footer.fine p { margin: 6px 0; }

.field { margin: 0 0 4px; }
.field label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 6px; }
.field label span { font-weight: 400; color: var(--muted); }
.field input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.field input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.history, .faq { margin-top: 28px; }
.history h2, .faq h2 { font-size: 1.25rem; }
.history-head { display: flex; align-items: center; justify-content: space-between; }
#history-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
#history-list li { display: flex; gap: 8px; }
.history-open { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 4px 12px 4px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: .9375rem; text-align: left; cursor: pointer; }
.history-open img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.history-del { width: 44px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.375rem; cursor: pointer; }
.history-open:focus-visible, .history-del:focus-visible, .link:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.25rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

.cam-tools { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 10px; }
.btn.tool { min-height: 44px; padding: 0 16px; border-radius: 999px; background: rgba(10, 6, 30, .72); color: #fff; border-color: rgba(255, 255, 255, .35); font-size: .875rem; }
.btn.tool[aria-pressed="true"] { background: #f4c95d; color: #2a1d05; border-color: transparent; }
.cam-wrap[data-state="auto"] .guide path { stroke: var(--life); stroke-dasharray: none; stroke-width: 1.4; }
.cam-wrap[data-state="auto"] .cam-hint { background: rgba(20, 90, 45, .85); }
.cam-wrap[data-state="auto"] ~ .cam-bar .shutter { animation: arm 1.4s linear infinite; }
@keyframes arm { from { box-shadow: 0 0 0 0 rgba(111, 224, 138, .9); } to { box-shadow: 0 0 0 18px rgba(111, 224, 138, 0); } }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 20; }
#flash.go { animation: flash .35s ease-out; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }

.photo-tools { display: flex; gap: 8px; margin-top: 10px; }
.photo-tools .btn { flex: 1; }
.btn[aria-pressed="false"]#btn-lines { opacity: .6; }
#overlay.all-hidden > * { opacity: 0 !important; pointer-events: none !important; }
body.zoomed { overflow: hidden; }
body.zoomed #photo-wrap { position: fixed; inset: 0; z-index: 30; border-radius: 0; border: 0; display: grid; place-items: center; background: #000; }
body.zoomed #photo-wrap > * { grid-area: 1 / 1; position: static; width: min(100vw, calc(100dvh * var(--ar, 1))); height: auto; aspect-ratio: var(--ar, 1); }
body.zoomed #btn-zoom { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 31; flex: none; background: rgba(10, 6, 30, .8); color: #fff; }

.keywords { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.keywords li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .8125rem; font-weight: 600; }
.scores h3 { margin-bottom: 10px; }
.score { display: grid; grid-template-columns: 5.5rem 1fr 2rem; align-items: center; gap: 10px; min-height: 28px; font-size: .875rem; }
.score-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.score-bar i { display: block; height: 100%; width: var(--v); border-radius: 4px; background: var(--c); }
.score-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.measure { margin-top: 10px; font-size: .875rem; color: var(--muted); }
.measure summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; }
.measure dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 4px; }
.measure dd { margin: 0; color: var(--text); }
.daily { border-color: var(--notice-line); background: var(--notice-bg); }
.daily h3 { font: 600 .8125rem/1 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.feedback { text-align: center; }
.feedback p { margin: 0; }
.fb-buttons { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions-row > [hidden] + * { grid-column: 1 / -1; }

/* Afdrukken: alleen de foto en de lezing, zwart op wit */
@media print {
  :root { --bg: #fff; --glow: #fff; --card: #fff; --line: #bbb; --text: #000; --muted: #333; --gold: #000; --notice-bg: #fff; --notice-line: #bbb; --notice-text: #000; }
  body { background: #fff; }
  #app, body[data-screen="result"] #app { max-width: none; }
  .btn, .legend, .photo-tools, .feedback, .toast, .notice, dialog, #flash, .card-toggle .sr-only, .measure summary { display: none !important; }
  .result-grid { display: block; }
  .photo { max-width: 9cm; margin: 0 auto 12px; }
  .card { break-inside: avoid; border-color: #bbb; padding: 10px 12px; }
  .measure { display: block; }
  .pl.draw, .plabel { animation: none; }
}

/* Tekstpagina's */
.prose { max-width: 62ch; }
.prose h1 { font-size: 2.25rem; margin: 12px 0 8px; }
.prose h2 { font-size: 1.25rem; margin: 28px 0 6px; }
.prose p { margin: 0 0 12px; }
a.btn { text-decoration: none; }

/* Camera start of lukt niet */
.cam-wrap[data-state="starting"] .guide, .cam-wrap[data-state="error"] .guide, .cam-wrap[data-state="error"] .cam-hint, .cam-wrap[data-state="error"] .cam-tools { display: none; }
.cam-wrap[data-state="starting"] .cam-hint { top: 45%; white-space: normal; }
.cam-error { position: absolute; inset: 0; display: grid; align-content: center; gap: 12px; padding: 24px; background: #140f2a; color: #efeaff; text-align: center; --text: #efeaff; --line: #3a2f6b; }
.cam-error p { margin: 0 0 8px; }
.cam-error input:focus-visible + .btn { outline: 2px solid #f4c95d; outline-offset: 3px; }
.shutter:disabled { opacity: .4; cursor: default; }

/* Betaalkaart */
.line-card.is-locked .locked-note { color: var(--muted); font-size: .9375rem; font-style: italic; }
.paywall { border-color: var(--gold); }
.paywall ul { margin: 10px 0 0; padding-left: 20px; }
.paywall li { margin: 4px 0; }
.pw-price { font: 600 2rem/1.1 var(--serif); color: var(--gold); margin: 16px 0 0 !important; font-variant-numeric: tabular-nums; }
.pw-once { color: var(--muted); font-size: .875rem; margin: 4px 0 0 !important; }
.pw-coupon { margin-top: 16px; }
.pw-coupon label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; text-transform: uppercase; }
.pw-row input:focus-visible, .pw-consent input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pw-msg { font-size: .875rem; min-height: 1.3em; margin: 6px 0 0 !important; }
.pw-msg.ok { color: var(--life); }
.pw-msg.bad, .pw-error { color: #ff8fa6; }
@media (prefers-color-scheme: light) { .pw-msg.ok { color: #17713a; } .pw-msg.bad, .pw-error { color: #b3123a; } }
.pw-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--muted); margin: 12px 0; cursor: pointer; }
.pw-consent input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--gold); }
.paywall .btn.primary { width: 100%; }
.pw-error { font-size: .875rem; min-height: 1.3em; margin: 6px 0 0 !important; }
@media print { .paywall { display: none !important; } }

.pw-test { margin: 12px 0 0 !important; padding: 8px 12px; border-radius: 10px; background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--notice-text); font-size: .875rem; }

/* Cadeaubon */
.lead.left { text-align: left; margin: 0 0 20px; max-width: none; }
.gift-banner { margin: 0 0 16px; }
.field + .field { margin-top: 14px; }
.field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; resize: vertical; }
.field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#gift-form .fine.left { margin-bottom: 4px; }
.gift-card { border: 2px solid var(--gold); border-radius: 20px; padding: 28px 22px; text-align: center; background: var(--card); }
.gift-card p { margin: 0; }
.gift-kicker { font: 600 .75rem/1 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.gift-to { font: 600 1.75rem/1.2 var(--serif); margin-top: 14px !important; }
.gift-what { color: var(--muted); margin-top: 8px !important; }
.gift-message { font-style: italic; margin-top: 16px !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.gift-from { margin-top: 8px !important; }
.gift-label { margin-top: 22px !important; font-size: .8125rem; color: var(--muted); }
.gift-code { font: 700 1.5rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--gold); overflow-wrap: anywhere; user-select: all; }
.gift-how { margin-top: 16px !important; font-size: .9375rem; color: var(--muted); overflow-wrap: anywhere; }
.gift-how strong { color: var(--text); }
.gift-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.gift-list .history-open { width: 100%; min-height: 48px; padding: 0 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@media print {
  body[data-screen="gift"] .result-head, body[data-screen="gift"] #gift-mine, body[data-screen="gift"] #gift-form, body[data-screen="gift"] #gift-card-wrap > .fine { display: none !important; }
  body[data-screen="gift"] .gift-card { max-width: 12cm; margin: 2cm auto; border-color: #000; }
}

.field select { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.field select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.field-help { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); }
@media print { body[data-screen="gift"] #gift-note { display: none !important; } }

/* Twee handen */
.hand-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.hand-tabs .btn[aria-pressed="true"] { background: var(--btn); color: var(--btn-text); border-color: transparent; }
.second-hand { border-color: var(--gold); }
.second-hand .actions-row { margin-top: 12px; }
.compare dl { margin: 12px 0; }
.compare dt { font-weight: 600; margin-top: 10px; padding-left: 12px; border-left: 4px solid var(--c); }
.compare dd { margin: 2px 0 0; padding-left: 16px; }
@media print { .second-hand, .hand-tabs { display: none !important; } }

/* Alleen op papier */
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .print-footer { margin-top: 16px; padding-top: 10px; border-top: 1px solid #bbb; text-align: center; font-size: .9375rem; }
  /* Browsers laten achtergrondkleuren standaard weg bij afdrukken; deze vlakken dragen betekenis. */
  .score-bar, .score-bar i, .dots i, .card-toggle .bar, .compare dt, .gift-card {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .score-bar { background: #e6e6e6; border: 1px solid #999; height: 10px; }
  .score-value { color: #000; }
  .dots i { border: 1px solid #999; background: #fff; }
  .dots i.on { background: var(--c); }
}
