/* Einlass-Prototyp · Design nach der e4y-Check-in-App (Flutter, April 2026) */

:root {
  color-scheme: dark;
  --bg: var(--e4y-bg, #0a1020);
  --bg-bar: var(--e4y-bg-bar, rgba(10, 16, 32, 0.92));
  --surface: var(--e4y-surface, #141b33);
  --surface-muted: var(--e4y-surface-muted, #202a4d);
  --text: var(--e4y-text, #f4f5fa);
  --text-muted: var(--e4y-text-muted, #aeb5d1);
  --text-subtle: var(--e4y-text-subtle, #6e769a);
  --primary: var(--e4y-primary, #6c4dff);
  --primary-strong: var(--e4y-primary-strong, #8f63ff);
  --accent: var(--e4y-accent, #f146a3);
  --success: var(--e4y-success, #2ed3a7);
  --warning: var(--e4y-warning, #ffb84d);
  --danger: var(--e4y-danger, #ff7d8e);
  --line: var(--e4y-line, rgba(255, 255, 255, 0.08));
  --line-hi: var(--e4y-line-hi, rgba(143, 99, 255, 0.32));
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 320ms;
  --safe-t: env(safe-area-inset-top, 0px);
  /* iOS kann nach ausgeblendeter Browserleiste einen überhöhten Wert liefern. */
  --safe-b: min(env(safe-area-inset-bottom, 0px), 34px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --tabbar-h: 78px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior-y: none;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

/* ---------- Grundbausteine ---------- */

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-t)) calc(20px + var(--safe-r)) calc(var(--tabbar-h) + 28px + var(--safe-b)) calc(20px + var(--safe-l));
}

.page--plain {
  padding-bottom: calc(28px + var(--safe-b));
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.muted {
  color: var(--text-muted);
}

.subtle {
  color: var(--text-subtle);
}

.h-xl {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h-lg {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.h-md {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.panel {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.panel--glow {
  border-color: var(--line-hi);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(143, 99, 255, 0.22) 0%, transparent 55%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-muted) 100%);
}

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row--between {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Knöpfe ---------- */

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface-muted);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter var(--t) var(--ease), transform 160ms var(--ease), background-color var(--t) var(--ease);
}

.action:active {
  transform: scale(0.98);
}

.action:disabled {
  opacity: 0.5;
  cursor: default;
}

.action--block {
  width: 100%;
}

.action--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(108, 77, 255, 0.35);
}

.action--good {
  background: linear-gradient(135deg, #2ed3a7 0%, #22b58e 100%);
  color: #06241c;
  box-shadow: 0 10px 28px rgba(46, 211, 167, 0.3);
}

.action--warn {
  background: linear-gradient(135deg, #ffb84d 0%, #f59a1b 100%);
  color: #2a1a02;
  box-shadow: 0 10px 28px rgba(255, 184, 77, 0.3);
}

.action--ghost {
  background: var(--surface);
  border-color: var(--line);
}

.action--danger {
  background: rgba(255, 125, 142, 0.12);
  border-color: rgba(255, 125, 142, 0.35);
  color: var(--danger);
}

.action--small {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
}

@media (hover: hover) {
  .action:hover:not(:disabled) {
    filter: brightness(1.12);
  }
}

/* ---------- Formular ---------- */

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.field:focus-within {
  border-color: var(--primary-strong);
  box-shadow: 0 0 0 3px rgba(143, 99, 255, 0.22);
}

.field svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.field input {
  flex: 1;
  min-width: 0;
  height: 54px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  outline: none;
}

.field input::placeholder {
  color: var(--text-subtle);
}

.alert {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 125, 142, 0.35);
  background: rgba(255, 125, 142, 0.1);
  color: var(--danger);
}

/* ---------- Anmeldung ---------- */

.login {
  /* Die Browserleisten dürfen die Anmeldung nicht nachträglich verschieben. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(90% 55% at 50% 0%, rgba(108, 77, 255, 0.35) 0%, transparent 70%), var(--bg);
}

.login .page {
  padding-bottom: calc(28px + var(--safe-b));
}

.login-icon {
  display: block;
  align-self: center;
  margin-inline: auto;
  width: 112px;
  height: 112px;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(241, 70, 163, 0.35);
}

.login-title {
  text-align: center;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  font-size: 13px;
  color: var(--text-subtle);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* ---------- Eventwahl ---------- */

.topbar-title {
  margin: 0 0 22px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.event-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.event-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t) var(--ease), transform 160ms var(--ease);
}

.event-card:active {
  transform: scale(0.99);
}

.event-card.is-live {
  border-color: var(--line-hi);
}

@media (hover: hover) {
  .event-card:hover {
    border-color: var(--line-hi);
  }
}

.event-card .eyebrow {
  color: var(--tone, var(--primary-strong));
}

.event-card .h-md {
  margin-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip--live {
  background: rgba(46, 211, 167, 0.14);
  color: var(--success);
}

.chip--good {
  background: rgba(46, 211, 167, 0.14);
  color: var(--success);
}

.chip--warn {
  background: rgba(255, 184, 77, 0.14);
  color: var(--warning);
}

.chip--bad {
  background: rgba(255, 125, 142, 0.14);
  color: var(--danger);
}

.chip--muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-subtle);
}

.meter {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bar {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: var(--surface-muted);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--tone, var(--primary-strong));
  transition: width 600ms var(--ease);
}

.bar--grad > span {
  background: var(--grad);
}

/* ---------- Kopf mit Avatar ---------- */

.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.initials {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(143, 99, 255, 0.14);
  color: var(--tone, var(--primary-strong));
  font-size: 15px;
  font-weight: 700;
}

.initials--lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 18px;
}

/* ---------- Kennzahlen ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.kpi {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.kpi span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.kpi strong.accent {
  color: var(--primary-strong);
}

/* ---------- Scanner öffnen ---------- */

.cta {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--grad);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(108, 77, 255, 0.35);
  transition: filter var(--t) var(--ease), transform 160ms var(--ease);
}

.cta:active {
  transform: scale(0.99);
}

@media (hover: hover) {
  .cta:hover {
    filter: brightness(1.08);
  }
}

.cta-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
}

.cta-icon svg {
  width: 28px;
  height: 28px;
}

.cta > svg {
  flex: none;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.cta strong {
  display: block;
  font-size: 18px;
}

.cta small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  opacity: 0.85;
}

/* ---------- Listen ---------- */

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list > li + li {
  border-top: 1px solid var(--line);
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.list-item strong {
  display: block;
  font-size: 16px;
}

.list-item small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

.time {
  font-size: 13px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.link {
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--primary-strong);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.empty {
  margin: 0;
  padding: 18px 0 4px;
  color: var(--text-subtle);
  font-size: 14px;
}

/* ---------- Gästeliste ---------- */

.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.filter {
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.filter[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
}

.guests {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guest {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.guest strong {
  display: block;
}

.guest small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

.guest-state {
  display: grid;
  justify-items: end;
  gap: 4px;
}

/* ---------- Scanner ---------- */

.scanner-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  margin-bottom: 18px;
}

.scanner-head h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--warning);
  cursor: pointer;
}

.icon-btn[aria-pressed="true"] {
  background: rgba(255, 184, 77, 0.16);
}

.viewport {
  position: relative;
  /* Fläche steht schon vor Kamerafreigabe und Videometadaten fest. */
  width: 100%;
  height: 0;
  padding-top: 108%;
  border-radius: 28px;
  background: #000;
  overflow: hidden;
}

/* Das Video bleibt die Quelle für Vorschau und QR-Erkennung. Die sichtbare
   Vorschau wird zugeschnitten gezeichnet, ohne den nativen iOS-Video-Layer. */
.viewport video,
.viewport canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.viewport video {
  opacity: 0;
}

.frame {
  position: absolute;
  inset: 22%;
  pointer-events: none;
}

.frame i {
  position: absolute;
  width: 18%;
  height: 18%;
  border: 4px solid var(--primary-strong);
  filter: drop-shadow(0 0 8px rgba(143, 99, 255, 0.6));
}

.frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }

.frame b {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-strong), transparent);
  box-shadow: 0 0 14px rgba(143, 99, 255, 0.9);
  animation: sweep 2.4s ease-in-out infinite;
}

.viewport.is-busy .frame b {
  animation-play-state: paused;
  opacity: 0.4;
}

@keyframes sweep {
  0%, 100% { transform: translateY(-120px); }
  50% { transform: translateY(120px); }
}

.scan-status {
  min-height: 22px;
  margin: 14px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.scan-status[data-level="bad"] {
  color: var(--danger);
}

/* ---------- Ergebnis ---------- */

.result {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: calc(16px + var(--safe-t)) calc(20px + var(--safe-r)) calc(20px + var(--safe-b)) calc(20px + var(--safe-l));
  background: var(--bg);
  overflow-y: auto;
  animation: rise 280ms var(--ease);
}

.result::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 60%;
  background: radial-gradient(90% 75% at 50% 0%, var(--glow) 0%, transparent 72%);
  pointer-events: none;
}

.result[data-level="good"] { --tone: var(--success); --glow: rgba(46, 211, 167, 0.34); }
.result[data-level="warn"] { --tone: var(--warning); --glow: rgba(255, 184, 77, 0.3); }
.result[data-level="bad"] { --tone: var(--danger); --glow: rgba(255, 125, 142, 0.32); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.result > * {
  position: relative;
}

.result-inner {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.result-top {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
}

.result-top h2 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

.close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
}

.badge {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 18px auto 0;
  border-radius: 50%;
  border: 2px solid var(--tone);
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  color: var(--tone);
}

.result-title {
  margin: 20px 0 6px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--tone);
}

.result-sub {
  margin: 0 0 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.facts span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.facts strong {
  display: block;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.note {
  align-self: center;
  margin: 18px 0 0;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  color: var(--tone);
  font-size: 14px;
  text-align: center;
}

.result-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.result-actions .action:only-child {
  grid-column: 1 / -1;
}

/* ---------- Statistik ---------- */

.big {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 10px 0 4px;
}

.big strong {
  font-size: 64px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.big span {
  font-size: 26px;
  color: var(--text-muted);
}

.type-row + .type-row {
  margin-top: 14px;
}

.type-row .row {
  font-weight: 600;
}

.type-row b {
  color: var(--tone);
  font-variant-numeric: tabular-nums;
}

.type-row .bar {
  margin-top: 8px;
}

.hours {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 8px;
  height: 150px;
  margin-top: 18px;
}

.hours div {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
  text-align: center;
}

.hours i {
  align-self: end;
  display: block;
  min-height: 6px;
  border-radius: 8px 8px 4px 4px;
  background: var(--surface-muted);
}

.hours i.is-peak {
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
}

.hours small {
  font-size: 11px;
  color: var(--text-subtle);
}

/* ---------- Mehr ---------- */

.menu {
  display: grid;
  gap: 10px;
}

.menu .action {
  justify-content: flex-start;
}

/* ---------- Reiterleiste ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 112px));
  justify-content: center;
  padding: 8px calc(6px + var(--safe-r)) clamp(10px, var(--safe-b), 22px) calc(6px + var(--safe-l));
  border-top: 1px solid var(--line);
  background: var(--bg-bar);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.tab {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t) var(--ease);
}

.tab svg {
  width: 24px;
  height: 24px;
}

.tab[aria-current="page"] {
  color: var(--primary-strong);
}

.tab--scan span:first-child {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-top: -26px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 26px rgba(108, 77, 255, 0.45);
}

.tab--scan svg {
  width: 28px;
  height: 28px;
}

/* ---------- Test-Tickets ---------- */

.tickets {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ticket {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.ticket .qr {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
}

.ticket .qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 22px + var(--safe-b));
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  font-size: 14px;
  animation: rise 240ms var(--ease);
}

@media (max-width: 400px) {
  .panel {
    padding: 16px;
  }
  .kpis {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* Seitliche Übergänge dürfen die Seite nicht horizontal verbreitern. */
html {
  overflow-x: clip;
  scrollbar-gutter: stable;
}

/* Die bewegte Ansicht bleibt innerhalb ihrer unveränderten Layoutbreite. */
#view {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

/* Ein gemeinsamer Bildschirmrahmen: Nur die Ansicht scrollt, die Navigation
   bleibt als eigene Zeile darunter und hängt nicht am Dokument-Scrollstand. */
html:has(body.einlass-app) {
  height: 100%;
  overflow: hidden;
  scrollbar-gutter: auto;
}

body.einlass-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: var(--app-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}

.einlass-app #view {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden auto;
  overscroll-behavior-y: none;
  scrollbar-gutter: stable;
}

.einlass-app .page {
  padding-bottom: 28px;
}

.einlass-app .tabbar {
  position: relative;
  flex: 0 0 auto;
}
