* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: #0f172a;
       color: #e2e8f0; display: flex; min-height: 100vh; align-items: center;
       justify-content: center; padding: 1.5rem; }
.card { background: #1e293b; border-radius: 16px; padding: 2.5rem 2rem;
        max-width: 380px; width: 100%; text-align: center;
        box-shadow: 0 10px 40px rgba(0,0,0,.4); }
h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.subline { font-size: 1rem; color: #94a3b8; margin-bottom: 1.25rem; }
.hint { font-size: .9rem; color: #94a3b8; margin-bottom: 1.5rem; }
.hint-small { font-size: .8rem; color: #64748b; margin-top: .5rem; margin-bottom: 1rem; }
.btn { width: 100%; padding: 1rem; font-size: 1.05rem; font-weight: 600;
       border: none; border-radius: 10px; cursor: pointer; color: #fff;
       background: #2563eb; transition: background .15s; margin-top: .75rem; }
.btn:first-of-type { margin-top: 0; }
.btn:hover { background: #1d4ed8; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: #334155; }
.btn-secondary:hover { background: #475569; }
.btn-hangup { background: #dc2626; }
.btn-hangup:hover { background: #b91c1c; }
.btn-back { background: #334155; font-size: .9rem; padding: .75rem; margin-top: 1rem; }
.btn-back:hover { background: #475569; }
.status { margin-top: 1.25rem; font-size: .9rem; color: #94a3b8; }
.error-msg { font-size: 1rem; color: #f87171; margin-bottom: 1rem; }
.qr-img { width: 200px; height: 200px; border-radius: 8px;
           background: #fff; padding: 8px; margin: 0 auto 0.5rem; display: block; }
.edge-warn { position: fixed; top: 0; left: 0; right: 0; z-index: 10;
             background: #b45309; color: #fff; font-size: .9rem; line-height: 1.4;
             padding: .75rem 1rem; text-align: center;
             box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.edge-warn b { font-weight: 700; }
.edge-copy { display: inline-block; margin-top: .5rem; padding: .4rem .9rem;
             font-size: .85rem; font-weight: 600; border: none; border-radius: 6px;
             cursor: pointer; background: #fff; color: #b45309; }
.edge-copy:hover { background: #fde68a; }
/* Dezenter Info-Hinweis (Edge erkannt) — bewusst NICHT alarmrot wie .edge-warn,
   sondern ruhiges Blau passend zur Button-Palette. Blockiert nichts. */
.edge-hint { position: fixed; top: 0; left: 0; right: 0; z-index: 9;
             display: flex; align-items: center; gap: .75rem;
             background: #1e3a5f; color: #dbeafe; font-size: .85rem; line-height: 1.4;
             padding: .6rem 1rem; text-align: left;
             box-shadow: 0 2px 12px rgba(0,0,0,.3); }
/* display:flex wuerde sonst das native [hidden] (display:none) ueberschreiben
   -> Banner waere immer sichtbar. Diese Regel stellt das Verstecken sicher. */
.edge-hint[hidden] { display: none; }
.edge-hint-text { flex: 1; }
.edge-hint b { font-weight: 700; color: #fff; }
.edge-hint-close { flex: none; border: none; border-radius: 6px; cursor: pointer;
                   background: transparent; color: #dbeafe; font-size: 1rem;
                   line-height: 1; padding: .25rem .5rem; }
.edge-hint-close:hover { background: rgba(255,255,255,.12); color: #fff; }

/* --- Video-Anruf --- */
/* Container: relative, damit #localVideo unten rechts ueber #remoteVideo liegt.
   display:flex column; das native [hidden] muss flex ueberschreiben (s.u.). */
#videoContainer { position: relative; display: flex; flex-direction: column;
                  margin-bottom: 1rem; }
#videoContainer[hidden] { display: none; }
#remoteVideo { width: 100%; max-height: 200px; border-radius: 10px;
               background: #0f172a; object-fit: cover; }
#localVideo { position: absolute; bottom: 8px; right: 8px;
              width: 80px; height: 60px; border-radius: 6px;
              background: #0f172a; object-fit: cover;
              border: 1px solid #334155; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
/* Kamera-Toggle: ruhiges Label passend zur subline/hint-Palette. */
.toggle-label { display: flex; align-items: center; justify-content: center;
                gap: .5rem; font-size: .9rem; color: #94a3b8;
                margin: .25rem 0 1rem; cursor: pointer; user-select: none; }
.toggle-label input { width: 1rem; height: 1rem; cursor: pointer; accent-color: #2563eb; }
.toggle-label-disabled { opacity: .5; cursor: not-allowed; }
.toggle-label-disabled input { cursor: not-allowed; }

/* --- E-Mail-Eingabe --- */
.email-input { width: 100%; padding: .75rem 1rem; font-size: .95rem;
               border: 1.5px solid #334155; border-radius: 10px;
               background: #0f172a; color: #e2e8f0; outline: none;
               margin-bottom: .5rem; transition: border-color .15s; }
.email-input::placeholder { color: #64748b; }
.email-input:focus { border-color: #2563eb; }
.email-input.email-invalid { border-color: #dc2626; }

/* --- Erreichbarkeits-Anzeige --- */
.reach { margin-top: 1.25rem; }
.reach[hidden] { display: none; }
.reach-label { font-size: .9rem; font-weight: 600; margin-bottom: .5rem; }
.reach-label.is-green { color: #22c55e; }
.reach-label.is-amber { color: #eab308; }
.reach-label.is-red   { color: #f87171; }
/* Gradient-Stops so gelegt, dass die Marker-Position (posForHour) farblich zur
   Status-Stufe passt: 12:00 -> ~46% (gelblich), 22:00 -> ~84% (rot). */
.reach-bar { position: relative; height: 10px; border-radius: 5px;
             background: linear-gradient(to right,
               #22c55e 0%, #22c55e 40%, #eab308 50%, #eab308 78%,
               #f59e0b 82%, #dc2626 88%, #dc2626 100%); }
.reach-marker { position: absolute; top: 50%; left: 0; width: 4px; height: 18px;
                border-radius: 2px; background: #fff; transform: translate(-50%,-50%);
                box-shadow: 0 0 4px rgba(0,0,0,.6); transition: left .4s ease; }
.reach-scale { display: flex; justify-content: space-between;
               font-size: .7rem; color: #64748b; margin-top: .35rem; }
.reach-time { font-size: .75rem; color: #64748b; margin-top: .4rem; }
