/* Koppeln/Teilen – Header-Button, GPS-Banner, Bottom-Sheet. */

.pair-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--card2); color: var(--text); font-size: var(--fs-sm); font-weight: var(--fw-bold); cursor: pointer; }
.pair-btn.is-on { color: #34d399; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .12); }
.pair-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: pulse 1.6s ease-in-out infinite; }

/* GPS-Banner (nicht blockierend, unter dem Header) */
.gps-banner { position: absolute; left: 50%; transform: translateX(-50%); top: calc(66px + env(safe-area-inset-top)); z-index: 1150; display: flex; align-items: center; gap: 10px; max-width: 92%; padding: 10px 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: var(--text); font-size: var(--fs-sm); font-weight: var(--fw-med); cursor: pointer; box-shadow: var(--shadow); }
.gps-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gps-cta { flex: none; padding: 4px 11px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: var(--fw-bold); font-size: var(--fs-cap); }
.gps-banner--denied, .gps-banner--error { color: #fca5a5; }
.gps-banner--denied .gps-cta, .gps-banner--error .gps-cta { background: #ef4444; }

/* „Koppeln"-Kachel in der Mitglieder-Leiste */
.member--add { border-style: dashed; background: transparent; }
.add-plus { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px dashed var(--border); display: grid; place-items: center; font-size: 20px; color: var(--text-muted); }

/* Bottom-Sheet */
.sheet-overlay { position: absolute; inset: 0; z-index: 1400; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { position: relative; width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-bottom: 0; border-top-left-radius: var(--r-xl); border-top-right-radius: var(--r-xl); padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: sheet-up .28s var(--ease-spring); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 4px auto 14px; }
.sheet-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--card2); color: var(--text-muted); font-size: 15px; cursor: pointer; }
.sheet-title { font-size: var(--fs-t2); font-weight: var(--fw-heavy); }
.sheet-sub { font-size: var(--fs-sm); color: var(--text-muted); margin: 6px 0 16px; line-height: 1.5; }

.code-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--card2); margin-bottom: 16px; }
.code-val { flex: 1; font-size: 26px; font-weight: var(--fw-heavy); letter-spacing: .14em; font-family: ui-monospace, monospace; }
.code-share { flex: none; padding: 10px 18px; border: 0; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: var(--fw-bold); cursor: pointer; }

.mem-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.mem-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--card2); }
.mem-dot { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; border: 2px solid rgba(255, 255, 255, .5); }
.mem-name { flex: 1; font-weight: var(--fw-bold); }
.mem-when { font-size: var(--fs-cap); color: var(--text-muted); }
.mem-when.live { color: #34d399; }

.field { width: 100%; padding: 13px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: var(--fs-base); font-family: inherit; margin-bottom: 12px; }
.field:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.pick-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pick { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border); background: var(--card2); font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.pick.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent); }

.btn-primary { width: 100%; padding: 14px; border: 0; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--accent), #7c5cff); color: #fff; font-size: var(--fs-base); font-weight: var(--fw-bold); cursor: pointer; box-shadow: 0 6px 18px rgba(var(--accent-rgb), .35); }
.btn-secondary { flex: none; padding: 13px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card2); color: var(--text); font-weight: var(--fw-bold); cursor: pointer; }
.btn-danger { width: 100%; padding: 13px; border: 1px solid rgba(248, 113, 113, .4); border-radius: var(--r-pill); background: rgba(248, 113, 113, .12); color: #fca5a5; font-weight: var(--fw-bold); cursor: pointer; }
.btn-primary:active, .btn-secondary:active, .btn-danger:active, .code-share:active { transform: scale(.97); }
.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled { opacity: .6; }

.or { display: flex; align-items: center; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.or span { padding: 0 12px; }
.join-row { display: flex; gap: 10px; align-items: flex-start; }
.join-row .field { margin-bottom: 0; text-transform: uppercase; letter-spacing: .1em; }
.sheet-msg { margin-top: 12px; text-align: center; font-size: var(--fs-sm); color: var(--accent); font-weight: var(--fw-bold); }

/* Header-Aktionen + Zahnrad */
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--card2); color: var(--text); font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.icon-btn:active { transform: scale(.92); }

/* Einstellungs-Sheet */
.set-section { margin-bottom: 22px; }
.set-head { font-size: var(--fs-sm); font-weight: var(--fw-heavy); color: var(--text-muted); margin-bottom: 10px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--card2); margin-bottom: 8px; }
.set-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row-title { font-weight: var(--fw-bold); }
.set-row-sub { font-size: var(--fs-cap); color: var(--text-muted); line-height: 1.4; }
.set-status { flex: none; font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.set-status.on { color: #34d399; }
.set-status.off { color: #f87171; }
.btn-secondary.full { width: 100%; margin-top: 4px; }

.toggle { position: relative; width: 46px; height: 28px; flex: none; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle .track { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--border); transition: background .2s; pointer-events: none; }
.toggle .track::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::before { transform: translateX(18px); }

/* Profil-Editor (Foto + Name + Marker) */
.prof { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.prof-av { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--c); background: var(--card2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.prof-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.prof-emoji { font-size: 38px; }
.prof-cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; border: 2px solid var(--card); }
.prof-name { margin-top: 14px; text-align: center; margin-bottom: 0; }
.prof .pick-row { justify-content: center; margin-top: 12px; margin-bottom: 0; }

/* Avatare in den Listen */
.member-emoji { overflow: hidden; }
.member-emoji .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mem-dot { overflow: hidden; }
.mem-dot img { width: 100%; height: 100%; object-fit: cover; }
