:root {
  --bg: #f4f5f2; --card: #ffffff; --text: #1b1f22; --muted: #5f676d; --line: #dfe2dc;
  --accent: #0f5f8a; --accent-ink: #ffffff; --accent-soft: #e2eef5;
  --cg: #e2540f; --ok: #237a45; --ok-soft: #e1f2e7; --danger: #b3261e;
  --radius: 14px; --tabh: 62px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b; --card: #1f2327; --text: #eceeec; --muted: #9aa3a9; --line: #30363b;
    --accent: #5fb2e0; --accent-ink: #0c1a22; --accent-soft: #1d3342;
    --cg: #ff7a3d; --ok: #6fcf94; --ok-soft: #1c3526; --danger: #ff8a80;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  padding-bottom: calc(var(--tabh) + env(safe-area-inset-bottom) + 16px);
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1.h-sm { font-size: 1.15rem; }
h2 { font-size: 1.1rem; margin: 0 0 .7rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
h3 { font-size: .95rem; margin: 1.2rem 0 .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Header / Navigation */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 1px solid var(--line); padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: .45rem; font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.05rem; }
.brand svg { color: var(--accent); transform: rotate(45deg); }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabh) + env(safe-area-inset-bottom));
}
.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--accent); }
@media (min-width: 760px) {
  body { padding-bottom: 32px; }
  .tabs { position: static; height: auto; border: 0; background: none; padding: 0; gap: 4px; }
  .tabs a { flex-direction: row; gap: 6px; font-size: .9rem; padding: 6px 12px; border-radius: 99px; }
  .tabs a svg { width: 18px; height: 18px; }
  .tabs a.on { background: var(--accent-soft); }
}

.wrap { max-width: 760px; margin: 0 auto; padding: 14px 16px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; min-height: 44px; }
.back { text-decoration: none; font-weight: 600; font-size: 1.02rem; padding: 8px 0; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
section[id] { scroll-margin-top: 100px; }
.flash { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.flash.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.empty { text-align: center; padding: 28px 18px; }
.empty .btn { margin-top: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  white-space: nowrap; flex: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: transparent; }
.btn.block { width: 100%; flex: 1 1 auto; }
.btn:active { transform: scale(.98); }
.icon { border: 0; background: none; color: var(--muted); font-size: 1.5rem; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; flex: none; }
.icon:hover { background: var(--bg); color: var(--danger); }
.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; padding: 0; cursor: pointer; text-decoration: underline; }
.btnrow, .actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.actions-row { justify-content: center; margin: 18px 0 6px; }

/* Liste */
.search { width: 100%; margin-bottom: 12px; }
.plane-list { display: flex; flex-direction: column; gap: 10px; }
.plane-item {
  display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; text-decoration: none; color: var(--text);
}
.plane-item img, .plane-item .ph { width: 84px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.plane-item .ph { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.plane-item .ph svg { width: 30px; transform: rotate(45deg); }
.plane-item .ph.batt { font-weight: 800; font-size: 1.3rem; }
.pi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pi-body strong { font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { font-size: 1.6rem; color: var(--muted); padding-right: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); vertical-align: middle; }
.chip.cg { color: var(--cg); border-color: color-mix(in srgb, var(--cg) 35%, transparent); background: color-mix(in srgb, var(--cg) 9%, transparent); }
.chip.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }

/* Detail */
.hero { margin-bottom: 12px; }
.hero img { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 12px; cursor: zoom-in; }
.jump {
  position: sticky; top: calc(env(safe-area-inset-top) + 41px); z-index: 10; display: flex; gap: 6px; overflow-x: auto;
  padding: 8px 0; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; background: var(--bg); scrollbar-width: none;
}
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; padding: 7px 13px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--text); }
.bigval { font-size: 1.1rem; font-weight: 600; color: var(--cg); }
.bigval span { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.markwrap { position: relative; margin-top: 12px; border-radius: 10px; overflow: hidden; line-height: 0; }
.markwrap img { width: 100%; display: block; cursor: zoom-in; }
.markwrap.editable img { cursor: crosshair; }
.cgmark {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  background:
    conic-gradient(var(--cg) 0 25%, #fff 0 50%, var(--cg) 0 75%, #fff 0);
  border: 2px solid var(--cg); box-shadow: 0 0 0 3px rgba(255,255,255,.8), 0 2px 8px rgba(0,0,0,.4);
}
.pack { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.pack:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.pack-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pack-head strong { font-size: 1.05rem; }
.ftime { text-align: right; flex: none; }
.ftime span { display: block; font-size: 1.7rem; font-weight: 800; color: var(--accent); line-height: 1; }
.ftime small { color: var(--muted); font-size: .72rem; }
.packimg { width: 100%; border-radius: 10px; margin-top: 10px; cursor: zoom-in; display: block; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; }
.kv dt { color: var(--muted); font-size: .88rem; padding-top: 1px; }
.kv dd { margin: 0; font-weight: 500; }
.slot { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.slot div { background: var(--accent-soft); border-radius: 10px; padding: 8px 14px; }
.slot small { display: block; font-size: .72rem; color: var(--muted); }
.slot b { font-size: 1.25rem; }
.tscroll { overflow-x: auto; margin: 0 -4px; }
table.grid { border-collapse: collapse; width: 100%; font-size: .95rem; }
.grid th, .grid td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid thead th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.grid tbody th { font-weight: 800; white-space: nowrap; }
.grid.sw tbody th { color: var(--accent); font-size: 1.05rem; }
.grid.rates td, .grid.rates thead th { text-align: center; }
.grid.rates td { font-variant-numeric: tabular-nums; font-weight: 600; }
.grid.rates tbody th { text-align: left; font-weight: 700; }
.grid.rates b { font-size: 1.1rem; }
.ex { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.grid.sw td { font-size: .92rem; }
h2 .linkbtn { font-size: .85rem; font-weight: 500; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { border-bottom: 1px solid var(--line); }
.checklist label { display: flex; gap: 12px; align-items: center; padding: 11px 2px; cursor: pointer; }
.checklist input { width: 24px; height: 24px; accent-color: var(--ok); flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.flights { list-style: none; padding: 0; margin: 12px 0 0; }
.flights li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.flights .chip { margin-left: 4px; }
.addflight summary { list-style: none; }
.addflight summary::-webkit-details-marker { display: none; }
.addflight[open] summary { display: none; }
.addflight form { margin-top: 4px; }

/* Formulare */
.form label, .form .field { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.form .lbl { font-size: .86rem; font-weight: 600; color: var(--muted); }
.form > label, .form > .field { margin-bottom: 12px; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; font-weight: 400;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=file] { padding: 8px; background: transparent; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
textarea { resize: vertical; }
label.check { flex-direction: row !important; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .full { grid-column: 1 / -1; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.curimg { display: flex; align-items: center; gap: 12px; }
.curimg img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; }
.dynlist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.dynrow { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 44px 10px 10px; }
.dynrow > .icon { position: absolute; top: 4px; right: 2px; }
.dynrow input, .dynrow select, .dynrow textarea { background: var(--card); }
.sw-row { display: grid; grid-template-columns: 90px 1fr 1fr 1fr; gap: 6px; }
@media (max-width: 560px) { .sw-row { grid-template-columns: 1fr 1fr; } .sw-row .sw-name { grid-column: 1 / -1; } }
.rt-label { margin-bottom: 8px; }
.rt-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 8px; align-items: center; }
.rt-grid span { font-size: .82rem; font-weight: 700; color: var(--muted); }
.savebar { position: sticky; bottom: calc(var(--tabh) + env(safe-area-inset-bottom) + 8px); z-index: 5; padding: 6px 0; }
@media (min-width: 760px) { .savebar { bottom: 12px; } }
.savebar .btn { box-shadow: 0 6px 20px rgba(0,0,0,.18); min-height: 50px; font-size: 1.05rem; }
.danger-zone { margin: 26px 0 10px; text-align: center; }

/* Login */
.auth { max-width: 400px; margin: 8vh auto 0; text-align: center; }
.auth h1 { margin-bottom: 18px; }
.auth .form { text-align: left; }
.auth-logo { color: var(--accent); margin-bottom: 6px; }
.auth-logo svg { transform: rotate(45deg); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; align-items: center; justify-content: center; }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 56px) 0 calc(env(safe-area-inset-bottom) + 64px); }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-stage video { width: 100%; background: #000; }
.lightbox button.lb-close, .lightbox button.lb-prev, .lightbox button.lb-next {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16);
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2; }
.lb-close { top: calc(env(safe-area-inset-top) + 10px); right: 12px; }
.lb-prev, .lb-next { top: 50%; margin-top: -24px; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px); background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; }
.lb-actions { display: flex; gap: 8px; margin-left: auto; }
.lb-actions .btn { min-height: 38px; padding: 0 12px; font-size: .88rem; background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.lb-actions .btn.danger { color: #ff9b93; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 12px; border-radius: 10px; overflow: hidden; }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gitem { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--bg); cursor: pointer; overflow: hidden; }
.gitem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gitem .vph { position: absolute; inset: 0; background: linear-gradient(135deg, #2a3a46, #13212b); }
.gitem .play { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%;
  background: rgba(0,0,0,.55); box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.gitem .play::after { content: ''; position: absolute; left: 16px; top: 12px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.uploader { display: flex; flex-direction: column; gap: 10px; }
.uploader > .btn { align-self: flex-start; cursor: pointer; }
.upqueue:empty { display: none; }
.upqueue { display: flex; flex-direction: column; gap: 8px; }
.uprow { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.upname { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upbar { height: 6px; border-radius: 3px; background: var(--line); margin: 6px 0 4px; overflow: hidden; }
.upbar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.uprow.ok .upbar span { background: var(--ok); }
.uprow.err .upbar span { background: var(--danger); }
.uprow.err .upinfo { color: var(--danger); }

/* Mehrbenutzer */
.hangar-switch { display: flex; gap: 6px; overflow-x: auto; margin: -4px 0 12px; padding-bottom: 2px; scrollbar-width: none; }
.hangar-switch::-webkit-scrollbar { display: none; }
.hangar-switch a { flex: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.hangar-switch a small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.hangar-switch a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hangar-switch a.on small { color: inherit; opacity: .8; }
.chip.owner { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.foreign-note { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 9px 14px; margin-bottom: 12px; font-size: .92rem; }
.lead { margin: -6px 0 18px; }
.auth .card h2 { margin-bottom: 12px; }
.register-teaser { text-align: center; }
.register-teaser .btn { margin: 6px 0; }
.userrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.userrow:first-of-type { border-top: 0; }
.userrow .ua { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.userrow .ua input { width: 150px; min-height: 38px; padding: 6px 10px; }
.userrow .ua .btn { min-height: 38px; padding: 0 12px; font-size: .88rem; }
.hint { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.hint code { word-break: break-all; }

/* Sender */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.brand-opt { position: relative; }
.brand-opt input { position: absolute; opacity: 0; pointer-events: none; }
.brand-opt span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 10px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font-weight: 700; font-size: .95rem; cursor: pointer; text-align: center; }
.brand-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.brand-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.plane-item .ph.tx { font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; }
.ctl-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.txchip { color: var(--accent); background: var(--accent-soft); border-color: transparent; font-size: .8rem; }
.onboard { text-align: center; margin: 18px 0 20px; }
.onboard h1 { margin-bottom: 8px; }
.onboard-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; align-items: stretch; }
.onboard-actions a.center { display: block; padding: 10px; }

/* Gyro */
.gy-top { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.gy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 6px; }
.gy-grid span { font-size: .78rem; font-weight: 700; color: var(--muted); text-align: center; }
@media (max-width: 420px) { .gy-top { grid-template-columns: 1fr; } }
.grid.gyro td, .grid.gyro thead th { text-align: center; }
.grid.gyro td { font-variant-numeric: tabular-nums; font-weight: 600; }
.grid.gyro tbody th small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }

/* Akku-Status */
.chip.bstate { border-color: transparent; }
.chip.bstate.full { background: #fde8dd; color: #b8430b; }
.chip.bstate.part { background: #fff1d6; color: #9a6400; }
.chip.bstate.store { background: var(--ok-soft); color: var(--ok); }
.chip.bstate.empty { background: #e8eaf0; color: #4b5563; }
.chip.bstate.deep, .chip.bstate.defect { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.chip.bstate.unk { background: var(--bg); color: var(--muted); }
.chip.bstate.warn { background: var(--danger); color: #fff; }
.chip.big { font-size: 1rem; padding: 6px 14px; }
.plane-item.is-defect { opacity: .6; }
.chargecard.warn { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.charge-now { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.volt { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.volt small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.volt.full { color: #d2560f; } .volt.part { color: #b07700; } .volt.store { color: var(--ok); } .volt.deep { color: var(--danger); }
.warntext { color: var(--danger); font-weight: 600; font-size: .92rem; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.presets .btn { flex: 1 1 auto; }
.chargeform .btn.block { margin-top: 10px; }
.blog { list-style: none; margin: 0; padding: 0; }
.blog li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0 8px 10px; border-top: 1px solid var(--line); border-left: 3px solid var(--line); }
.blog li.k-voltage { border-left-color: var(--accent); }
.blog li.k-status { border-left-color: var(--danger); }
.blog li.k-cycles { border-left-color: #b07700; }

/* Anleitung */
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.toc a { padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .85rem; color: var(--text); }
.lead-left { margin: -4px 0 12px; }
.help h3 { margin-top: 1rem; }
.help ol, .help ul { padding-left: 1.3rem; margin: .4rem 0; }
.help li { margin: .35rem 0; }
.help .note { background: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: .88rem; color: var(--muted); }
.helpdl { margin: .5rem 0; }
.helpdl dt { font-weight: 700; margin-top: .7rem; }
.helpdl dd { margin: .15rem 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.helpbtn { margin: 4px 0 14px; }
.tabs a span { white-space: nowrap; }
@media (max-width: 400px) { .tabs a { font-size: .66rem; } }

/* Akku-Nummer & QR-Etiketten */
.bno { display: inline-block; font-weight: 800; color: var(--accent); }
.plane-item .ph.batt { flex-direction: column; line-height: 1.05; }
.plane-item .ph.batt b { font-size: 1.35rem; }
.plane-item .ph.batt small { font-size: .78rem; font-weight: 700; opacity: .8; }
.qrcard { display: flex; gap: 16px; align-items: center; }
.qrcard .qr { width: 104px; height: 104px; flex: none; background: #fff; padding: 6px; border-radius: 8px; }
.qr svg { width: 100%; height: 100%; display: block; }
.labelpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; margin: 6px 0 12px; }
.center-row { justify-content: center; margin: 14px 0 6px; }
.labelsheet { display: flex; flex-wrap: wrap; gap: 3mm; justify-content: center; margin: 16px 0; }
.label { display: flex; align-items: center; gap: 2.5mm; background: #fff; color: #000; border: 0.3mm dashed #999; box-sizing: border-box; overflow: hidden; }
.label .qr { flex: none; }
.label .ltext { min-width: 0; font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif; }
.label .lno { font-weight: 800; line-height: 1; }
.label .lname { font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .lsub { color: #444; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.size-s .label { width: 38mm; height: 19mm; padding: 1.5mm; } .size-s .qr { width: 16mm; height: 16mm; }
.size-s .lno { font-size: 13pt; } .size-s .lname { font-size: 6.5pt; } .size-s .lsub { font-size: 5.5pt; }
.size-m .label { width: 50mm; height: 25mm; padding: 2mm; } .size-m .qr { width: 21mm; height: 21mm; }
.size-m .lno { font-size: 18pt; } .size-m .lname { font-size: 8pt; } .size-m .lsub { font-size: 6.5pt; }
.size-l .label { width: 70mm; height: 35mm; padding: 2.5mm; } .size-l .qr { width: 30mm; height: 30mm; }
.size-l .lno { font-size: 26pt; } .size-l .lname { font-size: 10pt; } .size-l .lsub { font-size: 8pt; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff !important; padding: 0 !important; }
  .top, .tabs, .noprint, .flash, #lightbox { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .labelsheet { justify-content: flex-start; margin: 0; }
  .label { break-inside: avoid; }
}

.splitcard { border-color: var(--accent); background: var(--accent-soft); }
.splitcard p { margin-top: 0; }

/* Sprachumschalter */
.langsw { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--card); flex: none; }
.langsw a { padding: 5px 10px; font-size: .78rem; font-weight: 700; text-decoration: none; color: var(--muted); letter-spacing: .03em; }
.langsw a.on { background: var(--accent); color: var(--accent-ink); }
.langsw.in-header { order: 3; margin-left: 10px; }
.langsw.floating { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 16px; z-index: 5; }

/* Mensch-Prüfung & Kontakt */
.hc { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; margin: 4px 0 12px; background: var(--bg); }
.hc.need { border-color: #c0392b; }
.hc.ok { border-color: #2e8b57; }
.hc-box { display: flex !important; align-items: center; gap: 10px; font-weight: 600; margin: 0 !important; cursor: pointer; }
.hc-box input { width: 22px; height: 22px; margin: 0; flex: none; }
.hc-state { margin-left: auto; font-weight: 700; color: var(--muted); font-size: .9rem; }
.hc.ok .hc-state { color: #2e8b57; font-size: 1.2rem; }
.hc.busy .hc-state::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: hcspin .8s linear infinite; vertical-align: -2px; }
@keyframes hcspin { to { transform: rotate(360deg); } }
.hc-note { display: block; margin-top: 4px; }
.contactbox { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.contact-out { margin: 10px 0 0; font-weight: 700; word-break: break-all; }
.contact-mail { font-size: 1.05rem; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media print { .langsw { display: none !important; } }

/* Rechtliches */
.legalfoot { text-align: center; font-size: .8rem; color: var(--muted); margin: 26px 0 8px; }
.legalfoot a { color: var(--muted); }
.legal h1 { font-size: 1.4rem; margin-bottom: 4px; }
.legal h2 { font-size: 1.02rem; margin: 1.3rem 0 .4rem; }
.legal p, .legal li { line-height: 1.5; }
.legal ul { padding-left: 1.2rem; }
.auth ul.small { text-align: left; padding-left: 1.2rem; line-height: 1.45; }
.form .hc-box { flex-direction: row !important; align-items: center; color: var(--text); font-size: 1rem; text-align: left; }
.form .hc-box input { width: 22px !important; height: 22px; padding: 0; flex: none; }
.hc { text-align: left; }
