/* ===========================================================================
   TANKSTELLENZIRKEL – Design System
   Exklusiver Betreiberzirkel: Navy / Gold / Creme / Weiß.
   Light Mode Standard, markenkonformer Dark Mode. Mobile First, Desktop edel.
   =========================================================================== */
:root {
  /* Markenfarben (empfohlene Tokens) */
  --tz-navy: #071d35;
  --tz-navy-2: #0c2b4d;
  --tz-gold: #d9a441;
  --tz-gold-2: #f1c76a;
  --tz-cream: #f7f4ee;
  --tz-bg: #eef3f8;
  --tz-card: #ffffff;
  --tz-text: #0d1b2f;
  --tz-muted: #64748b;
  --tz-border: #d8e0ea;
  --tz-success: #1f9d55;

  /* Kurz-Aliase (von Inline-Styles im JS genutzt) */
  --navy: var(--tz-navy);
  --navy-2: var(--tz-navy-2);
  --gold: var(--tz-gold);
  --gold-2: var(--tz-gold-2);
  --cream: var(--tz-cream);
  --bg: var(--tz-bg);
  --surface: var(--tz-card);
  --surface-2: #eef3f9;
  --text: var(--tz-text);
  --muted: var(--tz-muted);
  --border: var(--tz-border);
  --ok: var(--tz-success);
  --warn: #c98a1e;
  --danger: #d6453d;

  --shadow-sm: 0 1px 2px rgba(7,29,53,.05);
  --shadow: 0 2px 6px rgba(7,29,53,.06), 0 14px 40px rgba(7,29,53,.07);
  --shadow-lg: 0 30px 70px rgba(7,29,53,.22);
  --radius: 18px;
  --radius-s: 12px;
  --gold-grad: linear-gradient(135deg, var(--tz-gold-2), var(--tz-gold));
  --navy-grad: linear-gradient(160deg, #0a2746, var(--tz-navy));
  --maxw: 1180px;
  --topbar-h: 70px;
}
[data-theme="dark"] {
  --tz-bg: #06121f;
  --tz-card: #0e2138;
  --tz-text: #e9eef6;
  --tz-muted: #93a7c2;
  --tz-border: #1d3553;
  --surface-2: #122a45;
  --bg: var(--tz-bg);
  --surface: var(--tz-card);
  --text: var(--tz-text);
  --muted: var(--tz-muted);
  --border: var(--tz-border);
  --cream: #102237;
  --shadow: 0 2px 6px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.4);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(217,164,65,.06), transparent 60%),
    var(--bg);
  color: var(--text); -webkit-font-smoothing: antialiased;
  font-size: 15.5px; line-height: 1.55;
}
a { color: var(--navy-2); text-decoration: none; }
[data-theme="dark"] a { color: var(--gold-2); }
button { font-family: inherit; cursor: pointer; }
img, video { max-width: 100%; }
h1,h2,h3 { letter-spacing: -.02em; }

/* ---------- Boot / Splash ---------- */
.boot { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100vh; gap:18px; padding:24px; }
.boot img { width:230px; max-width:72vw; filter: drop-shadow(0 10px 30px rgba(7,29,53,.12)); }
.boot-claim { color: var(--muted); letter-spacing:3px; font-size:11px; text-transform:uppercase; }
.spinner { width:24px; height:24px; border:3px solid var(--surface-2); border-top-color: var(--gold); border-radius:50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================================================================
   TOPBAR (hell, edel)
   =========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  display:flex; align-items:center; gap:16px;
  height: var(--topbar-h); padding: 0 22px;
  padding-top: env(safe-area-inset-top);
}
[data-theme="dark"] .topbar { background: rgba(14,33,56,.82); }

.brand { display:flex; align-items:center; gap:11px; cursor:pointer; flex-shrink:0; }
.brand .mark { width:42px; height:42px; border-radius:12px; object-fit:contain; background: var(--cream); padding:3px; box-shadow: var(--shadow-sm); }
.brand .wm { line-height:1; }
.brand .wm .t1 { font-weight:800; font-size:19px; letter-spacing:.06em; color: var(--navy); }
.brand .wm .t1 span { color: var(--gold); }
[data-theme="dark"] .brand .wm .t1 { color:#fff; }
.brand .wm .claim { font-size:10.5px; color: var(--muted); letter-spacing:.02em; margin-top:2px; }

.searchbar {
  display:flex; align-items:center; gap:10px; background: var(--surface-2);
  border:1px solid var(--border); border-radius:13px; padding:9px 14px; flex:1; max-width:440px;
  transition: box-shadow .15s, border-color .15s;
}
.searchbar:focus-within { border-color: var(--gold); box-shadow:0 0 0 3px rgba(217,164,65,.16); }
.searchbar input { background:transparent; border:0; color: var(--text); outline:none; width:100%; font-size:14.5px; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar .mg { color: var(--muted); }

.topnav { display:none; gap:4px; margin-left:auto; }
.nav-link {
  background:none; border:0; color: var(--text); border-radius:11px; padding:9px 13px;
  font-size:14px; font-weight:600; display:inline-flex; align-items:center; gap:6px; opacity:.78;
}
.nav-link:hover { background: var(--surface-2); opacity:1; }
.nav-link.active { background: var(--surface-2); opacity:1; color: var(--navy); }
[data-theme="dark"] .nav-link.active { color:#fff; }
.nav-link.gold { color: var(--navy); background: rgba(217,164,65,.16); opacity:1; }
.nav-link.gold:hover { background: rgba(217,164,65,.26); }
.nav-link.gold.active { background: var(--gold-grad); }
.nav-new {
  background: var(--navy-grad); color:#fff; border:0; border-radius:12px; padding:9px 16px;
  font-weight:700; font-size:14px; box-shadow: var(--shadow-sm); display:inline-flex; gap:6px; align-items:center;
}
.nav-new:hover { filter: brightness(1.12); }

.top-actions { display:flex; align-items:center; gap:8px; }
.icon-btn {
  background: var(--surface-2); color: var(--text); border:1px solid var(--border);
  width:42px; height:42px; border-radius:12px; font-size:17px; display:grid; place-items:center; position:relative;
}
.icon-btn:hover { background: var(--cream); }
.badge { position:absolute; top:-5px; right:-5px; background: var(--gold-grad); color: var(--navy); font-size:10.5px; font-weight:800; min-width:18px; height:18px; border-radius:9px; display:grid; place-items:center; padding:0 4px; box-shadow: var(--shadow-sm); }
.avatar {
  width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
  background: var(--navy-grad); color:#fff; font-weight:800; font-size:14px; letter-spacing:.04em;
  border:1px solid var(--border); cursor:pointer;
}
.avatar.gold-ring { box-shadow: 0 0 0 2px var(--gold); }

/* ===========================================================================
   LAYOUT
   =========================================================================== */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 26px 22px 110px; }
@media (min-width:860px){ .shell { padding: 30px 26px 60px; } }

.page-head { display:flex; align-items:flex-start; gap:16px; margin: 4px 2px 22px; }
.page-head .ic-circle {
  width:54px; height:54px; border-radius:16px; background: var(--navy-grad); color: var(--gold-2);
  display:grid; place-items:center; font-size:24px; flex-shrink:0; box-shadow: var(--shadow);
}
.page-head .ph-body { flex:1; min-width:0; }
.page-head h1 { margin:0; font-size:25px; }
.page-head .desc { color: var(--muted); font-size:14px; margin-top:3px; }
.page-head .ph-action { align-self:center; }

/* ---------- Section title ---------- */
.section-title { display:flex; align-items:center; justify-content:space-between; margin:22px 4px 10px; gap:12px; }
.section-title h3 { margin:0; font-size:13px; text-transform:uppercase; letter-spacing:.09em; color: var(--muted); font-weight:700; }

/* ===========================================================================
   CARDS
   =========================================================================== */
.card {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding:22px; margin:16px 0;
}
.card.tight { padding:16px; }
.card h2 { margin:.1em 0 .45em; font-size:21px; }
.muted { color: var(--muted); }
.small { font-size:13px; }

/* ---------- Stat cards ---------- */
.stat-grid { display:grid; grid-template-columns: repeat(2,1fr); gap:14px; margin: 4px 0 8px; }
@media (min-width:760px){ .stat-grid { grid-template-columns: repeat(4,1fr); } }
.stat-card {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding:18px 20px; position:relative; overflow:hidden;
}
.stat-card::after { content:""; position:absolute; right:-30px; top:-30px; width:90px; height:90px; border-radius:50%; background: radial-gradient(circle, rgba(217,164,65,.16), transparent 70%); }
.stat-card .v { font-size:30px; font-weight:800; color: var(--navy); letter-spacing:-.03em; line-height:1; }
[data-theme="dark"] .stat-card .v { color:#fff; }
.stat-card .l { color: var(--muted); font-size:13px; margin-top:6px; }
.stat-card .ic { position:absolute; top:16px; right:16px; font-size:18px; color: var(--gold); }

/* ===========================================================================
   ORGANISATIONEN – Karten-/Tabellen-Hybrid
   =========================================================================== */
.org-list { display:flex; flex-direction:column; gap:12px; margin-top:8px; }
.org-row {
  display:flex; align-items:center; gap:16px; background: var(--surface);
  border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding:16px 18px; transition: transform .12s, box-shadow .12s;
}
.org-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.org-ava {
  width:52px; height:52px; border-radius:14px; flex-shrink:0; display:grid; place-items:center;
  font-weight:800; font-size:17px; color:#fff; background: var(--navy-grad); letter-spacing:.02em;
}
.org-ava.founder { background: var(--gold-grad); color: var(--navy); }
.org-ava img { width:100%; height:100%; object-fit:cover; border-radius:14px; }
.org-main { flex:1; min-width:0; }
.org-name { font-weight:700; font-size:16px; display:flex; align-items:center; gap:8px; }
.org-sub { color: var(--muted); font-size:13px; margin-top:2px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.crown { color: var(--gold); }
.org-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
@media (max-width:640px){
  .org-row { flex-wrap:wrap; }
  .org-actions { width:100%; justify-content:flex-end; }
}

/* ===========================================================================
   PILLS / CHIPS / TYPE-TAGS
   =========================================================================== */
.pill { font-size:12px; font-weight:600; padding:4px 11px; border-radius:999px; display:inline-flex; align-items:center; gap:5px; }
.pill::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; opacity:.9; }
.pill.ok { background: rgba(31,157,85,.13); color: var(--ok); }
.pill.bad { background: rgba(214,69,61,.12); color: var(--danger); }
.pill.warn { background: rgba(201,138,30,.15); color: var(--warn); }
.pill.gold { background: rgba(217,164,65,.16); color: var(--gold); }
.pill.navy { background: var(--surface-2); color: var(--navy-2); }

.chip { display:inline-flex; align-items:center; gap:6px; background: var(--surface-2); color: var(--text); border-radius:999px; padding:7px 14px; font-size:13px; border:1px solid var(--border); white-space:nowrap; }
.chip:hover { border-color: var(--gold); }
.chip.gold { background: rgba(217,164,65,.14); color: #9a6f14; border-color: transparent; }
[data-theme="dark"] .chip.gold { color: var(--gold-2); }
.chip.solid { background: var(--navy-grad); color:#fff; border-color: transparent; }
.chip button { background:none;border:0;color:inherit;font-size:14px;line-height:1;padding:0;margin-left:2px; }

.type-tag { font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; padding:4px 9px; border-radius:7px; }
.type-praxistipp { background:#e7f3ec; color:#1c7a4f; }
.type-frage { background:#fdf2e0; color:#9a6b14; }
.type-problemloesung { background:#e9eefb; color:#3a4ea8; }
.type-dokument { background:#eef1f6; color:#516074; }
.type-bestpractice { background: var(--gold-grad); color: var(--navy); }
[data-theme="dark"] .type-tag:not(.type-bestpractice) { filter: brightness(1.5) saturate(.8); }

/* ===========================================================================
   POSTS
   =========================================================================== */
.post-item { display:block; cursor:pointer; }
.post-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.post-item { transition: transform .12s, box-shadow .12s; }
.post-item .title { font-size:18px; font-weight:700; margin:8px 0 5px; color: var(--text); }
.post-item .meta { display:flex; flex-wrap:wrap; gap:12px; align-items:center; color: var(--muted); font-size:13px; }
.post-item .excerpt { color: var(--muted); margin:6px 0; font-size:14px; }
.solved { color: var(--ok); font-weight:600; }

/* ---------- Vote ---------- */
.vote { display:inline-flex; align-items:center; gap:5px; }
.vote button { background: var(--surface-2); border:1px solid var(--border); border-radius:10px; width:40px; height:36px; font-size:16px; }
.vote button.on-up { background: rgba(31,157,85,.14); border-color: var(--ok); }
.vote button.on-down { background: rgba(214,69,61,.12); border-color: var(--danger); }
.vote .score { min-width:26px; text-align:center; font-weight:700; }

/* ===========================================================================
   BUTTONS
   =========================================================================== */
.btn { background: var(--navy-grad); color:#fff; border:0; border-radius:12px; padding:11px 19px; font-size:14.5px; font-weight:700; box-shadow: var(--shadow-sm); transition: filter .12s, transform .08s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--gold-grad); color: var(--navy); }
.btn.ghost { background: var(--surface-2); color: var(--text); box-shadow:none; border:1px solid var(--border); }
.btn.ghost:hover { background: var(--cream); filter:none; }
.btn.sm { padding:8px 13px; font-size:13px; border-radius:10px; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn-row { display:flex; gap:10px; flex-wrap:wrap; }

/* ===========================================================================
   FORMS
   =========================================================================== */
label { display:block; font-weight:600; font-size:13.5px; margin:14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width:100%; padding:12px 14px; border:1px solid var(--border); border-radius: var(--radius-s);
  background: var(--surface); color: var(--text); font-size:15px; outline:none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow:0 0 0 3px rgba(217,164,65,.16); }
textarea { min-height:130px; resize:vertical; }
.seg { display:flex; gap:8px; flex-wrap:wrap; }
.seg label { display:flex; align-items:center; gap:7px; margin:0; padding:10px 14px; border:1px solid var(--border); border-radius:11px; cursor:pointer; font-weight:500; }
.seg input { width:auto; }
.seg label.sel { border-color: var(--gold); background: rgba(217,164,65,.1); }

/* ---------- Category grid ---------- */
.cat-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.cat-tile { background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding:20px 16px; text-align:center; box-shadow: var(--shadow); cursor:pointer; transition: transform .12s, box-shadow .12s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cat-tile .ic { font-size:28px; }
.cat-tile .nm { font-weight:700; margin-top:8px; }
.cat-tile .ct { color: var(--muted); font-size:12px; margin-top:2px; }

/* ===========================================================================
   AUTH
   =========================================================================== */
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:22px;
  background:
    radial-gradient(800px 400px at 50% -10%, rgba(217,164,65,.18), transparent 60%),
    var(--navy-grad); }
.auth-card { background: var(--surface); border-radius:24px; box-shadow: var(--shadow-lg); width:100%; max-width:430px; padding:34px 30px; }
.auth-card .logo-img { display:block; width:240px; max-width:80%; margin:0 auto 6px; }
.auth-card .claim { text-align:center; color: var(--muted); font-size:11px; letter-spacing:2.5px; text-transform:uppercase; margin-bottom:22px; }
.auth-card .welcome { text-align:center; font-weight:700; font-size:17px; margin-bottom:2px; }

/* ---------- Answer ---------- */
.answer { border-left:3px solid var(--border); padding:14px 0 14px 16px; margin:14px 0; }
.answer.best { border-left-color: var(--ok); background: rgba(31,157,85,.05); border-radius:0 12px 12px 0; padding-right:14px; }

/* ===========================================================================
   BENEFIT-LEISTE
   =========================================================================== */
.benefit-bar { display:grid; grid-template-columns: repeat(2,1fr); gap:14px; margin:30px 0 10px; }
@media (min-width:820px){ .benefit-bar { grid-template-columns: repeat(4,1fr); } }
.benefit {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding:20px; box-shadow: var(--shadow); position:relative; overflow:hidden;
}
.benefit .bic { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; font-size:20px;
  background: rgba(217,164,65,.14); color: var(--gold); margin-bottom:12px; }
.benefit h4 { margin:0 0 4px; font-size:15px; color: var(--navy); }
[data-theme="dark"] .benefit h4 { color:#fff; }
.benefit p { margin:0; color: var(--muted); font-size:13px; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
.site-footer {
  max-width: var(--maxw); margin: 10px auto 0; padding: 26px 22px;
  border-top:1px solid var(--border); display:flex; align-items:center; justify-content:space-between;
  gap:16px; flex-wrap:wrap; color: var(--muted); font-size:13px;
}
.site-footer .f-links { display:flex; gap:18px; flex-wrap:wrap; }
.site-footer .f-links a { color: var(--muted); }
.site-footer .f-links a:hover { color: var(--gold); }
.site-footer .f-logo { width:38px; height:38px; border-radius:10px; background: var(--cream); padding:3px; object-fit:contain; box-shadow: var(--shadow-sm); }
@media (max-width:760px){ .site-footer { padding-bottom: 100px; } }

/* ===========================================================================
   ADMIN: Navy-Sidebar + Inhalt
   =========================================================================== */
.admin-wrap { display:grid; grid-template-columns: 1fr; gap:18px; }
@media (min-width:980px){ .admin-wrap { grid-template-columns: 258px 1fr; align-items:start; } }

.sidebar {
  background: var(--navy-grad); border-radius: 20px; padding:16px; color:#fff;
  box-shadow: var(--shadow); position:relative; overflow:hidden;
}
.sidebar::before { content:""; position:absolute; right:-60px; top:-40px; width:180px; height:180px;
  border:2px solid rgba(217,164,65,.18); border-radius:50%; }
.side-head { display:flex; align-items:center; gap:10px; padding:6px 8px 14px; }
.side-head img { width:38px; height:38px; border-radius:10px; background: var(--cream); padding:3px; }
.side-head .st { font-weight:800; font-size:15px; letter-spacing:.04em; }
.side-head .st span { color: var(--gold-2); }
.side-nav { display:flex; flex-direction:column; gap:3px; }
.side-item {
  display:flex; align-items:center; gap:11px; padding:10px 13px; border-radius:12px;
  color: rgba(255,255,255,.82); font-size:14px; font-weight:600; background:none; border:0; width:100%; text-align:left;
}
.side-item .si { width:20px; text-align:center; font-size:15px; opacity:.9; }
.side-item:hover { background: rgba(255,255,255,.08); color:#fff; }
.side-item.active { background: var(--gold-grad); color: var(--navy); box-shadow: 0 6px 18px rgba(217,164,65,.3); }
.side-item.active .si { opacity:1; }
@media (max-width:979px){
  .sidebar { padding:12px; }
  .side-nav { flex-direction:row; overflow-x:auto; gap:6px; padding-bottom:4px; }
  .side-item { white-space:nowrap; padding:9px 13px; }
  .side-head, .side-brand { display:none; }
}
.side-brand {
  margin-top:16px; padding:16px; border-radius:14px; background: rgba(255,255,255,.06);
  border:1px solid rgba(217,164,65,.22);
}
.side-brand .sb-line { width:34px; height:3px; border-radius:2px; background: var(--gold-grad); margin-bottom:10px; }
.side-brand b { display:block; color: var(--gold-2); font-size:14px; }
.side-brand p { margin:4px 0 0; color: rgba(255,255,255,.7); font-size:12px; line-height:1.5; }

.admin-content { min-width:0; }

/* ===========================================================================
   TABELLEN (nur noch dezent, für Audit/Protokoll)
   =========================================================================== */
table.tbl { width:100%; border-collapse: separate; border-spacing:0; font-size:14px; background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-sm); }
table.tbl th, table.tbl td { text-align:left; padding:12px 14px; border-bottom:1px solid var(--border); }
table.tbl tr:last-child td { border-bottom:0; }
table.tbl th { color: var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; background: var(--surface-2); }
table.tbl code { background: var(--surface-2); padding:2px 6px; border-radius:6px; font-size:12px; }

/* ===========================================================================
   MOBILE TABBAR
   =========================================================================== */
.tabbar {
  position: fixed; bottom:0; left:0; right:0; z-index:55;
  background: rgba(255,255,255,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top:1px solid var(--border); display:flex; justify-content:space-around;
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
}
[data-theme="dark"] .tabbar { background: rgba(14,33,56,.9); }
.tabbar button { background:none; border:0; color: var(--muted); font-size:10.5px; display:flex; flex-direction:column; align-items:center; gap:3px; padding:5px 10px; border-radius:11px; font-weight:600; }
.tabbar button .ic { font-size:20px; }
.tabbar button.active { color: var(--navy); }
[data-theme="dark"] .tabbar button.active { color: var(--gold-2); }
.tabbar button.new .ic { background: var(--navy-grad); color:#fff; width:34px; height:34px; border-radius:11px; display:grid; place-items:center; margin-top:-2px; }

/* ===========================================================================
   MISC
   =========================================================================== */
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.between { justify-content:space-between; }
.grow { flex:1; }
.toast { position: fixed; bottom: 92px; left:50%; transform:translateX(-50%); background: var(--navy); color:#fff; padding:13px 20px; border-radius:13px; box-shadow: var(--shadow-lg); z-index:200; max-width:90%; font-size:14px; }
.toast.err { background: var(--danger); }
.empty { text-align:center; color: var(--muted); padding:48px 16px; }
.empty .big { font-size:44px; }

.modal-bg { position:fixed; inset:0; background: rgba(7,18,31,.5); backdrop-filter: blur(3px); display:flex; align-items:flex-end; justify-content:center; z-index:120; }
.modal { background: var(--surface); border-radius:22px 22px 0 0; width:100%; max-width:var(--maxw); max-height:92vh; overflow:auto; padding:24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); }
.modal .grab { width:44px; height:5px; background: var(--border); border-radius:3px; margin:0 auto 14px; }

.hide-mobile { display:none; }
@media (min-width:860px){
  .hide-mobile { display:inline-flex; }
  .tabbar { display:none; }
  .topnav { display:flex; }
  .shell { padding-bottom: 40px; }
}
@media (min-width:860px){
  .modal-bg { align-items:center; }
  .modal { border-radius:22px; max-width:680px; }
}
