/* Social Insights – Navigations-Gerüst (Panes) und iOS-Darstellung am iPhone (seit 2.7)
   Desktop/Tablet: Seitenleiste wie bisher, Seiten als scrollende Fläche rechts.
   iPhone (< 900 px): Tab-Bar, Navigationsleiste mit großem Titel, Push/Pop, Sheets, inset-grouped Listen. */
[hidden] { display: none !important; }
:root { --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); }
html { -webkit-tap-highlight-color: transparent; }

/* ------------------------------------------------------------------ Gerüst (alle Größen) */
.shell { height: 100vh; height: 100dvh; }
.main { height: 100vh; height: 100dvh; overflow: hidden; }
.stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.pane { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--page); z-index: 1; }
.pane.below { visibility: hidden; pointer-events: none; z-index: 0; }
.pane.peek, .pane.leaving { visibility: visible; z-index: 0; }
.pane.popping, .pane.dragging { z-index: 2; }
.pane-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.navbar { position: relative; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 12px 28px; min-height: 59px;
  background: color-mix(in srgb, var(--page) 88%, transparent); border-bottom: 1px solid var(--border); }
.nb-left { display: none; }
.nb-title { font-weight: 650; font-size: 15px; margin-right: auto; min-width: 0; }
.nb-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-right { display: flex; align-items: center; gap: 8px; }
.tabbar, .status-scrim, .ptr { display: none; }
.sticky-col > .card { top: 16px; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.offline-note { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 28px; background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-border); font-size: 13px; }
.offline-note svg { width: 17px; height: 17px; flex: none; }
.offline-note .btn { margin-left: auto; color: inherit; }
.sys-banner { position: fixed; right: 20px; bottom: 20px; z-index: 95; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 14px; }
.sys-banner > svg { width: 18px; height: 18px; color: var(--accent-ink); }
#sheet-root .modal-back { z-index: 70; }
.grabber { display: none; }
.sheet-head { padding: 18px 20px 4px; }
.sheet-head h2 { font-size: 17px; }
.sheet-body { padding: 12px 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.sheet-body .confirm-box { border: 0; padding: 0; background: transparent; margin: 0; }
.btn.lg { height: 46px; font-size: 15.5px; border-radius: 12px; }
.btn svg { pointer-events: none; }
.copied { color: var(--good) !important; border-color: var(--good) !important; }
.btn.primary.copied { background: var(--good) !important; color: #fff !important; }
.cp-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.danger-t { color: var(--bad); }
.lead.clamp { cursor: default; }

/* Action-Sheet (auch Desktop: mittig) */
.as-back { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.36); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn 0.18s ease; }
.as { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 8px; animation: sheetUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.as-group { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border-radius: 14px; overflow: hidden; }
.as-title { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; text-align: center; font-size: 13px; color: var(--muted); border-bottom: 0.5px solid var(--border-strong); }
.as-title b { font-weight: 600; }
.as-btn { width: 100%; min-height: 56px; border: 0; background: transparent; color: var(--accent); font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; position: relative; }
.as-btn + .as-btn { border-top: 0.5px solid var(--border-strong); }
.as-btn svg { width: 20px; height: 20px; }
.as-btn .as-check { position: absolute; right: 18px; }
.as-btn.destructive { color: #ff3b30; }
.as-btn:active { background: var(--surface-hover); }
.as-cancel { background: var(--surface); border-radius: 14px; font-weight: 600; }

/* Inset-grouped Listen („Mehr“, Einstellungs-Index, Schalter) */
.il { background: var(--surface); border-radius: 12px; overflow: hidden; margin: 0 0 22px; border: 1px solid var(--border); }
.il-h { font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); padding: 0 16px 7px; margin-top: 4px; }
.il-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 16px; width: 100%; border: 0; background: transparent; color: var(--text); text-decoration: none; font-size: 15.5px; text-align: left; cursor: pointer; }
@media (hover: hover) { .il-row:hover { background: var(--surface-hover); text-decoration: none; } }
.il-row:hover { text-decoration: none; }
.il-row:active { background: var(--surface-hover); }
.il-row + .il-row::before, .il-row + div.il-row::before { content: ""; position: absolute; left: 57px; right: 0; top: 0; border-top: 0.5px solid var(--border-strong); }
.il-row.static { cursor: default; }
@media (hover: hover) { .il-row.static:hover { background: transparent; } }
.il-row.destructive { justify-content: center; color: #ff3b30; }
.il-row.destructive::before { left: 0; }
.il-ic { width: 29px; height: 29px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.il-ic svg { width: 17px; height: 17px; }
.il-l { flex: 1 1 auto; min-width: 0; }
.il-d { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.il-chev { color: var(--muted); opacity: 0.6; flex: none; }
.il-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #ff3b30; color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.il-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin: -6px 0 24px; }
.il-tight .il-row { min-height: 44px; font-size: 14.5px; }
.il-tight .il-row::before { left: 16px !important; }
.sw-line { justify-content: space-between; }
.sw-line select.input { width: auto; min-width: 76px; }
.sw-line input[type=time] { width: 132px; flex: none; }
.c-blue { background: #0a84ff; } .c-indigo { background: #5e5ce6; } .c-purple { background: #bf5af2; } .c-pink { background: #ff375f; }
.c-red { background: #ff453a; } .c-orange { background: #ff9f0a; } .c-yellow { background: #e0a800; } .c-green { background: #30d158; }
.c-teal { background: #32ade6; } .c-gray { background: #8e8e93; }
.settings-index { display: none; }

/* iOS-Schalter */
.ios-switch { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 16px; background: rgba(120, 120, 128, 0.32); position: relative; cursor: pointer; flex: none; transition: background 0.2s; margin: 0; }
.ios-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ios-switch:checked { background: #34c759; }
.ios-switch:checked::after { transform: translateX(20px); }

/* Sicherheits-Karten */
.sec-card .label b { display: flex; align-items: center; gap: 8px; }
.sec-ic { width: 18px; height: 18px; color: var(--accent-ink); }
.li { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.li-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 52px; }
.li-row + .li-row { border-top: 1px solid var(--border); }
.li-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.li-ic svg { width: 18px; height: 18px; }
.li-row .grow { flex: 1 1 auto; min-width: 0; }
.li-row .btn.icon.sm { width: 36px; padding: 0; }
.sub-h { font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.totp-box { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.totp-qr svg { display: block; width: 170px; height: 170px; border-radius: 8px; }
.totp-secret { display: block; font-size: 15px; letter-spacing: 0.06em; padding: 8px 10px; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); user-select: all; word-break: break-all; }
.reauth-pw { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 0; }

/* Swipe-Aktionen */
.sw-row { position: relative; overflow: hidden; border-radius: var(--radius); min-width: 0; }
.sw-row > .card, .sw-row > .slot, .sw-row > .q-li { position: relative; z-index: 1; margin: 0; will-change: transform; }
.sw-acts { position: absolute; top: 0; bottom: 0; display: flex; z-index: 0; }
.sw-acts.lead { left: 0; }
.sw-acts.trail { right: 0; }
.sw-row:not(.sw-left) .sw-acts.trail, .sw-row:not(.sw-right) .sw-acts.lead { visibility: hidden; }
.sw-btn { width: 86px; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sw-btn svg { width: 22px; height: 22px; }
.sw-full .sw-acts.trail .sw-btn:last-child { width: 100vw; }
.sw-full .sw-acts.lead .sw-btn:first-child { width: 100vw; }
.sw-blue { background: #0a84ff; } .sw-red { background: #ff3b30; } .sw-green { background: #34c759; } .sw-gray { background: #8e8e93; }

/* Skeleton */
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-hover) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
.sk-line { height: 13px; margin-top: 10px; border-radius: 6px; }
.sk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sk-card { height: 92px; }
.sk-block { height: 220px; margin-bottom: 16px; }
.sk-block.short { height: 120px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* Login / Offline */
.login-mark { display: flex; justify-content: center; margin: 4px 0 14px; }
.login-mark img { border-radius: 18px; box-shadow: 0 6px 22px rgba(23, 71, 166, 0.28); }
.login-title { text-align: center; }
.login-lead { text-align: center; }
#pk-area { margin-bottom: 14px; }
#pk-area .btn svg { width: 22px; height: 22px; }
.mt-sm { margin-top: 10px; }
#pw-blocked { margin-bottom: 14px; }

/* ------------------------------------------------------------------ iPhone */
@media (max-width: 899px) {
  :root {
    --nav-h: calc(44px + var(--sat));
    --tab-h: calc(50px + var(--sab));
    --gutter: max(16px, var(--sal));
    --gutter-r: max(16px, var(--sar));
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
    --page: #f2f2f7; --surface: #ffffff; --surface-2: #f2f2f7; --surface-hover: #e5e5ea;
    --accent: #007aff; --accent-ink: #0060df; --accent-soft: rgba(0, 122, 255, 0.12);
    --border: rgba(60, 60, 67, 0.12); --border-strong: rgba(60, 60, 67, 0.29);
    --radius: 12px; --radius-sm: 10px; --shadow: none;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --page: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-hover: #3a3a3c;
      --accent: #0a84ff; --accent-ink: #409cff; --accent-soft: rgba(10, 132, 255, 0.18);
      --border: rgba(84, 84, 88, 0.36); --border-strong: rgba(84, 84, 88, 0.65);
    }
  }
  :root[data-theme="dark"] {
    --page: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-hover: #3a3a3c;
    --accent: #0a84ff; --accent-ink: #409cff; --accent-soft: rgba(10, 132, 255, 0.18);
    --border: rgba(84, 84, 88, 0.36); --border-strong: rgba(84, 84, 88, 0.65);
  }
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body { font-size: 15px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  input, textarea, select, .post-text, .caption, .cp-text, .cb-text, .log-text, .b-text, .q-text, code, .totp-secret, p, dd, td { -webkit-user-select: text; user-select: text; }
  .shell { position: fixed; left: 0; right: 0; top: 0; height: var(--vvh, 100dvh); display: block; background: var(--page); }
  .sidebar { display: none; }
  .main { position: absolute; inset: 0; height: auto; display: block; }
  .stage { position: absolute; inset: 0; }
  .demo-banner { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tab-h) + 8px); z-index: 30; border-radius: 12px; border: 1px solid var(--warn-border); padding: 7px 12px; }
  .pane { box-shadow: -12px 0 30px rgba(0, 0, 0, 0.14); }
  .pane.below { box-shadow: none; }
  .pane-scroll { position: absolute; inset: 0; padding-top: var(--nav-h); padding-bottom: calc(var(--tab-h) + 28px); scroll-padding-top: calc(var(--nav-h) + 10px); transition: padding-top 0.25s ease; }
  body.kb-open .pane-scroll { padding-bottom: 24px; }
  .content { padding: 4px var(--gutter-r) 8px var(--gutter); max-width: none; }

  /* Navigationsleiste: transparent über dem großen Titel, Material beim Scrollen */
  .navbar { position: absolute; top: 0; left: 0; right: 0; min-height: 0; height: var(--nav-h); padding: var(--sat) var(--gutter-r) 0 max(8px, var(--sal));
    gap: 4px; background: transparent; border-bottom: 0.5px solid transparent; transition: background-color 0.2s, border-color 0.2s; }
  .pane.scrolled .navbar { background: color-mix(in srgb, var(--page) 78%, transparent); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom-color: var(--border-strong); }
  .nb-left { display: flex; flex: 1 1 0; min-width: 0; }
  .nb-right { flex: 1 1 0; justify-content: flex-end; min-width: 0; gap: 2px; }
  .nb-title { position: absolute; left: 25%; right: 25%; bottom: 0; height: 44px; display: flex; align-items: center; justify-content: center; margin: 0;
    font-size: 17px; font-weight: 600; letter-spacing: -0.02em; opacity: 0; transition: opacity 0.18s; pointer-events: none; text-align: center; }
  .pane.titled .nb-title { opacity: 1; pointer-events: auto; }
  .nb-back { display: inline-flex; align-items: center; gap: 0; height: 44px; padding: 0 8px 0 0; border: 0; background: transparent; color: var(--accent); font-size: 17px; cursor: pointer; max-width: 100%; }
  .nb-back svg { width: 30px; height: 30px; stroke-width: 2.4; flex: none; margin-left: -2px; }
  .nb-back-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nb-back:active { opacity: 0.4; }
  .theme-btn { display: none; }
  .sync-top .sync-btn { height: 44px; width: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); }
  .sync-top .sync-btn svg { width: 22px; height: 22px; }
  .sync-top .sync-label { display: none; }
  .sync-top .sync-btn .spin { width: 20px; height: 20px; }

  /* Großer Titel */
  .page-head { margin: 2px 0 14px; gap: 10px; }
  .page-head h1 { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.01em; }
  .page-head .lead { font-size: 15px; color: var(--muted); margin-top: 4px; }
  .lead.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lead.clamp.open { display: block; }
  .page-head > .row-gap { width: 100%; }
  .page-head > .row-gap .btn { flex: 1 1 auto; }
  .section-title { margin: 26px 2px 10px; }
  .section-title h2 { font-size: 20px; font-weight: 700; }
  .section-title .sub { font-size: 13px; }

  /* Pull-to-Refresh */
  .ptr { display: flex; position: absolute; left: 0; right: 0; top: calc(var(--nav-h) - 44px); height: 44px; align-items: center; justify-content: center; pointer-events: none; z-index: 0; opacity: var(--pull, 0); }
  .ptr-ic { display: inline-flex; color: var(--muted); transform: rotate(calc(var(--pull, 0) * 300deg)); }
  .ptr-ic svg { width: 24px; height: 24px; }
  .pane.ptr-ready .ptr-ic { color: var(--accent); }
  .pane.ptr-busy .pane-scroll { padding-top: calc(var(--nav-h) + 44px); }
  .pane.ptr-busy .ptr { opacity: 1; top: var(--nav-h); }
  .pane.ptr-busy .ptr-ic { animation: ptrSpin 0.8s linear infinite; color: var(--accent); }

  /* Tab-Bar */
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--tab-h); padding: 0 var(--sar) var(--sab) var(--sal);
    background: color-mix(in srgb, var(--page) 80%, transparent); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); border-top: 0.5px solid var(--border-strong); }
  .tab { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px; gap: 2px; color: #8e8e93; text-decoration: none; min-width: 0; }
  .tab:hover { text-decoration: none; }
  .tab svg { width: 27px; height: 27px; }
  .tab-l { font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; }
  .tab.on { color: var(--accent); }
  .tab.on svg { stroke-width: 2.3; }
  .tab:active svg { transform: scale(0.92); }
  .tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--page); }
  body.kb-open .tabbar, body.kb-open .demo-banner { display: none; }

  /* Statusleiste (black-translucent: weiße Schrift) – im hellen Design ein dezenter dunkler Verlauf darunter */
  @media (display-mode: standalone) {
    :root:not([data-theme="dark"]) .status-scrim { display: block; position: fixed; top: 0; left: 0; right: 0; height: var(--sat); z-index: 45; pointer-events: none;
      background: linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18)); }
  }
  @media (display-mode: standalone) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status-scrim { display: none; } }

  /* Karten, Buttons, Eingaben: iOS-Maße (44-pt-Tippflächen, 16 px gegen Zoom) */
  .card { border-color: transparent; border-radius: 12px; }
  :root[data-theme="dark"] .card { border-color: transparent; }
  .btn { height: 44px; padding: 0 16px; border-radius: 10px; font-size: 15.5px; font-weight: 600; border-color: transparent; background: var(--surface-2); }
  .btn.primary { background: var(--accent); color: #fff; }
  .btn.ghost { background: transparent; color: var(--accent); }
  .btn.danger { color: #ff3b30; }
  .btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; position: relative; }
  .btn.sm::after { content: ""; position: absolute; inset: -5px -2px; }
  .btn.icon { width: 44px; }
  .btn.lg { height: 50px; font-size: 17px; }
  .btn:active { opacity: 0.6; }
  .input, select.input, textarea.input { font-size: 16px; min-height: 44px; border-radius: 10px; }
  .input.sm, select.input.sm { font-size: 16px; height: 38px; }
  textarea.input { padding: 10px 12px; }
  .check { font-size: 15px; min-height: 36px; }
  .check input { width: 20px; height: 20px; }
  .cmp-text { font-size: 16px; }

  /* Segmented Controls */
  .seg { display: flex; background: rgba(118, 118, 128, 0.12); border: 0; border-radius: 9px; padding: 2px; gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: 1 0 auto; min-height: 32px; font-size: 13.5px; font-weight: 600; border-radius: 7px; color: var(--text); padding: 4px 12px; }
  .seg button.on { background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); }
  :root[data-theme="dark"] .seg button.on { background: #636366; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { background: #636366; } }
  @media (hover: none) { .btn:hover, .btn.ghost:hover, .nav a:hover { background: inherit; } .btn.primary:hover { background: var(--accent); } .q-li:not(.on):hover { background: transparent; } }
  .cm-tabs { position: sticky; top: 0; z-index: 4; margin: 0 calc(-1 * var(--gutter)) 14px; padding: 6px var(--gutter) 8px; border: 0; gap: 6px;
    background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); }
  .cm-tabs a { flex: none; padding: 7px 14px; border-radius: 17px; border: 0; margin: 0; font-size: 14px; font-weight: 600; background: rgba(118, 118, 128, 0.12); color: var(--text); }
  .cm-tabs a.on { background: var(--text); color: var(--page); }
  .filters { gap: 8px; }
  .filters .seg { flex-basis: 100%; }

  /* Listen-/Seitenelemente */
  .kpis, .kpis.kpis-4, .kpis.kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-col > .card { position: static; }
  .settings { gap: 12px; }
  .settings-row { padding: 14px; }
  .settings-index { display: block; }
  .il { border: 0; }
  .il-row { min-height: 44px; font-size: 17px; }
  .il-d { font-size: 17px; }
  .offline-note { position: sticky; top: 0; margin: 0 var(--gutter-r) 10px var(--gutter); border-radius: 12px; border: 1px solid var(--warn-border); padding: 9px 12px; }
  .sys-banner { left: 10px; right: 10px; top: calc(var(--sat) + 6px); bottom: auto; border-radius: 16px; }
  .toast { bottom: calc(var(--tab-h) + 14px); border-radius: 22px; padding: 11px 18px; max-width: calc(100vw - 32px); text-align: center; }
  body.kb-open .toast { bottom: 16px; }
  .ideas, .week { gap: 12px; }
  .q-li { min-height: 52px; }
  .ist-seg button { min-height: 44px; }
  .composer { padding: 12px; }
  .cmp-actions { flex-wrap: wrap; }
  .cmp-actions .cmp-send { width: 100%; height: 50px; font-size: 17px; }
  .cmp-copy span { display: none; }
  .cp-acts { width: 100%; }
  .cp-acts .btn { flex: 1 1 0; }
  .cprompt > summary { min-height: 44px; }

  /* Sheets: alle Modals als Bottom-Sheet */
  .modal-back { align-items: flex-end; padding: 0; overflow: hidden; background: rgba(0, 0, 0, 0.36); animation: fadeIn 0.2s ease; }
  .modal-back.closing { animation: fadeIn 0.24s ease reverse forwards; }
  .modal { max-width: none; width: 100%; min-height: 0; max-height: calc(var(--vvh, 100dvh) - var(--sat) - 10px); overflow-y: auto; overscroll-behavior: contain;
    border-radius: 13px 13px 0 0; border: 0; padding-bottom: var(--sab); animation: sheetUp 0.36s cubic-bezier(0.2, 0.8, 0.2, 1); background: var(--surface); }
  .grabber { display: block; position: sticky; top: 0; z-index: 3; height: 18px; margin-bottom: -18px; }
  .grabber::after { content: ""; position: absolute; left: 50%; top: 6px; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--border-strong); }
  .modal-head { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); padding: 20px 16px 12px; }
  .modal-body { padding: 14px 16px 20px; }
  .sheet-head { padding: 22px 18px 2px; text-align: center; }
  .sheet-body { padding: 10px 16px 20px; }
  .sheet .cb-actions { position: sticky; bottom: 0; display: flex; flex-direction: column-reverse; gap: 8px; padding: 10px 0 4px; background: var(--surface); }
  .sheet .cb-actions .btn { width: 100%; height: 50px; font-size: 17px; }
  .sheet .cb-title { display: none; }
  .as-back { align-items: flex-end; padding: 0 8px calc(var(--sab) + 8px); }
  .as { max-width: none; }

  /* Login */
  .login-body .setup { min-height: 100%; height: 100%; overflow-y: auto; align-items: flex-start; padding: calc(var(--sat) + 40px) 0 calc(var(--sab) + 24px); }
  .login-body .setup-card { background: transparent; border: 0; box-shadow: none; padding: 0 22px; }
  .login-body .login-title { font-size: 28px; }
  .offline-page .setup { height: 100%; }
}
@media (max-width: 899px) and (orientation: landscape) {
  .page-head h1 { font-size: 28px; line-height: 34px; }
}
@media (min-width: 900px) {
  .content { padding-top: 22px; }
  .modal-back .grabber { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal, .as, .modal-back, .as-back { animation: none !important; }
}
#quiet-times > .il-row::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; border-top: 0.5px solid var(--border-strong); }
