/* Empfangs-iPad – ausgelegt auf iPad quer (1180×820), funktioniert auch hochkant */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}
input { -webkit-user-select: text; user-select: text; font: inherit; }
button { font: inherit; cursor: pointer; color: inherit; transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease; }
button:active { transform: scale(.98); }
button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(119, 151, 168, .6); outline-offset: 2px; }

.kiosk { height: 100vh; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); overflow: hidden; position: relative; }
.screen { height: 100%; }

.eyebrow { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
h1, h2 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -.01em; }

.watermark { position: absolute; pointer-events: none; opacity: .2; }

/* ---------- Animation ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(119,151,168,.7); } 70% { box-shadow: 0 0 0 12px rgba(119,151,168,0); } 100% { box-shadow: 0 0 0 0 rgba(119,151,168,0); } }
.rise { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.rise2 { animation: rise .5s .08s cubic-bezier(.2,.8,.2,1) both; }
.rise3 { animation: rise .5s .16s cubic-bezier(.2,.8,.2,1) both; }
.spin { animation: spin 18s linear infinite; }
@media (prefers-reduced-motion: reduce) { .rise, .rise2, .rise3, .spin, .pulse-dot { animation: none !important; } }

/* ---------- Einrichtung ---------- */
.setup { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px; text-align: center; }
.setup-logo { height: 48px; margin-bottom: 20px; }
.setup h1 { font-size: 40px; }
.setup p { font-size: 18px; color: var(--muted); max-width: 560px; line-height: 1.5; margin: 0; }
.setup-form { display: flex; gap: 12px; width: min(620px, 100%); margin-top: 8px; }
.setup-form input { flex: 1; height: 64px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 16px; font-size: 18px; background: var(--surface); }
.setup-error { color: var(--danger) !important; font-weight: 600; min-height: 1.5em; }
.btn-primary { height: 64px; padding: 0 28px; border: 0; border-radius: 16px; background: var(--deep); color: #fff; font-size: 18px; font-weight: 600; }

/* ---------- Willkommen ---------- */
.welcome { display: flex; gap: 20px; padding: 20px; }
.welcome-main { flex: 1; display: flex; flex-direction: column; padding: 36px 36px 28px 40px; min-width: 0; }
.welcome-logo { height: 46px; width: auto; align-self: flex-start; }
.welcome-copy { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.welcome h1 { font-size: clamp(54px, 6.8vw, 84px); line-height: .98; letter-spacing: -.015em; }
.welcome h1 .accent { color: var(--isa-text); }
.lead { margin: 0; font-size: 21px; line-height: 1.5; color: var(--muted); max-width: 480px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; font-weight: 500; }
.chip-n { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--deep); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.lang { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.seg { display: flex; padding: 4px; border-radius: 999px; background: var(--soft); }
.seg button { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(20,33,42,.12); }

.welcome-card { width: 40%; max-width: 480px; min-width: 380px; flex: none; border-radius: 32px; background: var(--deep); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 44px 40px 40px; }
.welcome-card .watermark { width: 620px; height: 620px; right: -230px; bottom: -210px; opacity: .22; }
.clock { position: relative; display: flex; flex-direction: column; gap: 6px; }
.clock-time { font-family: var(--font-display); font-size: clamp(80px, 9vw, 108px); line-height: 1; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 19px; color: var(--on-deep-muted); }
.welcome-cta { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.cta { height: 96px; border: 0; border-radius: 24px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 32px; box-shadow: 0 18px 40px rgba(8,20,28,.35); }
.cta > span:first-child { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.cta-arrow, .next-arrow { display: flex; align-items: center; justify-content: center; }
.cta-arrow { width: 68px; height: 68px; border-radius: 18px; background: var(--deep); color: #fff; }
.cta-arrow svg { width: 30px; height: 30px; stroke-width: 2.2; }
.cta-hint { font-size: 16px; color: var(--on-deep-muted); text-align: center; }

/* ---------- Schritte ---------- */
.flow { display: flex; gap: 8px; padding: 20px; }
.flow-side { width: 300px; flex: none; border-radius: 28px; background: var(--deep); color: #fff; position: relative; overflow: hidden; padding: 32px 28px 26px; display: flex; flex-direction: column; }
.flow-side .watermark { width: 420px; height: 420px; left: -150px; bottom: -170px; opacity: .18; }
.side-head { position: relative; display: flex; align-items: center; gap: 12px; }
.side-head img { width: 40px; height: 40px; }
.side-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.side-sub { font-size: 14px; color: var(--on-deep-muted); }
.steps { position: relative; list-style: none; margin: 44px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
.steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dot { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 16px; font-weight: 700; background: transparent; color: var(--on-deep-muted); border: 1.5px solid rgba(255,255,255,.35); }
.dot svg { width: 16px; height: 16px; stroke-width: 3; }
.step-label { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--on-deep-muted); }
.step-sub { font-size: 14px; color: var(--on-deep-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps li.is-active .dot { background: var(--isa); color: #fff; border-color: transparent; box-shadow: 0 0 0 5px rgba(119,151,168,.3); }
.steps li.is-done .dot { background: #fff; color: var(--deep); border-color: transparent; }
.steps li.is-active .step-label, .steps li.is-done .step-label { color: #fff; }
.btn-ghost-light { position: relative; margin-top: auto; height: 52px; border: 1px solid rgba(255,255,255,.35); border-radius: 14px; background: transparent; color: #fff; font-size: 16px; font-weight: 500; }

.flow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 30px 32px 4px 44px; }
.pane { display: flex; flex-direction: column; min-height: 0; }
.pane-head { display: flex; flex-direction: column; gap: 8px; }
.pane-head .eyebrow { font-size: 16px; letter-spacing: .2em; }
.pane-head h2 { font-size: 48px; line-height: 1.05; }

.fields { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field label, .field-label { font-size: 16px; font-weight: 600; }
.field input, .search input { height: 76px; padding: 0 22px; border: 1.5px solid var(--line); border-radius: 18px; font-size: 23px; background: var(--surface); color: var(--ink); }
.field input::placeholder, .search input::placeholder { color: #8A979E; }
.field input:focus, .search input:focus { outline: none; border-color: var(--deep); box-shadow: 0 0 0 4px rgba(119,151,168,.35); }

.types { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.type { min-height: 150px; padding: 20px; border-radius: 22px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 16px; background: var(--surface); border: 2px solid var(--line); text-align: left; }
.type-icon { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--deep); }
.type-icon svg { width: 26px; height: 26px; }
.type-text { display: flex; flex-direction: column; gap: 2px; }
.type-label { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.type-sub { font-size: 14px; color: var(--muted); }
.type[aria-pressed="true"] { border-color: var(--deep); box-shadow: var(--shadow); }
.type[aria-pressed="true"] .type-icon { background: var(--deep); color: #fff; }

.search { margin-top: 28px; position: relative; }
.search svg { position: absolute; left: 24px; top: 25px; width: 26px; height: 26px; color: var(--muted); stroke-width: 2.2; }
.search input { width: 100%; padding-left: 64px; }
.hosts { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.host { height: 88px; padding: 0 18px; border-radius: 20px; display: flex; align-items: center; gap: 16px; background: var(--surface); border: 2px solid var(--line); text-align: left; min-width: 0; }
.host[aria-pressed="true"] { border-color: var(--deep); box-shadow: var(--shadow); }
.avatar { width: 54px; height: 54px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 19px; font-weight: 700; color: #fff; background: var(--deep); }
.avatar.t1 { background: #3E5A69; } .avatar.t2 { background: #4F6F80; } .avatar.t3 { background: #2F4E5D; }
.host-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.host-name { font-family: var(--font-display); font-size: 21px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-dept { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-check { width: 32px; height: 32px; border-radius: 50%; background: var(--deep); color: #fff; display: none; align-items: center; justify-content: center; flex: none; }
.host-check svg { width: 16px; height: 16px; stroke-width: 3; }
.host[aria-pressed="true"] .host-check { display: flex; }
.hint { margin: 16px 0 0; font-size: 16px; color: var(--muted); }

.privacy { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.card { border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.card-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.privacy-text { background: var(--surface); border: 1px solid var(--line); font-size: 16px; line-height: 1.55; color: #33424B; }
.privacy-text p { margin: 0; }
.privacy-text .muted a { color: var(--deep); font-weight: 600; }
.summary { background: var(--soft); gap: 16px; }
.summary > div { display: flex; flex-direction: column; gap: 2px; }
.sum-label { font-size: 13px; color: var(--muted); }
.sum-value { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.accept { margin-top: 16px; display: flex; align-items: center; gap: 18px; min-height: 76px; padding: 0 24px; border-radius: 20px; cursor: pointer; font-size: 18px; font-weight: 600; background: var(--surface); border: 2px solid var(--line); }
.accept input { width: 30px; height: 30px; accent-color: var(--deep); flex: none; }
.accept.checked { border-color: var(--deep); }

.flow-error { margin: 12px 0 0; min-height: 1.4em; color: var(--danger); font-weight: 600; font-size: 16px; }
.flow-nav { margin-top: auto; padding: 12px 0 16px; display: flex; align-items: center; justify-content: space-between; }
.btn-back { height: 64px; padding: 0 26px; border: 0; border-radius: 18px; background: transparent; color: var(--deep); font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.btn-back svg { width: 22px; height: 22px; stroke-width: 2.2; }
.btn-next { height: 72px; padding: 0 12px 0 32px; border: 0; border-radius: 20px; background: var(--deep); color: #fff; font-family: var(--font-display); font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 20px; box-shadow: 0 12px 28px rgba(36,64,78,.28); }
.next-arrow { width: 50px; height: 50px; border-radius: 14px; background: rgba(255,255,255,.14); }
.next-arrow svg { width: 24px; height: 24px; stroke-width: 2.2; }

/* ---------- Fertig ---------- */
.screen.done { background: var(--deep); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 40px; }
.done .wm-a { width: 900px; height: 900px; left: -340px; top: -300px; opacity: .14; }
.done .wm-b { width: 520px; height: 520px; right: -170px; bottom: -200px; opacity: .14; }
.done-check { position: relative; width: 104px; height: 104px; border-radius: 50%; background: #fff; color: var(--deep); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 14px rgba(255,255,255,.1); }
.done-check svg { width: 52px; height: 52px; stroke-width: 2.6; }
.done-copy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.done-copy h2 { font-size: clamp(48px, 5.8vw, 68px); line-height: 1; letter-spacing: -.015em; }
.done-copy p { margin: 0; font-size: 21px; color: var(--on-deep-muted); }
.done-cards { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: min(780px, 100%); }
.done-host { background: #fff; color: var(--ink); border-radius: 24px; padding: 22px 24px; display: flex; align-items: center; gap: 18px; }
.done-host .avatar { width: 60px; height: 60px; background: var(--soft); color: var(--deep); font-size: 22px; }
.done-host > div, .done-print > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.done-host-name, .done-print-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.status { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--isa); flex: none; animation: pulse 1.6s infinite; }
.status.ok { color: var(--ok); font-weight: 600; }
.status.ok .pulse-dot { background: var(--ok-dot); animation: none; }
.status.wait { color: var(--warn); font-weight: 600; }
.status.wait .pulse-dot { background: #C7741B; animation: none; }
.done-print { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 24px; padding: 22px 24px; display: flex; align-items: center; gap: 18px; }
.print-icon { width: 60px; height: 60px; border-radius: 18px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; flex: none; }
.print-icon svg { width: 28px; height: 28px; }
.done-print-sub { font-size: 15px; color: var(--on-deep-muted); }
.done-print.print-ok { background: #fff; color: var(--ink); border-color: #fff; }
.done-print.print-ok .print-icon { background: var(--ok-soft); color: var(--ok); }
.done-print.print-ok .done-print-sub { color: var(--muted); }
.done-print.print-failed { background: #fff; color: var(--ink); border: 2px solid #E8A0A0; }
.done-print.print-failed .print-icon { background: var(--danger-soft); color: var(--danger); }
.done-print.print-failed .done-print-sub { color: var(--danger); font-weight: 600; }
.done-btn { margin-top: 6px; height: 60px; padding: 0 40px; border-width: 1.5px; border-color: rgba(255,255,255,.5); font-size: 18px; font-weight: 600; }

/* ---------- Hochkant / kleine Geräte ---------- */
@media (max-aspect-ratio: 1/1) {
  .welcome { flex-direction: column; }
  .welcome-card { width: auto; max-width: none; min-width: 0; min-height: 360px; }
  .flow { flex-direction: column; }
  .flow-side { width: auto; padding: 20px 24px; }
  .flow-side .steps, .flow-side .watermark { display: none; }
  .flow-side .btn-ghost-light { position: absolute; right: 20px; top: 16px; margin: 0; height: 44px; padding: 0 16px; }
  .flow-main { padding: 24px 8px 0; }
  .done-cards { grid-template-columns: 1fr; }
}

/* ---------- Besucherlabel (nur Druck) ----------
   Brother QL-820NWB mit DK-11234 (Namensschild, 60 × 86 mm, gestanzt), quer bedruckt.
   Druckbarer Bereich ca. 1,5 mm kleiner je Rand – Ränder unten im Innenabstand berücksichtigt. */
.label { display: none; }
@media print {
  @page { size: 86mm 60mm; margin: 0; }
  html, body { width: 86mm; height: 60mm; background: #fff; overflow: hidden; }
  .kiosk { display: none !important; }
  .label { display: flex; flex-direction: column; width: 86mm; height: 60mm; padding: 4mm 4.5mm 3.5mm; box-sizing: border-box; font-family: var(--font); color: #000; gap: 1mm; overflow: hidden; break-inside: avoid; }
  .label-head { display: flex; align-items: center; justify-content: space-between; }
  .label-head img { height: 6.5mm; width: auto; filter: grayscale(1) contrast(1.6); }
  .label-badge { padding: .8mm 2.2mm; background: #000; color: #fff; font-size: 8pt; font-weight: 700; letter-spacing: .12em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .label-name { margin-top: 3mm; font-family: var(--font-display); font-size: 20pt; font-weight: 700; line-height: 1.05; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .label-company { font-size: 11pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .label-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 3mm; border-top: .5mm solid #000; padding-top: 1.5mm; font-size: 8pt; }
  .label-foot div:first-child { min-width: 0; }
  .label-foot strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .label-foot div { display: flex; flex-direction: column; }
  .label-foot .right { text-align: right; }
}
