/* nextstep – Handy-Ansicht (bis 760px). Desktop bleibt unberührt. */

/* Bausteine der Handy-Listen (werden nur auf schmalen Bildschirmen erzeugt) */
.mlist{display:flex;flex-direction:column;gap:8px}
.mitem{background:var(--s1);border:1px solid var(--line);border-radius:13px;padding:11px 12px 10px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.mitem:active{background:var(--s3)}
.m-co{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-ti{font-size:15px;line-height:1.3;font-weight:650;margin-top:2px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.m-meta{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.m-meta .chip,.m-meta .badge{font-size:11.5px;padding:2px 7px}
.m-next{margin-top:8px;font-size:13px;color:var(--ink-2)}
.m-acts{display:flex;align-items:center;gap:7px;margin-top:9px}
.m-acts .grow{flex:1}
.btn.m{min-height:40px;min-width:42px;padding:0 13px;font-size:13.5px;border-radius:10px;justify-content:center}
.btn.m.icon{padding:0;background:var(--bg);border:1px solid var(--line)}
.btn.m svg{width:19px;height:19px}
.m-more{align-self:center;min-height:44px;padding:0 18px;margin:6px 0 4px}
.m-empty{padding:34px 12px;text-align:center;color:var(--ink-3);font-size:14px;border:1px dashed var(--line);border-radius:14px}
@media(max-width:760px){
  html{-webkit-text-size-adjust:100%}
  body{overscroll-behavior-y:contain}

  /* Kopfzeile: Suche bekommt den Platz, Schrift 16px (sonst zoomt iOS beim Antippen) */
  .topbar{position:sticky;top:0;z-index:25;height:auto;min-height:0;padding:8px 12px;padding-top:calc(8px + env(safe-area-inset-top));gap:8px}
  .topbar h1,.topbar .sub,.topbar .grow,.topbar [data-act="theme"],.topbar [data-act="capture"],.topbar [data-act="new"]{display:none}
  .topbar .search{flex:1;width:auto;min-width:0}
  .topbar .search input{font-size:16px;height:40px;padding-right:12px;border-radius:12px}
  .topbar .btn{min-width:44px;min-height:44px;justify-content:center}
  .content{padding:12px 12px calc(92px + env(safe-area-inset-bottom))}

  /* Untere Leiste: größere Tippflächen */
  .tabbar{padding:4px 6px calc(4px + env(safe-area-inset-bottom))}
  .tabbar{align-items:center}
  .tabbar a{min-height:50px;justify-content:center;font-size:11px;padding:5px 0;gap:3px}
  .tabbar a svg{width:22px;height:22px}
  .tabbar a.on{background:transparent}
  .tabbar a.tab-add{flex:0 0 52px;height:52px;min-height:52px;margin:-14px 6px 0;border-radius:50%;background:var(--accent);color:#fff;box-shadow:0 6px 18px color-mix(in srgb,var(--accent) 45%,transparent)}
  .tabbar a.tab-add svg{width:26px;height:26px}

  /* Eingaben nie kleiner als 16px */
  .input,select.input,textarea.input,.status-sel{font-size:16px}
  .btn.sm{min-height:40px}

  /* Startseite: Kennzahlen kompakt, Wichtiges nach oben */
  .hero{margin-bottom:10px}
  .hero h2{font-size:20px;letter-spacing:-.4px}
  .hero p{display:none}
  .tiles{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:16px}
  .tile{min-height:0;padding:10px 6px;text-align:center;align-items:center;border-radius:13px}
  .tile .num{font-size:24px;margin:2px 0 0;order:-1}
  .tile .lbl{font-size:10px;line-height:1.25;font-weight:600;hyphens:auto;overflow-wrap:anywhere;max-width:100%}
  .tile .note{display:none}
  .kpistrip{display:none}
  .panel{padding:13px 13px;border-radius:15px}
  .panel-h h3{font-size:16px}
  .panel-h p{font-size:12px;margin-top:1px}
  .panel:has([data-act="capture-url"]){display:none}
  .grid-2,.stack{gap:10px}

  /* Aufgaben und »Neu gefunden«: Titel lesbar, Knöpfe in einer Reihe */
  .task{grid-template-columns:minmax(0,1fr);gap:6px;padding:10px 0;cursor:pointer}
  .task>.avatar{display:none}
  .task .job{font-size:15px;line-height:1.35;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .task .job a{text-decoration:none}
  .task .meta{font-size:12px;white-space:normal;line-height:1.7;margin-top:3px}
  .task .acts{grid-column:1;display:flex;flex-wrap:nowrap;gap:8px;align-items:center;margin-top:4px}
  .task .acts .btn{min-height:40px;min-width:42px;justify-content:center;border-radius:10px;font-size:13.5px}
  .task .acts .btn.icon{padding:0;background:var(--bg);border:1px solid var(--line)}
  .task .acts .btn svg{width:19px;height:19px}
  #leads .task .acts [data-open]{display:none}
  #leads .task .acts [data-lead-applied]{margin-left:auto;padding:0 14px}
  #leads .task .acts [data-dismiss]{padding:0;border:1px solid var(--line);background:var(--bg)}
  #leads .task .acts [data-dismiss] .lbl{display:none}

  /* Werkzeugleiste über den Listen */
  .mtool{margin-bottom:10px}
  .mbar{display:flex;gap:8px}
  .mpick{flex:1;min-width:0;display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border-radius:12px;border:1px solid var(--line);background:var(--s1);color:var(--ink);font:inherit;font-size:15px;font-weight:650;cursor:pointer;text-align:left}
  .mpick .dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--c)}
  .mpick .t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mpick b{flex:none;font-size:12.5px;font-weight:700;color:var(--ink-3);background:var(--s3);border-radius:10px;padding:2px 8px}
  .mpick .caret{flex:none;font-style:normal;color:var(--ink-3);font-size:13px}
  .mfilter{flex:none;min-height:44px;padding:0 12px;gap:6px;border-radius:12px;font-size:14px;justify-content:center}
  .mfilter svg{width:17px;height:17px}
  .mtool-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
  .mtool-chips .fchip{padding:0;border:0;background:none}
  .mtool-chips .fchip .v{min-height:32px;padding:0 8px 0 11px;font-size:13px;margin:0}
  .msheet{position:fixed;left:0;right:0;bottom:0;z-index:59;max-height:86dvh;overflow:auto;overscroll-behavior:contain;background:var(--s1);border-radius:18px 18px 0 0;padding:0 14px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px #0b122040}
  .msheet-sec{margin:14px 2px 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-3)}
  .mopts{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .mopt{display:flex;align-items:center;gap:8px;min-height:44px;min-width:0;padding:0 10px 0 12px;border-radius:11px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-size:14px;font-weight:600;text-align:left;cursor:pointer}
  .mopt .dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--c)}
  .mopt .t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mopt b{flex:none;font-size:12.5px;color:var(--ink-3)}
  .mopt.zero{color:var(--ink-4)}
  .mopt.zero b{opacity:.6}
  .mopt.on{background:var(--accent);border-color:var(--accent);color:#fff}
  .mopt.on b{color:#fff}
  .fsheet-bg{position:fixed;inset:0;z-index:58;background:#0b122080}
  .mtool .pop.panel-f{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:59;width:auto;max-width:none;max-height:84dvh;border-radius:18px 18px 0 0;border:0;padding:0 16px;background:var(--s1);box-shadow:0 -12px 40px #0b122040;gap:14px;animation:none;overscroll-behavior:contain}
  .fsheet-h{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;background:var(--s1);padding:12px 0 8px;font-size:17px}
  .fsheet-h .btn{min-width:40px;min-height:40px;justify-content:center}
  .mtool .fsec{grid-template-columns:1fr;gap:7px}
  .mtool .fsec .fl{padding-top:0;font-size:12px}
  .mtool .pills{gap:7px}
  .mtool .pill{min-height:38px;padding:0 13px;font-size:14px}
  .mtool .fsec>div{min-width:0}
  .mtool .pop-search{font-size:16px;min-height:40px;width:100%;box-sizing:border-box}
  .mtool .firmlist{box-sizing:border-box;width:100%}
  .mtool .firmlist{max-height:210px}
  .mtool .firmlist label{min-height:40px;font-size:14px}
  .mtool .firmlist input{width:18px;height:18px}
  .mtool .ffoot{position:sticky;bottom:0;background:var(--s1);padding:10px 0 calc(10px + env(safe-area-inset-bottom));gap:10px}
  .mtool .ffoot .btn{min-height:44px;font-size:14px}
  .mtool .ffoot .btn.primary{flex:1;justify-content:center}

  /* Detailansicht als ganzer Bildschirm */
  .drawer{inset:0;width:100%;max-width:100%;height:100dvh;border-radius:0}
  .drawer-h{padding:8px 16px 12px;padding-top:calc(8px + env(safe-area-inset-top))}
  .drawer-h .st{margin-top:8px}
  .drawer-h .top .btn{min-height:44px;min-width:44px;justify-content:center}
  .drawer-h .ti{font-size:17px;line-height:1.3}
  .drawer-h .status-sel{min-height:40px}
  .drawer-b{padding:12px 16px 24px}
  .drawer-b>.quick{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;margin:0 -16px 12px;padding:0 16px 12px;scrollbar-width:none}
  .drawer-b>.quick::-webkit-scrollbar{display:none}
  .drawer-b>.quick .btn{flex:none;min-height:40px;font-size:13.5px;padding:0 13px}
  .drawer .form,.drawer .extra-form{grid-template-columns:1fr 1fr;gap:10px 10px}
  .drawer .form .field{margin:0;gap:3px;min-width:0}
  .drawer .form .field.full,.drawer .form .field:has(#f_unternehmen),.drawer .form .field:has(#f_termin),.drawer .form .detail-extra{grid-column:1/-1}
  .drawer .form .field:has(#f_link){order:5}
  .drawer .form .detail-extra{order:6}
  .drawer .field>span{font-size:12px;color:var(--ink-3)}
  .drawer .field em{display:none}
  .drawer .input{min-height:40px;height:40px;padding:6px 10px;border-radius:9px;min-width:0;width:100%}
  .drawer textarea.input{height:auto;min-height:96px}
  .drawer .sec{margin:16px 0 8px}
  .drawer .posting .hint{font-size:11.5px;margin-top:6px}
  .posting-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .posting-row .btn{min-height:40px;flex:1 1 0;justify-content:center;padding:0 6px;font-size:13px;white-space:nowrap}
  .posting-row .btn svg{flex:none}
  .posting-row .btn.ghost{border:1px solid var(--line);background:var(--bg)}
  .posting-row a.btn{text-decoration:none}
  .noterow .btn{min-height:46px}
  .drawer-f{padding:10px 14px;padding-bottom:calc(10px + env(safe-area-inset-bottom));gap:8px}
  .drawer-f .btn{min-height:44px;min-width:44px;justify-content:center}

  /* Dialoge füllen die Breite */
  dialog:not(.settings-dialog){width:100vw;max-width:100vw;max-height:92dvh;margin:auto 0 0;border:0;border-radius:18px 18px 0 0}
  dialog .dh{padding:14px 16px 6px}
  dialog .dh h2{font-size:18px}
  dialog .db{padding:8px 16px 14px}
  dialog .df{padding:10px 16px calc(10px + env(safe-area-inset-bottom));gap:10px}
  dialog .df .btn{flex:1;justify-content:center;min-height:46px;font-size:15px}
  dialog .df .btn.ghost{flex:0 0 auto}
  dialog .btn{min-height:44px}
  dialog .field{margin:10px 0 0;gap:4px}
  dialog .field>span{font-size:13px;color:var(--ink-2);text-transform:none;letter-spacing:0}
  dialog .field>span em{font-style:normal;font-weight:400;color:var(--ink-3);font-size:12px}
  dialog .input{min-height:46px;height:46px;border-radius:11px;padding:0 12px}
  dialog textarea.input{height:auto;padding:10px 12px}
  dialog .urlrow .btn{flex:none;min-height:46px;padding:0 14px}
  dialog .hint{font-size:12.5px;margin:6px 0 0;min-height:0}
  dialog .hint:empty{display:none}
  .dup{gap:10px;padding:10px 12px;font-size:13.5px}
  .dup>svg{flex:none;width:18px;height:18px}
  .dup .btn{flex:none}
  .toasts{bottom:calc(74px + env(safe-area-inset-bottom))}
  .toast{font-size:14px;padding:12px 14px}
  .toast button{min-height:36px}
}
