:root {
  /* Standard = helles Thema (Grau/Weiß). /theme.css (vom Server) überschreibt je nach Einstellung. */
  --bg: #eef0f3; --field: #ffffff; --panel: rgba(255,255,255,.74); --panel-solid: #ffffff; --panel2: rgba(243,244,246,.85);
  --line: rgba(15,23,42,.10); --line-strong: rgba(15,23,42,.20);
  --text: #1f2937; --muted: #6b7280; --accent: #374151; --accent2: #1f2937; --on-accent: #ffffff;
  --ok: #16a34a; --danger: #dc2626; --warn: #b45309;
  --shadow: 0 10px 30px rgba(15,23,42,.08); --backdrop: rgba(15,23,42,.35); --topbar: rgba(255,255,255,.62);
  --bg-image: url(/backgrounds/dunes.svg); --radius: 14px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); min-height: 100vh;
  background: var(--bg) var(--bg-image) center / cover no-repeat fixed;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 15px; }
.card, .tile, .topbar, table td, .empty, .viewbar { -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
a { color: inherit; }
.hidden { display: none !important; }

/* Kopfzeile */
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px 24px;
  background: var(--topbar); border-bottom: 1px solid var(--line); }
.topbar .brand { font-weight: 700; font-size: 18px; flex: 1; display: flex; align-items: center; gap: 10px; }
.topbar .brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.topbar .who { color: var(--muted); font-size: 14px; }

/* Buttons & Formulare */
button, .btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: var(--line-strong); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
input, select, textarea { width: 100%; background: var(--field); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=checkbox] { width: auto; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin: 6px 0; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin-top: 10px; }
.muted { color: var(--muted); }

/* Login */
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); width: 100%; max-width: 380px; }
.card h1 { margin: 0 0 4px; font-size: 22px; }
.card .btn-primary { width: 100%; margin-top: 18px; padding: 11px; }

/* Portal-Kacheln */
main { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
main h2 { font-size: 20px; margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: transform .12s, border-color .12s; cursor: pointer; }
.tile:hover { transform: translateY(-2px); border-color: var(--tile, var(--accent)); }
.tile .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 26px;
  background: color-mix(in srgb, var(--tile, var(--accent)) 22%, transparent); }
.tile .name { font-weight: 600; font-size: 16px; }
.tile .desc { color: var(--muted); font-size: 13px; line-height: 1.4; }
.tile .off { font-size: 12px; color: var(--warn); }
.empty { background: var(--panel); color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Admin */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 0; color: var(--muted); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; }
td { padding: 12px 10px; background: var(--panel); border-top: 1px solid var(--line); vertical-align: middle; }
td .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); }
.badge.admin { color: var(--accent2); border-color: var(--accent); }
.badge.off { color: var(--warn); }
.table-wrap { overflow-x: auto; }

/* Dialog */
dialog { background: var(--panel-solid); box-shadow: 0 24px 60px rgba(0,0,0,.25); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; width: min(560px, calc(100vw - 32px)); max-height: 90vh; }
dialog::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.applist { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--field); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* App-Ansicht im Rahmen */
.viewbar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--topbar); border-bottom: 1px solid var(--line); height: 48px; }
.viewbar .title { font-weight: 600; flex: 1; }
.viewframe { width: 100%; height: calc(100vh - 48px); border: 0; display: block; background: #fff; }

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; } main { padding: 20px 16px; }
  .row2 { grid-template-columns: 1fr; }
  .topbar .who { display: none; }
}

/* Server-Apps (Docker) */
dialog.wide { width: min(880px, calc(100vw - 32px)); }
.hint { font-size: 13px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; line-height: 1.45; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--panel2); padding: 1px 5px; border-radius: 4px; }
.small { font-size: 13px; }
.mg-head { display: flex; align-items: center; gap: 12px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.section h4 { margin: 0 0 6px; font-size: 15px; }
details.section summary { cursor: pointer; list-style: none; }
details.section summary::-webkit-details-marker { display: none; }
details.section textarea { margin-top: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.containers { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ctr { display: flex; align-items: center; gap: 7px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #6b7280; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--danger); } .dot.busy { background: #f59e0b; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
pre.log { background: #000; color: #d1d5db; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0;
  max-height: 300px; overflow: auto; font: 12px/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.progress { height: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* Zwei-Faktor */
.card.wide-card { max-width: 480px; }
.shield { font-size: 34px; margin-bottom: 6px; }
.code-input { font-size: 24px; letter-spacing: 6px; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.steps { padding-left: 20px; line-height: 1.55; font-size: 14px; }
.steps li { margin: 8px 0; }
.qr { background: #fff; border-radius: 10px; padding: 6px; width: 200px; height: 200px; margin: 10px 0; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0 4px; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.codes code { font-size: 15px; padding: 8px; text-align: center; }

/* Google-Anmeldung & Einladung */
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { display: flex !important; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px;
  background: #fff; color: #1f2937; border-color: var(--line-strong); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn-google:hover { background: #f8f9fa; }
.invite-link { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--field); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; word-break: break-all; user-select: all; }

/* Settings → Appearance */
.card.appearance { max-width: 860px; margin-bottom: 18px; }
#tab-settings .card { max-width: 860px !important; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--field); }
.seg button { border: 0; border-radius: 0; background: transparent; padding: 9px 16px; }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--panel-solid); box-shadow: 0 0 0 1px var(--line-strong); padding: 0; cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--text); }
.swatches input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 8px; cursor: pointer; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.bg-item { border: 2px solid transparent; border-radius: 12px; padding: 0; overflow: hidden; background: var(--field); cursor: pointer; text-align: left; }
.bg-item .thumb { height: 82px; background: #e5e7eb center / cover no-repeat; }
.bg-item .lbl { display: block; padding: 7px 10px; font-size: 13px; }
.bg-item.on { border-color: var(--accent); box-shadow: var(--shadow); }

/* Anmeldeseite: große Uhr wie beim Sperrbildschirm */
.clock { position: fixed; left: 56px; bottom: 48px; color: var(--text); pointer-events: none; text-shadow: 0 1px 12px rgba(255,255,255,.35); }
.clk-t { font-size: 96px; font-weight: 300; line-height: 1; letter-spacing: -2px; }
.clk-d { font-size: 22px; font-weight: 400; margin-top: 8px; opacity: .85; }
.hello { display: inline-block; margin-bottom: 22px; padding: 14px 22px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
.hello h2 { font-size: 30px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.3px; }
main h2 { margin-bottom: 18px; }
.tile .ico { box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 900px), (max-height: 600px) { .clock { display: none; } }

main.glass-main { margin-top: 24px; margin-bottom: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
main.glass-main table td { background: var(--panel-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
main.glass-main .card { background: var(--panel-solid); }
@media (max-width: 1150px) { main.glass-main { margin-left: 16px; margin-right: 16px; } }

.note { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45;
  color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.note b { color: var(--text); font-weight: 600; }
.err:empty { min-height: 0; margin: 0; }

/* ===== Startseite (v1.8) ===== */
.home-bar { border-bottom: 1px solid var(--line); }
.logo-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 22px; height: 22px; }
.logo-mark i { border-radius: 3px; background: var(--text); }
.logo-mark i:nth-child(2) { opacity: .7; } .logo-mark i:nth-child(3) { opacity: .5; } .logo-mark i:nth-child(4) { opacity: .3; }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--panel); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); letter-spacing: .5px; }
.user-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.user-text b { font-size: 14px; font-weight: 600; } .user-text small { font-size: 11.5px; color: var(--muted); }
.chev { color: var(--muted); font-size: 12px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; z-index: 20;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font-size: 14px; text-decoration: none; color: var(--text); }
.menu-item:hover { background: var(--panel2); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }

main.home { max-width: 1040px; padding: 6vh 24px 32px; display: flex; flex-direction: column; align-items: center; min-height: calc(100vh - 66px); }
.hero { text-align: center; width: 100%; margin-bottom: 28px; }
.hero-time { font-size: clamp(56px, 8vw, 92px); font-weight: 300; letter-spacing: -2px; line-height: 1; color: var(--text); }
.hero h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin: 14px 0 4px; letter-spacing: -.3px; }
.hero-date { color: var(--muted); font-size: 15px; }
.search { display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 26px auto 0; padding: 0 18px; height: 50px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
.search svg { color: var(--muted); flex: none; }
.search input { border: 0; background: transparent; padding: 0; height: 100%; font-size: 15px; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }

.apps-panel { width: 100%; padding: 22px 24px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 15px; margin: 0 4px 16px; }
.panel-head .muted { font-weight: 400; font-size: 13px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.app { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 18px 12px 16px; border: 1px solid transparent; border-radius: 16px; background: transparent; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s; }
.app:hover, .app:focus-visible { background: var(--panel-solid); border-color: var(--line); transform: translateY(-2px); box-shadow: var(--shadow); outline: none; }
.app-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 34px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 32%, var(--panel-solid)), color-mix(in srgb, var(--c) 12%, var(--panel-solid)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent), 0 6px 14px color-mix(in srgb, var(--c) 22%, transparent); }
.app-name { font-weight: 600; font-size: 14.5px; }
.app-desc { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-flag { position: absolute; top: 8px; right: 10px; font-size: 11px; color: var(--muted); }
.empty-apps { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 36px 10px; line-height: 1.6; }
.home-foot { margin-top: auto; padding-top: 28px; font-size: 12px; }
@media (max-width: 600px) {
  .user-text, .chev { display: none; } .user-chip { padding: 4px; }
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  main.home { padding-top: 4vh; }
}
.hero { text-shadow: 0 1px 16px color-mix(in srgb, var(--bg) 75%, transparent); }

/* ===== Startseite modern (v1.9) ===== */
#portal { position: relative; isolation: isolate; }
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .55;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
  animation: drift 26s ease-in-out infinite alternate; }
.ambient span:nth-child(1) { top: -18vmax; left: -10vmax; }
.ambient span:nth-child(2) { bottom: -22vmax; right: -14vmax; animation-duration: 32s; background: radial-gradient(circle, rgba(255,255,255,.55), transparent 65%); }
.ambient span:nth-child(3) { top: 30%; left: 55%; width: 30vmax; height: 30vmax; animation-duration: 38s; opacity: .35; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .ambient span, .app { animation: none !important; } }

.topbar.home-bar { position: sticky; top: 12px; z-index: 10; max-width: 1180px; margin: 12px auto 0; width: calc(100% - 24px);
  border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px 10px 18px; box-shadow: var(--shadow); }
.menu-item { display: flex; align-items: center; gap: 10px; }
.menu-item svg { opacity: .75; flex: none; }

main.home { padding-top: 7vh; min-height: calc(100vh - 80px); }
.hero-time { font-weight: 200; letter-spacing: -3px;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 55%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.hero h1 { margin-top: 10px; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 13px; color: var(--muted); padding: 5px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.chip:empty { display: none; }
.search { height: 54px; margin-top: 28px; transition: box-shadow .2s, border-color .2s; }
.search:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow); }
.search kbd { font: 12px ui-monospace, Consolas, monospace; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 7px; }

.recent { width: 100%; margin-bottom: 16px; }
.recent .panel-head { margin-bottom: 10px; }
.recent-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.recent-item { display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-weight: 500; }
.recent-item:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.r-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 18px;
  background: color-mix(in srgb, var(--c) 22%, var(--panel-solid)); }

.apps-panel { padding: 24px 26px 28px; border-radius: 26px; }
.app-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.app-wrap { position: relative; width: 188px; }
.app-wrap > .app { height: 100%; }
.app-settings { position: absolute; top: 10px; right: 10px; z-index: 1; width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); }
.app-settings:hover, .app-settings:focus-visible { color: var(--text); background: var(--panel-solid); border-color: var(--accent); }
.app-with-settings .app-go { right: 46px; }
.app { width: 188px; min-height: 196px; padding: 26px 16px 20px; gap: 10px; border-radius: 22px;
  background: color-mix(in srgb, var(--panel-solid) 70%, transparent); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.04); animation: rise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s, background .25s; }
.app:hover, .app:focus-visible { transform: translateY(-5px); background: var(--panel-solid);
  border-color: color-mix(in srgb, var(--c) 40%, var(--line));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--c) 22%, transparent), 0 2px 6px rgba(0,0,0,.06); }
.app:active { transform: translateY(-2px) scale(.98); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.app-ico { width: 76px; height: 76px; border-radius: 22px; font-size: 40px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 38%, var(--panel-solid)), color-mix(in srgb, var(--c) 14%, var(--panel-solid)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent), 0 10px 22px color-mix(in srgb, var(--c) 28%, transparent);
  transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.app-ico::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.45), transparent 48%); pointer-events: none; }
.app:hover .app-ico { transform: scale(1.06); }
.app-name { font-size: 15.5px; margin-top: 4px; }
.app-go { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); background: var(--panel2); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s; }
.app:hover .app-go, .app:focus-visible .app-go { opacity: 1; transform: none; color: var(--text); }
.home-foot { display: none; }
@media (max-width: 600px) {
  .app { width: calc(50% - 8px); min-height: 170px; }
  .topbar.home-bar { top: 8px; margin-top: 8px; }
  .search kbd { display: none; }
}
.recent .panel-head { justify-content: center; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--muted); font-weight: 600; }

/* „+ Add app“-Karte (nur Admin) */
.app.app-add { text-decoration: none; color: var(--muted); background: transparent; border: 2px dashed var(--line-strong); box-shadow: none; justify-content: center; }
.app.app-add:hover, .app.app-add:focus-visible { color: var(--text); border-color: var(--accent); background: var(--panel-solid);
  box-shadow: 0 14px 34px rgba(0,0,0,.08); }
.add-plus { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--panel2);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s, color .25s; }
.app-add:hover .add-plus { transform: rotate(90deg) scale(1.05); background: var(--accent); color: var(--on-accent); }
.app-add .app-name { color: inherit; }

/* Online-Zeit nach dem Verlassen (v2.1) */
.idle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.idle-row input { width: 110px; }
.idle-presets { display: flex; gap: 6px; flex-wrap: wrap; }

/* Versionsanzeige (v2.2) */
.app-ver { display: inline-block; margin-top: -2px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--muted); background: var(--panel2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.app-ver.none { font-weight: 500; font-style: italic; background: transparent; border-style: dashed; }
.menu-version { padding: 8px 12px 4px; font-size: 11.5px; color: var(--muted); text-align: right; }
.menu-version:empty { display: none; }
.portal-ver { margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--muted); background: var(--panel2); border: 1px solid var(--line); }
.portal-ver:empty { display: none; }

/* ===== Verwaltung: App-Liste als Karten (v2.3) ===== */
main.glass-main { max-width: 1180px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 18px; }
.section-head h2 { margin: 0 0 4px; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.section-head p { margin: 0; font-size: 13.5px; }
.section-head .count:not(:empty) { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.section-head button svg, .ar-actions svg, .chip svg { vertical-align: -2px; }
.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 18px;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: box-shadow .2s, border-color .2s, transform .2s; }
.app-row::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); opacity: .85; }
.app-row:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--line)); box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--c) 45%, transparent); }
.app-row.is-off { opacity: .65; }
.ar-ico { width: 60px; height: 60px; display: grid; place-items: center; font-size: 30px; border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 22%, var(--panel-solid)), color-mix(in srgb, var(--c) 8%, var(--panel-solid)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.ar-main { min-width: 0; }
.ar-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-title b { font-size: 16.5px; letter-spacing: -.1px; }
.ar-desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; font-size: 12px; font-weight: 500; white-space: nowrap;
  color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; text-decoration: none; }
.chip.ver { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.chip.ver.none { font-weight: 500; font-style: italic; color: var(--muted); background: transparent; border-style: dashed; }
.chip.sso { color: #b45309; background: color-mix(in srgb, #f59e0b 14%, transparent); border-color: color-mix(in srgb, #f59e0b 35%, transparent); }
.chip.off { color: var(--warn); }
.chip.link { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.chip.link:hover { color: var(--accent); border-color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; font-size: 12px; font-weight: 600; border-radius: 99px; }
.pill.ok { color: #16a34a; background: color-mix(in srgb, #22c55e 15%, transparent); } .pill.ok .dot { background: #16a34a; }
.pill.bad { color: #dc2626; background: color-mix(in srgb, #ef4444 15%, transparent); }
.pill.busy { color: #d97706; background: color-mix(in srgb, #f59e0b 16%, transparent); }
.pill.sleep { color: #6366f1; background: color-mix(in srgb, #6366f1 14%, transparent); } .pill.sleep .dot { background: #6366f1; }
.pill.idle { color: var(--muted); background: var(--panel2); }
.ar-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.ar-actions .btn-sm { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn-sm.icon-only { width: 34px; padding: 0; justify-content: center; align-self: stretch; }
.ar-actions .btn-sm { min-height: 32px; }
.danger-ghost { color: var(--muted); }
.danger-ghost:hover { color: #dc2626; border-color: color-mix(in srgb, #ef4444 45%, transparent); background: color-mix(in srgb, #ef4444 10%, transparent); }
.empty-list { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px; text-align: center;
  border: 1.5px dashed var(--line-strong, var(--line)); border-radius: 18px; color: var(--muted); }
.empty-list b { color: var(--text); }
@media (max-width: 1000px) {
  .app-row { grid-template-columns: 52px minmax(0, 1fr); }
  .ar-ico { width: 52px; height: 52px; font-size: 26px; }
  .ar-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
}
@media (max-width: 700px) {
  .section-head { flex-direction: column; align-items: stretch; }
  .section-head .btnrow > * { flex: 1; }
  .app-row { padding: 14px; gap: 12px; border-radius: 16px; align-items: start; }
  .ar-desc { white-space: normal; }
  .ar-actions .btn-sm:not(.icon-only) { flex: 1; justify-content: center; }
}

/* ===== Fußzeile auf allen Seiten (v2.4) ===== */
body.has-site-foot { padding-bottom: var(--foot-h, 46px); }
.site-foot { position: fixed; left: 0; right: 0; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: center;
  pointer-events: none; }
.site-foot.sf-align-left { justify-content: flex-start; padding-left: max(24px, env(safe-area-inset-left)); }
.site-foot.sf-align-right { justify-content: flex-end; padding-right: max(24px, env(safe-area-inset-right)); }
.sf-wrap { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); pointer-events: auto; }
.sf-wrap.sf-left { justify-content: flex-start; } .sf-wrap.sf-right { justify-content: flex-end; }
.sf-logo { display: block; width: auto; max-width: 180px; object-fit: contain; }
.sf-line { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 0 2px;
  font-family: 'Segoe UI Variable Text', 'Segoe UI', Inter, system-ui, -apple-system, sans-serif; font-size: 12.5px; font-weight: 450;
  line-height: 1.4; letter-spacing: .15px; color: color-mix(in srgb, var(--text) 58%, transparent); pointer-events: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.sf-line b { font-weight: 600; color: color-mix(in srgb, var(--text) 78%, transparent); }
.sf-sep { margin: 0 7px; opacity: .65; font-weight: 700; }
.sf-ver { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; font-weight: 500; }
#footerSlot .site-foot { position: static; margin-top: 18px; }
#footerSlot .site-foot span { background: transparent; border: 0; box-shadow: none; padding: 0; }
.ph-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.ph-row .btn-sm { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.footer-preview { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.footer-preview #footerPreview { margin-top: 2px; font-size: 13px; }
@media print { .site-foot { position: static; } }

/* ===== Anmeldeart je Benutzer (v2.5) ===== */
.signin-mode { margin-top: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.seg-opt { position: relative; display: block; margin: 0; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel-solid); transition: border-color .15s, box-shadow .15s, background .15s; }
.seg-opt b { font-size: 14px; } .seg-opt small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.seg-opt input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, var(--panel-solid)); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-opt input:disabled + span { cursor: not-allowed; opacity: .75; }
#mfaModeHint:not(:empty) { margin-top: 6px; }
@media (max-width: 700px) { .seg { grid-template-columns: 1fr; } }

/* ===== Portal-Update in den Einstellungen (v2.6) ===== */
.pu-card { margin-bottom: 16px; }
.pu-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.pu-status { margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--panel2); }
.pu-status.running, .pu-status.restarting { color: #b45309; background: color-mix(in srgb, #f59e0b 14%, transparent); }
.pu-status.done { color: #15803d; background: color-mix(in srgb, #22c55e 14%, transparent); }
.pu-status.error { color: #b91c1c; background: color-mix(in srgb, #ef4444 12%, transparent); }
.pu-log { max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px 12px; font-size: 12px; line-height: 1.45; white-space: pre-wrap;
  background: #0f172a; color: #cbd5e1; border-radius: 10px; }
.pu-backups { margin-top: 12px; }
.pu-backups summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.pu-b { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* ===== Fußzeile: Logo, Position, Schrift (v2.7) ===== */
.seg3 { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-solid); }
.seg3 label { flex: 1; margin: 0; position: relative; cursor: pointer; }
.seg3 input { position: absolute; opacity: 0; pointer-events: none; }
.seg3 span { display: block; padding: 8px 6px; text-align: center; font-size: 13px; white-space: nowrap; border-right: 1px solid var(--line); }
.seg3 label:last-child span { border-right: 0; }
.seg3 input:checked + span { background: var(--accent); color: var(--on-accent, #fff); font-weight: 600; }
.seg3 input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.logo-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.logo-thumb { width: 96px; height: 64px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 10px;
  font-size: 12px; color: var(--muted); background: var(--panel2); overflow: hidden; }
.logo-thumb img { max-width: 88px; max-height: 56px; object-fit: contain; }
.fp-stage { margin-top: 6px; padding: 14px 10px; border-radius: 10px; background: var(--bg) var(--bg-image) center / cover; min-height: 44px; }
.site-foot.fp-foot { position: static; display: flex; padding-left: 0; padding-right: 0; }

/* ===== Kopf des Anmeldefensters (v2.8) ===== */
.login-head { display: flex; flex-direction: column; align-items: flex-start; text-align: left; margin-bottom: 4px; }
.login-head.lh-center { align-items: center; text-align: center; }
.login-head.lh-right { align-items: flex-end; text-align: right; }
.login-head h1 { margin: 0 0 4px; }
.lh-logo { display: block; width: auto; max-width: 100%; object-fit: contain; margin-bottom: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lh-preview { margin-top: 6px; padding: 18px; border-radius: 12px; background: var(--bg) var(--bg-image) center / cover; }
.lh-preview .card { max-width: 340px; margin: 0 auto; padding: 22px; }
.lh-preview .fake-input { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-solid); margin-top: 8px; }

/* ===== Versionsverlauf / What's new (v2.9) ===== */
.vh-box { margin: 6px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.vh-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.vh-box details { margin-top: 10px; } .vh-box summary { cursor: pointer; font-size: 13.5px; }
.vh-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 300px; overflow: auto; }
.vh-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.vh-list li:last-child { border-bottom: 0; }
.vh-li-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.vh-li-note { margin-top: 3px; font-size: 13.5px; white-space: pre-wrap; line-height: 1.45; }
.app-ver[role=button] { cursor: pointer; }
.app-ver[role=button]:hover, .app-ver[role=button]:focus-visible { border-color: var(--accent); color: var(--text); outline: none; }
.app-ver.has-notes::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.wn-dlg { width: min(520px, 94vw); }

/* ===== Zahnrad-Menü (v2.10) ===== */
.app-menu { position: fixed; z-index: 1000; min-width: 250px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 14px;
  background: var(--panel-solid); border: 1px solid var(--line); box-shadow: 0 18px 50px -12px rgba(15, 23, 42, .35), 0 2px 6px rgba(15, 23, 42, .08);
  animation: am-in .12s ease-out; }
@keyframes am-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .app-menu { animation: none; } }
.am-head { padding: 8px 12px 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-ver { font-weight: 500; opacity: .8; }
.am-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font-size: 14.5px; text-align: left; cursor: pointer; }
.am-item svg { flex: none; color: var(--muted); }
.am-item:hover, .am-item:focus-visible { background: var(--panel2); outline: none; }
.am-item.danger, .am-item.danger svg { color: #dc2626; }
.am-item.danger:hover, .am-item.danger:focus-visible { background: color-mix(in srgb, #ef4444 10%, transparent); }
.am-sep { height: 1px; margin: 4px 6px; background: var(--line); }
/* Zahnrad-Fenster je nach Auswahl nur mit dem passenden Teil */
#updateDlg[data-mode="update"] .us-notes, #updateDlg[data-mode="update"] .us-tools,
#updateDlg[data-mode="notes"] .us-tools, #updateDlg[data-mode="notes"] .us-update, #updateDlg[data-mode="notes"] #updateSave { display: none; }
#updateDlg[data-mode="notes"] .vh-box { margin-bottom: 0; }

/* ===== Handy & Tablet (v2.0) ===== */
.btn svg, button svg { vertical-align: -4px; }
.viewbar { gap: 8px; padding: 8px max(10px, env(safe-area-inset-left)); }
.viewbar .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.viewframe { height: calc(100vh - 48px); height: calc(100dvh - 48px); }
.tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; }

@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; }
  /* iOS zoomt bei Eingabefeldern unter 16 px automatisch hinein → verhindern */
  input, select, textarea { font-size: 16px; }
  button, .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .lbl { display: none; }
  .topbar { gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar .brand { font-size: 16px; }

  /* Startseite */
  .topbar.home-bar { width: calc(100% - 16px); top: 8px; margin-top: max(8px, env(safe-area-inset-top)); padding: 8px 8px 8px 14px; }
  main.home { padding: 26px 14px calc(24px + env(safe-area-inset-bottom)); }
  .hero-time { font-size: 64px; }
  .hero h1 { font-size: 22px; }
  .search { height: 50px; margin-top: 20px; }
  .apps-panel { padding: 16px 12px 18px; border-radius: 22px; }
  .app-grid { gap: 10px; }
  .app, .app-wrap { width: calc(50% - 5px); }
  .app { min-height: 0; padding: 18px 10px 14px; border-radius: 18px; }
  .app-wrap > .app { width: 100%; }
  .app-settings { width: 36px; height: 36px; top: 6px; right: 6px; min-height: 0; }
  .app-ico, .add-plus { width: 64px; height: 64px; border-radius: 18px; font-size: 34px; }
  .app-go { display: none; }
  .menu { min-width: 240px; border-radius: 16px; padding: 8px; right: -4px; }
  .menu-item { padding: 14px; font-size: 16px; }

  /* Anmeldung */
  .center { padding: 16px; align-items: start; padding-top: 12vh; }
  .card { padding: 22px 18px; }

  /* Verwaltung */
  main.glass-main { margin: 10px 8px 16px; padding: 14px 12px; border-radius: 18px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btnrow { justify-content: stretch; } .toolbar .btnrow > * { flex: 1; }
  /* Tabellen werden zu Karten (außer Berechtigungs-Matrix) */
  .table-wrap table:not(#matrix), .table-wrap table:not(#matrix) tbody { display: block; }
  .table-wrap table:not(#matrix) thead { display: none; }
  .table-wrap table:not(#matrix) tr { display: grid; grid-template-columns: 44px 1fr; gap: 2px 8px; padding: 12px; margin-bottom: 10px;
    background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px; }
  .table-wrap table:not(#matrix) td { display: block; padding: 2px 0; border: 0; background: none !important; grid-column: 1 / -1; }
  .table-wrap table:not(#matrix) td.c-ico { grid-column: 1; grid-row: 1; width: auto !important; }
  .table-wrap table:not(#matrix) td.c-ico + td.c-main { grid-column: 2; grid-row: 1; }
  .table-wrap table:not(#matrix) td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
  .table-wrap table:not(#matrix) td[data-label] { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
  .table-wrap table:not(#matrix) td.c-act { padding-top: 8px; }
  td .actions { justify-content: flex-start; }
  #matrix th, #matrix td { padding: 8px 6px; font-size: 13px; }

  /* Dialoge als Blatt von unten */
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92vh; max-height: 92dvh;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  dialog.wide { width: 100%; }
  .dlg-actions { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: var(--panel-solid);
    padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); margin-top: 14px; border-top: 1px solid var(--line); }
  .dlg-actions > * { flex: 1; }
  .btnrow > button, .btnrow > .btn { flex: 1 1 auto; }
  .bg-grid { grid-template-columns: repeat(2, 1fr); }
  .codes { grid-template-columns: 1fr; }
  .clock { display: none; }
}
@media (display-mode: standalone) {
  .topbar.home-bar { margin-top: max(8px, env(safe-area-inset-top)); }
}
