* { box-sizing: border-box; }
:root { --hw: #c8102e; --bg: #f5f5f7; --card: #fff; --fg: #1c1c1e; --muted: #6b6b70; --line: #e2e2e6; }
@media (prefers-color-scheme: dark) { :root { --bg:#000; --card:#1c1c1e; --fg:#f5f5f7; --muted:#98989f; --line:#2c2c2e; } }
body { margin:0; font-family:-apple-system,system-ui,sans-serif; background:var(--bg); color:var(--fg); padding-bottom:72px; }
.topbar { position:sticky; top:0; display:flex; justify-content:space-between; align-items:center;
  padding:12px 16px; background:var(--hw); color:#fff; }
.topbar h1 { font-size:20px; margin:0; } .total { font-weight:600; }
main { padding:12px; max-width:720px; margin:0 auto; }
.view.hidden { display:none; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px; margin-bottom:10px; }
.tabbar { position:fixed; bottom:0; left:0; right:0; display:flex; background:var(--card);
  border-top:1px solid var(--line); }
.tab { flex:1; border:0; background:none; color:var(--muted); font-size:22px; padding:8px 0;
  display:flex; flex-direction:column; align-items:center; gap:2px; }
.tab span { font-size:11px; } .tab.active { color:var(--hw); }
button.primary { background:var(--hw); color:#fff; border:0; border-radius:10px; padding:14px; font-size:17px; width:100%; }
input, select, textarea { width:100%; padding:12px; font-size:16px; border:1px solid var(--line);
  border-radius:10px; background:var(--card); color:var(--fg); margin:6px 0; }
label { font-size:13px; color:var(--muted); }
.badge { display:inline-block; font-size:11px; font-weight:700; padding:2px 6px; border-radius:6px; }
.badge.th { background:#00a000; color:#fff; } .badge.sth { background:#C6930A; color:#fff; }
.variant-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; }
.variant { text-align:center; cursor:pointer; } .variant img { width:100%; height:110px; object-fit:contain; }
.row { display:flex; gap:8px; align-items:center; }
.thumb { width:56px; height:56px; object-fit:contain; border-radius:8px; background:#0001; }
.muted { color:var(--muted); font-size:13px; }
button.unpack { background:transparent; border:2px solid var(--hw); color:var(--hw);
  border-radius:10px; padding:12px; font-size:16px; font-weight:600; width:100%; margin:6px 0; }
.badge.owned { background:#0a84ff; color:#fff; }
.filters { display:flex; gap:8px; margin:8px 0; }
.chip { flex:1; border:1px solid var(--line); background:var(--card); color:var(--fg);
  border-radius:20px; padding:8px 12px; font-size:14px; }
.chip.active { background:var(--hw); color:#fff; border-color:var(--hw); }
/* Detail-Ansicht: Inhalt scrollt, Aktionen unten fixiert */
.detail { display:flex; flex-direction:column; min-height:calc(100dvh - 128px); }
.detail-body { flex:1 1 auto; }
.detail-body button.link { width:100%; background:var(--card); border:1px solid var(--line); color:var(--fg);
  border-radius:10px; padding:12px; font-size:15px; margin:6px 0; }
.detail-actions { position:sticky; bottom:80px; padding:10px 0 4px;
  background:linear-gradient(to top, var(--bg) 78%, transparent); }
.detail-actions button { border:0; border-radius:12px; padding:15px; font-size:16px; font-weight:600; }
.detail-actions .save { width:100%; background:var(--hw); color:#fff; }
.detail-actions .btn-row { display:flex; gap:8px; margin-top:8px; }
.detail-actions .btn-row button { flex:1; }
.detail-actions .del { background:transparent; border:2px solid var(--hw); color:var(--hw); }
.detail-actions .back { background:var(--card); border:1px solid var(--line); color:var(--fg); }
select { appearance:auto; }
/* Aktions-Reihe im Hinzufügen: Modell suchen (2/3) + Kamera (1/3) */
.add-actions { display:flex; gap:8px; }
.add-actions .search { flex:2; }
.add-actions .cam { flex:1; display:flex; align-items:center; justify-content:center; }
/* Login-Zustand: Tab-Leiste ausblenden */
body.locked .tabbar { display:none; }
