/* ========================================================================
   Tripboard – Clean Light Theme
   Akzent: Indigo #4f46e5 (sparsam). Rest neutral. Spacing 4/8/16/24/32.
   ===================================================================== */
:root{
  --bg:#f7f8fa; --surface:#ffffff; --surface-2:#f3f4f6;
  --text:#1f2937; --text-muted:#667085; --text-soft:#98a2b3;
  --border:#e5e7eb; --border-strong:#d1d5db;
  --accent:#4f46e5; --accent-hover:#4338ca; --accent-soft:#eef2ff;
  --danger:#dc2626; --danger-soft:#fef2f2;
  --success:#059669; --success-soft:#ecfdf5;
  --warn:#b45309; --warn-soft:#fffbeb;
  --radius:12px; --radius-sm:8px; --radius-pill:999px;
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md:0 4px 16px rgba(16,24,40,.08);
  --ring:0 0 0 3px rgba(79,70,229,.18);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px; line-height:1.55; -webkit-tap-highlight-color:transparent;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:640px; margin:0 auto; padding:16px 16px calc(40px + env(safe-area-inset-bottom))}
.loading{padding:64px 0; text-align:center; color:var(--text-muted)}

/* Lucide-Icons */
.lucide{width:18px; height:18px; stroke-width:2; flex:0 0 auto; vertical-align:-3px}
.meta .lucide,.who .lucide,.brand .lucide,.flight-link .lucide,.geo-hit .lucide{width:15px; height:15px}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border:1px solid var(--border); background:var(--surface); color:var(--text);
  border-radius:var(--radius-sm); padding:8px 14px; font-size:14px; font-weight:500;
  font-family:inherit; cursor:pointer; transition:background .12s, border-color .12s, color .12s;
}
.btn:hover{background:var(--surface-2); border-color:var(--border-strong)}
.btn:active{background:var(--border)}
.btn:focus-visible{outline:none; box-shadow:var(--ring)}
.btn:disabled{opacity:.55; cursor:default}
.btn-sm{padding:6px 10px; font-size:13px}
.btn-good{background:var(--accent); border-color:var(--accent); color:#fff}
.btn-good:hover{background:var(--accent-hover); border-color:var(--accent-hover)}
.btn-danger{color:var(--danger); border-color:var(--border)}
.btn-danger:hover{background:var(--danger-soft); border-color:#fca5a5}
.icon-btn{width:38px; height:38px; padding:0; flex:0 0 auto}
.icon-btn .lucide{width:19px; height:19px; vertical-align:0}
.btn-icon-sm{width:30px; height:30px; padding:0; border:none; background:transparent; color:var(--text-muted)}
.btn-icon-sm:hover{background:var(--surface-2); color:var(--text)}
.btn-icon-sm .lucide{width:17px; height:17px; vertical-align:0}

/* Inputs */
input,select,textarea{
  width:100%; border:1px solid var(--border); background:var(--surface); color:var(--text);
  border-radius:var(--radius-sm); padding:9px 12px; font-size:14px; font-family:inherit;
  transition:border-color .12s, box-shadow .12s;
}
input::placeholder,textarea::placeholder{color:var(--text-soft)}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--accent); box-shadow:var(--ring)}
textarea{resize:vertical; min-height:80px; line-height:1.5}
select{cursor:pointer}

/* Topbar */
.topbar{display:flex; align-items:center; gap:12px; margin-bottom:16px}
.brand{flex:1; display:flex; align-items:center; gap:8px; font-size:20px; font-weight:700; letter-spacing:0}
.brand-pin{color:var(--accent); display:inline-flex}
.trip-head{flex:1; min-width:0}
.trip-head-title{font-size:18px; font-weight:700; letter-spacing:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.trip-head-sub{font-size:13px; color:var(--text-muted); margin-top:2px}

.who{display:flex; align-items:center; gap:10px; font-size:14px; color:var(--text-muted); margin-bottom:16px}
.who b{color:var(--text); font-weight:600}

.banner{background:var(--warn-soft); border:1px solid #fde68a; color:#92400e;
  border-radius:var(--radius); padding:12px 16px; font-size:14px; line-height:1.5; margin-bottom:16px}
code{background:var(--surface-2); padding:1px 6px; border-radius:6px; font-size:13px; font-family:ui-monospace,monospace}

/* Reise-Karten */
.trip-grid{display:grid; grid-template-columns:1fr 1fr; gap:16px}
@media(max-width:480px){.trip-grid{grid-template-columns:1fr}}
.trip-card{display:flex; flex-direction:column; text-align:left; padding:0; overflow:hidden;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow);
  cursor:pointer; transition:box-shadow .14s, border-color .14s}
.trip-card:hover{box-shadow:var(--shadow-md); border-color:var(--border-strong)}
.trip-cover{padding:16px}
.trip-cover-title{font-size:16px; font-weight:600; color:var(--text); line-height:1.25}
.trip-cover-sub{font-size:13px; color:var(--text-muted); margin-top:4px}
.trip-foot{display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-top:1px solid var(--border)}
.trip-go{color:var(--text-soft); display:inline-flex}
.pill{font-size:12px; font-weight:600; padding:3px 9px; border-radius:var(--radius-pill); white-space:nowrap}
.pill-muted{background:var(--surface-2); color:var(--text-muted)}
.pill-warn,.pill-voting{background:var(--warn-soft); color:var(--warn)}
.pill-picked{background:var(--success-soft); color:#047857}
.pill-rejected{background:var(--danger-soft); color:#b91c1c}

.empty{grid-column:1/-1; text-align:center; padding:56px 16px; color:var(--text-muted)}
.empty-icon{display:flex; justify-content:center; margin-bottom:12px}
.empty-icon .lucide{width:40px; height:40px; stroke-width:1.5; color:var(--text-soft)}
.empty h2{margin:0 0 6px; font-size:18px; font-weight:600; color:var(--text)}
.empty p{margin:0 auto; font-size:14px; max-width:320px}

/* Members */
.members{display:flex; align-items:center; margin:0 0 16px}
.avatar{width:28px; height:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:600; color:#fff; border:2px solid var(--bg); margin-left:-8px}
.avatar:first-child{margin-left:0}
.member-count{font-size:13px; color:var(--text-muted); margin-left:10px}

/* Tabs */
.tabbar{display:flex; gap:8px; overflow-x:auto; margin-bottom:16px; padding-bottom:2px; scrollbar-width:none}
.tabbar::-webkit-scrollbar{display:none}
.tab{display:inline-flex; align-items:center; gap:6px; white-space:nowrap; flex:0 0 auto;
  padding:8px 12px; font-size:13px; font-weight:500; border-radius:var(--radius-sm);
  border:1px solid var(--border); background:var(--surface); color:var(--text-muted); cursor:pointer; transition:.12s}
.tab .lucide{width:16px; height:16px; vertical-align:0}
.tab:hover{background:var(--surface-2); color:var(--text)}
.tab.active{background:var(--accent-soft); border-color:var(--accent); color:var(--accent)}
.tab-n{font-size:12px; opacity:.7}

/* Panes */
.pane{display:none}
.pane.active{display:block}
.pane-head{display:flex; gap:8px; align-items:center; margin-bottom:16px}
.pane-head>div{display:flex; flex-direction:column; min-width:0; flex:1}
.pane-title{font-size:16px; font-weight:600; flex:1}
.page-kicker{font-size:12px; color:var(--text-muted); font-weight:500; margin-bottom:2px}
.search-wrap{flex:1; display:flex; align-items:center; gap:8px; min-width:0;
  border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); padding:0 12px}
.search-wrap .lucide{width:16px; height:16px; color:var(--text-soft)}
.search-wrap:focus-within{border-color:var(--accent); box-shadow:var(--ring)}
.search-wrap input{border:none; padding:9px 0; background:transparent}
.search-wrap input:focus{box-shadow:none}

/* Ideen: eine Seite, zwei klar getrennte Sammlungen */
.segment{display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; margin-bottom:12px;
  border-radius:var(--radius); background:var(--surface-2)}
.segment-btn{display:flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:8px 12px;
  border:0; border-radius:var(--radius-sm); background:transparent; color:var(--text-muted);
  font:500 14px Inter,system-ui,sans-serif; cursor:pointer}
.segment-btn.active{background:var(--surface); color:var(--accent); box-shadow:var(--shadow)}
.segment-btn .lucide{width:17px; height:17px; vertical-align:0}
.idea-pane{display:none}
.idea-pane.active{display:block}
.idea-search{margin-bottom:16px}

/* Organisierte Mehr-Seite */
.more-grid{display:grid; gap:8px}
.more-card{width:100%; min-height:72px; display:flex; align-items:center; gap:12px; padding:12px;
  border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text);
  box-shadow:var(--shadow); text-align:left; font:inherit; cursor:pointer}
.more-card:hover{border-color:var(--border-strong); box-shadow:var(--shadow-md)}
.more-card>span:nth-child(2){display:flex; flex:1; min-width:0; flex-direction:column; gap:2px}
.more-card strong{font-size:14px; font-weight:600}
.more-card small,.plan-entry small,.plan-stop small{display:block; color:var(--text-muted); font-size:12px; font-weight:400}
.more-icon{width:40px; height:40px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  border-radius:10px; background:var(--accent-soft); color:var(--accent)}
.more-icon .lucide{width:19px; height:19px; vertical-align:0}
.more-card>.lucide{color:var(--text-soft)}

/* Plan aus bereits vorhandenen Reiseinformationen */
.plan-summary{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px}
.plan-summary>div{display:flex; min-width:0; flex-direction:column; gap:3px}
.plan-summary strong{font-size:16px; font-weight:600}
.text-muted{font-size:13px; color:var(--text-muted)}
.plan-section{margin-top:24px}
.plan-section h3{margin:0 0 10px; font-size:15px; font-weight:600}
.plan-route{display:grid; position:relative}
.plan-stop{display:flex; align-items:center; gap:12px; min-height:58px; position:relative}
.plan-stop:not(:last-child)::after{content:""; position:absolute; left:15px; top:44px; bottom:-14px; width:2px; background:var(--border)}
.plan-stop>span:nth-child(2){display:flex; min-width:0; flex-direction:column; gap:2px}
.plan-stop strong,.plan-entry strong{font-size:14px; font-weight:600}
.plan-dot{width:32px; height:32px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%; background:var(--accent); color:#fff; font-size:12px; font-weight:600; z-index:1}
.plan-list{display:grid; gap:8px}
.plan-entry{display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--border);
  border-radius:var(--radius); background:var(--surface)}
.plan-entry>span:nth-child(2){display:flex; flex:1; min-width:0; flex-direction:column; gap:2px}

/* Cards / Sections */
.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); overflow:hidden; margin-bottom:16px}
.card-head{padding:16px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border)}
.card-title{display:flex; flex-direction:column; gap:2px; min-width:0}
.card-title strong{font-size:15px; font-weight:600}
.card-title span{font-size:13px; color:var(--text-muted)}
.map-ctl{display:flex; gap:8px; flex:0 0 auto}
#map{width:100%; height:320px; background:#eef2f7}
.map-pin{width:30px; height:30px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:600; font-size:14px; font-family:Inter,sans-serif; background:var(--accent);
  border:2px solid #fff; box-shadow:0 2px 6px rgba(79,70,229,.4)}

.panel{padding:16px}
.timeline{display:flex; flex-direction:column; gap:8px}
.stop{display:flex; gap:12px; align-items:center; padding:12px; border:1px solid var(--border); border-radius:var(--radius-sm);
  background:var(--surface); cursor:pointer; transition:background .12s, border-color .12s}
.stop:hover{background:var(--surface-2); border-color:var(--border-strong)}
.pin{width:28px; height:28px; border-radius:8px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  font-weight:600; font-size:13px; color:#fff; background:var(--accent)}
.stop-main{flex:1; min-width:0}
.stop-main h3{margin:0; font-size:14px; font-weight:600}
.stop-main p{margin:4px 0 0; font-size:13px; color:var(--text-muted)}
.muted{color:var(--text-soft); font-weight:400}
.hint{font-size:13px; color:var(--text-muted); line-height:1.5; padding:4px 0}

/* Gruppen (nach Stop, klappbar) */
.grouped{display:flex; flex-direction:column; gap:16px}
.grp{margin:0}
.grp summary{display:flex; align-items:center; gap:8px; padding:4px 2px 8px; cursor:pointer; list-style:none}
.grp summary::-webkit-details-marker{display:none}
.grp-name{font-size:14px; font-weight:600}
.grp-n{font-size:12px; font-weight:600; padding:1px 8px; border-radius:var(--radius-pill); background:var(--surface-2); color:var(--text-muted)}
.grp summary::after{content:""; width:8px; height:8px; margin-left:auto; border-right:2px solid var(--text-soft);
  border-bottom:2px solid var(--text-soft); transform:rotate(45deg); transition:transform .15s}
.grp:not([open]) summary::after{transform:rotate(-45deg)}
.grp-items,.board-list{display:flex; flex-direction:column; gap:8px}

/* Eintrags-Karten */
.item{display:flex; gap:12px; align-items:flex-start; padding:12px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); transition:border-color .12s}
.item:hover{border-color:var(--border-strong)}
.thumb{width:44px; height:44px; border-radius:var(--radius-sm); flex:0 0 auto; overflow:hidden;
  display:flex; align-items:center; justify-content:center; background:var(--surface-2); color:var(--text-muted)}
.thumb .lucide{width:20px; height:20px; vertical-align:0}
.thumb img{width:100%; height:100%; object-fit:cover}
.item-main{flex:1; min-width:0}
.item-top{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.item-top h4{margin:0; font-size:14px; font-weight:600}
.meta{margin-top:4px; color:var(--text-muted); font-size:13px; line-height:1.5}
.meta a{color:var(--accent); text-decoration:none; font-weight:500}
.meta a:hover{text-decoration:underline}
.meta b{color:var(--text); font-weight:600}
.note{margin-top:8px; font-size:13px; color:var(--text-muted); background:var(--bg); padding:8px 10px; border-radius:var(--radius-sm); line-height:1.5}
.item-foot{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:8px}
.item-actions{display:flex; gap:4px; flex:0 0 auto}

/* Abstimmung */
.vote-bar{display:flex; align-items:center; gap:6px}
.vote{display:inline-flex; align-items:center; gap:4px; padding:4px 8px; font-size:13px; font-weight:500;
  border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text-muted); cursor:pointer; transition:.12s}
.vote .lucide{width:15px; height:15px; vertical-align:0}
.vote:hover{border-color:var(--border-strong); color:var(--text)}
.vote.on{border-color:var(--accent); background:var(--accent-soft); color:var(--accent)}
.vote.down.on{border-color:var(--danger); background:var(--danger-soft); color:var(--danger)}
.vote.pick{color:var(--text-soft)}
.vote.pick.on{border-color:#f59e0b; background:var(--warn-soft); color:#b45309}

/* Flug-Karten */
.sub-h{font-size:13px; font-weight:600; color:var(--text-muted); margin:24px 2px 12px}
.flight{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:16px; margin-bottom:8px; cursor:pointer; transition:border-color .12s, box-shadow .12s}
.flight:hover{border-color:var(--border-strong); box-shadow:var(--shadow-md)}
.flight-top{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px}
.flight-kind{display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text-muted)}
.flight-kind .lucide{color:var(--accent); width:16px; height:16px; vertical-align:0}
.flight-price{font-size:15px; font-weight:600}
.flight-route{display:flex; align-items:center; gap:12px; font-size:20px; font-weight:600; letter-spacing:.01em}
.flight-route .arrow{color:var(--accent); display:inline-flex}
.flight-route .arrow .lucide{width:18px; height:18px; vertical-align:0}
.flight-when{font-size:13px; color:var(--text-muted); margin-top:8px}
.flight-link{display:inline-flex; align-items:center; gap:4px; margin-top:10px; font-size:13px; font-weight:500; color:var(--accent); text-decoration:none}
.flight-link:hover{text-decoration:underline}

/* Modal */
body.modal-open{overflow:hidden}
.modal-backdrop{position:fixed; inset:0; background:rgba(17,24,39,.45); z-index:9999;
  display:flex; align-items:flex-end; justify-content:center; padding:0}
@media(min-width:560px){.modal-backdrop{align-items:center; padding:24px}}
.modal{width:min(560px,100%); background:var(--surface); border-radius:16px 16px 0 0; box-shadow:var(--shadow-md);
  overflow:hidden; animation:rise .2s ease}
@media(min-width:560px){.modal{border-radius:16px}}
@keyframes rise{from{transform:translateY(16px); opacity:.7}to{transform:translateY(0); opacity:1}}
.modal-head{padding:16px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border)}
.modal-title{font-size:16px; font-weight:600}
.modal-sub{font-size:13px; color:var(--text-muted); margin-top:2px}
.modal-body{padding:16px; display:grid; grid-template-columns:1fr 1fr; gap:16px;
  max-height:calc(100vh - 220px); overflow-y:auto; -webkit-overflow-scrolling:touch}
@media(max-width:480px){.modal-body{grid-template-columns:1fr}}
.modal-body .full{grid-column:1/-1}
.modal-foot{padding:16px; display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; border-top:1px solid var(--border)}
.field{display:flex; flex-direction:column; min-width:0}
label{font-size:13px; font-weight:500; color:var(--text-muted); margin-bottom:6px; display:block}
.color-row{display:flex; gap:10px; flex-wrap:wrap}
.color-chip input{display:none}
.color-chip span{width:28px; height:28px; border-radius:50%; display:block; cursor:pointer; border:2px solid transparent; transition:transform .12s}
.color-chip input:checked + span{border-color:var(--text); transform:scale(1.12)}
.geo-row{display:flex; gap:8px}
.geo-row .btn{flex:0 0 auto}
.geo-results{display:flex; flex-direction:column; gap:6px; margin-top:8px}
.geo-hit{display:flex; align-items:center; gap:6px; text-align:left; font-size:13px; font-weight:500;
  padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); cursor:pointer; line-height:1.4}
.geo-hit:hover{background:var(--surface-2)}
.img-preview{width:100%; max-height:220px; overflow:hidden; border:1px solid var(--border); border-radius:var(--radius-sm)}
.img-preview img{width:100%; height:100%; object-fit:cover; display:block}

/* Leaflet im Light-Theme */
.leaflet-popup-content-wrapper{border-radius:var(--radius); box-shadow:var(--shadow-md); border:1px solid var(--border)}
.leaflet-popup-content{margin:12px 14px; font-family:Inter,sans-serif}
.leaflet-container{font-family:Inter,sans-serif}
.leaflet-control-attribution{font-size:11px}

/* Toast */
.toast{position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom)); transform:translate(-50%,16px);
  background:var(--text); color:#fff; padding:10px 16px; border-radius:var(--radius-sm); font-size:14px; font-weight:500;
  z-index:10000; opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; box-shadow:var(--shadow-md); max-width:90vw}
.toast.show{opacity:1; transform:translate(-50%,0)}
.toast.good{background:var(--accent)}
.toast.bad{background:var(--danger)}

/* Kasse */
.stat-grid{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:16px}
.stat-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:12px 16px;
  display:flex; flex-direction:column; gap:4px; box-shadow:var(--shadow)}
.stat-card span{font-size:13px; color:var(--text-muted)}
.stat-card strong{font-size:18px; font-weight:700}
.stat-card .pos,.bal-net.pos{color:var(--success)}
.stat-card .neg,.bal-net.neg{color:var(--danger)}
.bal-row{display:flex; align-items:center; gap:10px; padding:5px 0}
.bal-name{flex:1; font-size:14px; font-weight:500}
.bal-net{font-size:14px; font-weight:600}
.avatar.sm{width:24px; height:24px; font-size:10px; border:none; margin-left:0; flex:0 0 auto}
.settle-h{font-size:13px; font-weight:600; color:var(--text-muted); margin:12px 0 4px}
.settle-row{display:flex; align-items:center; gap:8px; padding:8px 12px; background:var(--accent-soft);
  border-radius:var(--radius-sm); margin-top:6px; font-size:14px; font-weight:500}
.settle-row .arrow{display:inline-flex; color:var(--accent)}
.settle-row .arrow .lucide{width:15px; height:15px; vertical-align:0}
.settle-amt{margin-left:auto; font-weight:700}
.check-row{display:flex; flex-wrap:wrap; gap:8px}
.check{display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:500;
  border:1px solid var(--border); border-radius:var(--radius-pill); padding:6px 12px; cursor:pointer}
.check input{width:auto; accent-color:var(--accent); margin:0}
.check:has(input:checked){border-color:var(--accent); background:var(--accent-soft); color:var(--accent)}

/* Packliste */
.pack-list{display:flex; flex-direction:column; gap:8px}
.pack-row{display:flex; align-items:center; gap:10px; padding:10px 12px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm)}
.pack-check{width:18px; height:18px; flex:0 0 auto; accent-color:var(--accent); cursor:pointer}
.pack-title{flex:1; font-size:14px; min-width:0}
.pack-done .pack-title{text-decoration:line-through; color:var(--text-soft)}

/* Kommentare */
.comments-list{display:flex; flex-direction:column; gap:12px; max-height:280px; overflow-y:auto; padding-right:4px}
.comment{display:flex; gap:8px; align-items:flex-start}
.comment-main{flex:1; min-width:0}
.comment-head{display:flex; align-items:center; gap:8px; font-size:13px}
.comment-head .btn-icon-sm{margin-left:auto; width:24px; height:24px}
.comment-body{font-size:14px; margin-top:2px; line-height:1.5; overflow-wrap:break-word}

/* Vote-Leader */
.pill-lead{background:var(--accent-soft); color:var(--accent); display:inline-flex; align-items:center; gap:4px}
.pill-lead .lucide{width:13px; height:13px; vertical-align:0}

/* Login */
.login{min-height:72vh; display:flex; align-items:center; justify-content:center; padding:24px 0}
.login-card{width:100%; max-width:360px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--shadow-md); padding:24px}
.login-brand{display:flex; align-items:center; gap:8px; font-size:18px; font-weight:700}
.login-brand .brand-pin{color:var(--accent)}
.login-title{font-size:22px; font-weight:700; margin:20px 0 4px}
.login-sub{font-size:14px; color:var(--text-muted); margin:0 0 24px}
.login-card .field{margin-bottom:16px}
.login-go{width:100%; margin-top:4px}
.login-hint{font-size:12px; color:var(--text-soft); margin-top:16px; line-height:1.5}

/* Mobile App Shell ------------------------------------------------------- */
@media(max-width:559px){
  html{scroll-padding-bottom:96px}
  body{overscroll-behavior-y:none}
  .wrap{
    width:100%; max-width:none; min-height:100dvh; margin:0;
    padding:12px 12px calc(96px + env(safe-area-inset-bottom));
  }

  /* Native App-Gefuehl: Kopf bleibt erreichbar, Hauptnavigation unten. */
  .topbar{
    position:sticky; top:0; z-index:1100;
    margin:-12px -12px 12px; padding:calc(10px + env(safe-area-inset-top)) 12px 10px;
    background:var(--bg); border-bottom:1px solid var(--border);
  }
  .members{margin-bottom:12px}
  .tabbar{
    position:fixed; z-index:1150; left:50%; bottom:0; transform:translateX(-50%);
    width:100%; max-width:640px; margin:0; padding:6px 6px calc(6px + env(safe-area-inset-bottom));
    gap:2px; background:var(--surface); border-top:1px solid var(--border);
    box-shadow:0 -4px 16px rgba(16,24,40,.08); scrollbar-width:none;
  }
  .tab{
    min-width:0; min-height:54px; padding:6px 2px; gap:2px; flex:1 1 0;
    flex-direction:column; justify-content:center; border:none; border-radius:8px;
    background:transparent; font-size:11px; line-height:1.15;
  }
  .tab .lucide{width:20px; height:20px}
  .tab.active{border:none; background:var(--accent-soft); color:var(--accent)}
  .tab-n{font-size:10px; line-height:1}

  /* 44px ist die robuste Mindestgroesse fuer haeufige Touch-Aktionen. */
  .btn{min-height:44px}
  .btn-sm{min-height:40px; padding:8px 10px}
  .icon-btn{width:44px; height:44px}
  .btn-icon-sm{width:40px; height:40px}
  input,select,textarea{font-size:16px; min-height:44px}
  .search-wrap input{min-height:42px}
  .vote{min-height:36px; padding:6px 9px}
  .pack-check{width:22px; height:22px}

  .pane-head{align-items:stretch; margin-bottom:12px}
  .pane-head .btn{flex:0 0 auto}
  .card,.grouped{margin-bottom:12px}
  .card-head,.panel{padding:12px}
  #map{height:clamp(300px,42dvh,420px); z-index:0}
  .item{padding:12px 10px}
  .item-actions{gap:2px}
  .item-foot{align-items:flex-end}

  /* Bottom-Sheets respektieren Browserleisten und Home-Indikator. */
  .modal-backdrop{padding-top:env(safe-area-inset-top)}
  .modal{
    max-height:calc(100dvh - env(safe-area-inset-top));
    display:flex; flex-direction:column;
  }
  .modal-head{flex:0 0 auto}
  .modal-body{flex:1 1 auto; min-height:0; max-height:none; padding:16px 12px}
  .modal-foot{
    flex:0 0 auto; padding:12px 12px calc(12px + env(safe-area-inset-bottom));
  }
  .modal-foot .btn{flex:1 1 auto}
  .toast{bottom:calc(88px + env(safe-area-inset-bottom))}
  .login{min-height:calc(100dvh - 120px); padding:8px 0}
  .login-card{padding:20px 16px}
}

@media(max-width:380px){
  .pane-head{flex-wrap:wrap}
  .pane-head .search-wrap{flex-basis:100%}
  .flight-route{font-size:18px; gap:8px}
  .stat-card{padding:12px}
}
