:root {
  --purple-deep: #710193;
  --purple-vivid: #A32CC4;
  --purple-soft: #9867C5;
  --purple-tint: #F8F2FC;
  --purple-border: #DFC5F0;
  --slate-dark: #1E1B2E;
  --slate-muted: #463F59;
  --white: #FFFFFF;
}
* { box-sizing: border-box; margin:0; padding:0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #F3ECF9; color: var(--slate-dark); min-height: 100vh; }
.container { max-width: 480px; margin: 0 auto; padding: 16px; }
@media (min-width: 768px) { .container { max-width: 640px; } }
.card { background:#fff; border:1.5px solid var(--purple-border); border-radius:14px; padding:16px; box-shadow:0 4px 14px rgba(113,1,147,.08); }
h1,h2,h3 { color: var(--purple-deep); }
.btn { display:inline-flex; align-items:center; justify-content:center; min-height:54px; padding:12px 18px; border:none; border-radius:12px; font-size:16px; font-weight:700; cursor:pointer; background:linear-gradient(135deg,var(--purple-deep),var(--purple-vivid)); color:#fff; width:100%; }
.btn.secondary { background:#fff; color:var(--purple-deep); border:1.5px solid var(--purple-border); }
.btn:disabled { opacity:.6; cursor:not-allowed; }
.input, select { width:100%; padding:12px 14px; font-size:16px; border:1.5px solid var(--purple-border); border-radius:10px; background:#fff; }
.input:focus, select:focus { outline:none; border-color:var(--purple-vivid); }
.label { display:block; font-weight:700; margin:10px 0 6px; color:var(--slate-dark); }
.choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:8px 0; }
.choice-card { min-height:54px; padding:12px; border:1.5px solid var(--purple-border); border-radius:12px; background:#fff; cursor:pointer; text-align:center; font-weight:700; display:flex; align-items:center; justify-content:center; }
.choice-card.active { background:var(--purple-tint); border-color:var(--purple-vivid); color:var(--purple-deep); }
.stepper { display:flex; align-items:center; gap:8px; }
.stepper button { min-width:44px; min-height:44px; font-size:20px; border:1.5px solid var(--purple-border); background:#fff; border-radius:10px; cursor:pointer; }
.stepper input { text-align:center; }
.section { margin-bottom:18px; }
.progress { height:8px; background:#E9E4F0; border-radius:999px; overflow:hidden; margin-bottom:14px; }
.progress > div { height:100%; background:linear-gradient(90deg,var(--purple-deep),var(--purple-vivid)); transition:width .3s; }
.header { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.header .logo-box { width:48px; height:48px; border-radius:12px; background:var(--purple-tint); border:1.5px solid var(--purple-border); display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; }
.header .logo-box img { width:100%; height:100%; object-fit:contain; }
.logo-fallback { font-weight:900; color:var(--purple-deep); }
/* booth mode */
body.booth .container { max-width: 1000px; padding: 20px 24px 40px; }
.a5-wrap { width:100%; overflow:hidden; }
.a5-scaler { width:148mm; }
body.booth .btn { min-height:60px; font-size:18px; }
body.booth .choice-card { min-height:60px; font-size:18px; }
body.booth .input, body.booth select { font-size:18px; padding:14px; }
body.booth .stepper button { min-width:60px; min-height:60px; font-size:24px; }
body.booth .consent-label { font-size:18px !important; }
body.booth .consent-label input { width:24px; height:24px; }
body.booth #resultView > .no-print:last-child { display:none !important; }
body.booth #a5Host { display:flex; justify-content:center; }
body.booth .a5-wrap { width:560px; max-width:100%; }

/* Booth slide wizard */
.booth-slider-wrap { display:none; margin-top:10px; }
.booth-slider { width:100%; height:48px; accent-color:var(--purple-vivid); cursor:pointer; -webkit-appearance:none; appearance:none; background:transparent; }
.booth-slider::-webkit-slider-runnable-track { height:10px; border-radius:999px; background:linear-gradient(90deg,var(--purple-deep),var(--purple-vivid)); }
.booth-slider::-webkit-slider-thumb { -webkit-appearance:none; width:36px; height:36px; margin-top:-13px; border-radius:50%; background:var(--purple-deep); border:4px solid #fff; box-shadow:0 2px 8px rgba(113,1,147,.35); }
.booth-slider::-moz-range-track { height:10px; border-radius:999px; background:linear-gradient(90deg,var(--purple-deep),var(--purple-vivid)); }
.booth-slider::-moz-range-thumb { width:30px; height:30px; border-radius:50%; background:var(--purple-deep); border:4px solid #fff; box-shadow:0 2px 8px rgba(113,1,147,.35); }
.slider-readout { text-align:center; font-size:34px; font-weight:900; color:var(--purple-deep); line-height:1.1; margin-top:2px; }
.slider-readout small { font-size:16px; color:var(--slate-muted); font-weight:700; }
.slider-hint { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:2px; font-size:15px; font-weight:700; color:var(--purple-soft); letter-spacing:.2px; }
.hint-arrow { display:inline-block; font-size:18px; color:var(--purple-vivid); }
.hint-arrow.left { animation:hintLeft 1.6s ease-in-out infinite; }
.hint-arrow.right { animation:hintRight 1.6s ease-in-out infinite; }
@keyframes hintLeft { 0%,100% { transform:translateX(0); opacity:.55; } 50% { transform:translateX(-6px); opacity:1; } }
@keyframes hintRight { 0%,100% { transform:translateX(0); opacity:.55; } 50% { transform:translateX(6px); opacity:1; } }
@media (prefers-reduced-motion: reduce) { .hint-arrow.left, .hint-arrow.right { animation:none; } }
#boothNav { display:none; }
html.booth-pending .container { max-width:1000px; padding:20px 24px 40px; }
html.booth-pending #formView > .card.section { display:none; }
html.booth-pending #submitBtn, html.booth-pending #formError { display:none; }
html.booth-pending .stepper { display:none; }
html.booth-pending .booth-slider-wrap { display:block; }
body.booth-wizard .container { min-height:100vh; display:flex; flex-direction:column; }
body.booth-wizard #formView { max-width:900px; width:100%; margin:0 auto; flex:1; display:flex; flex-direction:column; }
body.booth-wizard #formView > .card.section.active-slide { flex:1; }
body.booth-wizard #formView > .card.section { display:none; }
body.booth-wizard #formView > .card.section.active-slide { display:flex; flex-direction:column; justify-content:center; min-height:360px; }
body.booth-wizard .stepper { display:none; }
body.booth-wizard .booth-slider-wrap { display:block; }
body.booth-wizard #submitBtn, body.booth-wizard #formError { display:none; }
body.booth-wizard #boothNav { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:center; position:sticky; bottom:12px; background:rgba(243,236,249,.97); padding:10px 0; z-index:5; }
#boothNav .btn { width:auto; min-width:130px; }
.booth-step { text-align:center; }
.booth-step span { display:block; font-size:18px; font-weight:900; color:var(--purple-deep); }
.booth-step small { display:block; font-size:12px; color:var(--slate-muted); font-weight:700; }
/* A5 sheet (shared) */
.a5-sheet { width:148mm; min-height:210mm; height:210mm; background:#fff; position:relative; overflow:hidden; box-shadow:0 12px 35px rgba(30,27,46,.18); padding:5.5mm 6.5mm; background-image: radial-gradient(circle at 95% 4%, rgba(163,44,196,.13) 0%, transparent 40%), radial-gradient(circle at 4% 52%, rgba(152,103,197,.11) 0%, transparent 45%), radial-gradient(circle at 92% 95%, rgba(113,1,147,.12) 0%, transparent 42%); }
.bg-watermark { position:absolute; inset:0; pointer-events:none; opacity:.05; background-image:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M26 14h8v12h12v8H34v12h-8V34H14v-8h12V14z' fill='%23710193'/%3E%3C/svg%3E"); background-size:48px 48px; z-index:0; }
.content-layer { position:relative; z-index:1; display:flex; flex-direction:column; height:100%; justify-content:space-between; gap:6px; }
.report-section { display:flex; flex-direction:column; justify-content:space-between; flex:1; gap:7px; }
.lab-header { display:flex; align-items:center; gap:10px; padding-bottom:7px; border-bottom:2.5px solid var(--purple-deep); }
.logo-box { width:54px; height:54px; flex-shrink:0; border-radius:12px; background:var(--purple-tint); border:1.5px solid var(--purple-border); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.logo-box img { width:100%; height:100%; object-fit:contain; }
.lab-info { flex:1; }
.lab-info h1 { font-size:15.5px; font-weight:900; color:var(--purple-deep); line-height:1.15; }
.lab-info p { font-size:10.8px; color:var(--slate-muted); line-height:1.3; margin-top:2px; }
.event-pill { background:linear-gradient(135deg,var(--purple-deep),var(--purple-vivid)); color:#fff; font-size:9.5px; font-weight:800; padding:5px 10px; border-radius:999px; text-transform:uppercase; white-space:nowrap; }
.patient-bar { display:flex; justify-content:space-between; align-items:center; background:rgba(248,242,252,.96); border:1.5px solid var(--purple-border); border-radius:9px; padding:7px 11px; font-size:12px; flex-wrap:wrap; gap:4px; }
.patient-bar strong { color:var(--purple-deep); font-size:13px; }
.scores-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.score-card { background:#fff; border:1.5px solid var(--purple-border); border-radius:11px; padding:9px 11px; position:relative; overflow:hidden; display:flex; flex-direction:column; justify-content:space-between; }
.score-card::before { content:""; position:absolute; top:0;left:0;right:0; height:4px; background:linear-gradient(90deg,var(--purple-deep),var(--purple-soft)); }
.score-title { font-size:10.5px; font-weight:800; text-transform:uppercase; color:var(--slate-muted); }
.score-value-row { display:flex; align-items:center; justify-content:space-between; margin:5px 0 6px; }
.score-number { font-size:28px; font-weight:900; color:var(--purple-deep); line-height:1; }
.score-number small { font-size:14px; font-weight:700; color:var(--slate-muted); }
.risk-badge { font-size:9.8px; font-weight:800; padding:4px 8px; border-radius:999px; text-transform:uppercase; }
.risk-mod { background:#FEF3C7; color:#92400E; border:1px solid #F59E0B; }
.risk-low { background:#DCFCE7; color:#166534; border:1px solid #22C55E; }
.risk-high { background:#FEE2E2; color:#991B1B; border:1px solid #EF4444; }
.score-note { font-size:11px; color:var(--slate-muted); line-height:1.32; }
.message-box { background:linear-gradient(135deg, rgba(113,1,147,.06), rgba(163,44,196,.10)); border-left:4px solid var(--purple-vivid); border-radius:0 9px 9px 0; padding:8px 11px; }
.message-box .msg-heading { font-size:11.5px; font-weight:800; color:var(--purple-deep); margin-bottom:2px; }
.message-box p { font-size:11.8px; line-height:1.38; color:var(--slate-dark); }
.disclaimer-box { background:#F8FAFC; border:1px solid #CBD5E1; border-radius:7px; padding:6px 9px; font-size:10px; line-height:1.34; color:#475569; }
.disclaimer-box strong { color:#1E293B; }
.cut-divider { margin:2px 0; display:flex; align-items:center; gap:8px; color:var(--purple-deep); font-size:10.5px; font-weight:800; letter-spacing:.7px; flex-shrink:0; }
.cut-divider::before, .cut-divider::after { content:""; flex:1; border-top:2px dashed var(--purple-soft); }
.voucher-card { border:2.5px solid var(--purple-deep); border-radius:13px; background:#fff; position:relative; overflow:hidden; padding:10px 12px; box-shadow:0 4px 14px rgba(113,1,147,.10); display:flex; flex-direction:column; justify-content:space-between; flex:1.05; gap:7px; }
.voucher-card::before, .voucher-card::after { content:""; position:absolute; top:46px; width:16px; height:16px; background:#fff; border:2.5px solid var(--purple-deep); border-radius:50%; }
.voucher-card::before { left:-10px; } .voucher-card::after { right:-10px; }
.voucher-top { display:flex; justify-content:space-between; align-items:center; padding-bottom:7px; border-bottom:1.5px dashed var(--purple-border); }
.voucher-title-group .v-kicker { font-size:10px; font-weight:800; text-transform:uppercase; color:var(--purple-vivid); letter-spacing:.4px; }
.voucher-title-group .v-recipient { font-size:14.5px; font-weight:900; color:var(--slate-dark); margin-top:1px; }
.voucher-code-badge { background:var(--purple-tint); border:1.5px solid var(--purple-vivid); color:var(--purple-deep); padding:4px 11px; border-radius:8px; text-align:right; }
.voucher-code-badge span { display:block; font-size:8.5px; font-weight:700; text-transform:uppercase; color:var(--slate-muted); }
.voucher-code-badge strong { font-size:16px; font-weight:900; letter-spacing:.8px; }
.pkg-name { font-size:15.5px; font-weight:900; color:var(--purple-deep); }
.test-pills { display:flex; flex-wrap:wrap; gap:5px; }
.test-pill { background:var(--purple-tint); border:1px solid var(--purple-border); color:var(--slate-dark); font-size:10.8px; font-weight:700; padding:3.5px 9px; border-radius:6px; }
.price-banner { display:flex; align-items:center; justify-content:space-between; background:linear-gradient(135deg,var(--purple-deep),var(--purple-vivid)); color:#fff; border-radius:9px; padding:9px 13px; }
.price-left .orig-label { font-size:9.5px; opacity:.92; display:block; }
.price-left .orig-price { font-size:14.5px; text-decoration:line-through; opacity:.88; font-weight:700; }
.price-right { text-align:right; }
.price-right .promo-label { font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; display:block; color:#F3E8FF; }
.price-right .promo-price { font-size:22px; font-weight:900; letter-spacing:.3px; line-height:1.1; }
.voucher-terms { font-size:10.2px; line-height:1.38; color:var(--slate-muted); }
.voucher-terms ul { padding-left:16px; display:flex; flex-direction:column; gap:2.5px; }
.voucher-terms li strong { color:var(--purple-deep); }
@media print {
  body { background:#fff; padding:0; margin:0; }
  .no-print { display:none !important; }
  body.print-station > .container { display:none !important; }
  #printArea { display:block !important; }
  #printArea .a5-sheet { box-shadow:none; width:148mm; height:210mm; margin:0; page-break-after:auto; }
  .a5-sheet { box-shadow:none; width:148mm; height:210mm; margin:0; page-break-after:auto; }

  /* Main app result: print only the A5 voucher, never the form/header/buttons. */
  body.result-active:not(.print-station) .container { display:block !important; min-height:0 !important; max-width:none !important; width:auto !important; padding:0 !important; margin:0 !important; }
  body.result-active:not(.print-station) #app > .header,
  body.result-active:not(.print-station) #formView,
  body.result-active:not(.print-station) #resultView > .no-print { display:none !important; }
  body.result-active:not(.print-station) #resultView { display:block !important; }
  body.result-active:not(.print-station) #a5Host { display:block !important; }
  body.result-active:not(.print-station) .a5-wrap { width:auto !important; height:auto !important; overflow:visible !important; }
  body.result-active:not(.print-station) .a5-scaler { transform:none !important; }
}
@page { size: A5 portrait; margin:0; }
/* admin table */
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { padding:8px; border-bottom:1px solid var(--purple-border); text-align:left; }
th { background:var(--purple-tint); color:var(--purple-deep); }
.badge { padding:3px 8px; border-radius:999px; font-size:11px; font-weight:700; }
/* print station */
.queue-item { padding:10px; border:1.5px solid var(--purple-border); border-radius:10px; margin-bottom:8px; background:#fff; }
.toggle { display:flex; align-items:center; gap:8px; }
