/* PATR.IS /a – Apple iPhone Typografie & 3-Zonen-Minimal-Cockpit */
:root {
  --bg: #050810;
  --panel: #0d1322;
  --panel-glass: rgba(12, 18, 32, 0.80);
  --border: #1f2b42;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #0a84ff;
  --danger: #ff453a;
  --new-task-green: #30d158;
  --current-task: #ff656a;
  --state-running-bg: #181709;
  --state-running-border: var(--current-task);
  --state-reply-bg: #261a08;
  --state-reply-border: #ff9f0a;
  --state-queued-bg: #102442;
  --state-queued-border: #3b82f6;
  --state-queued-solid: #2563eb;
  --state-done-bg: #1e2229;
  --state-done-border: #636b78;
  --state-done-solid: #6b7280;
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--font-apple);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  touch-action: pan-y;
}
.hidden { display: none !important; }

/* Login */
.login-view { height: 100%; display: flex; align-items: center; justify-content: center; padding: 14px; }
.login-card {
  width: 100%; max-width: 340px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; gap: 11px;
}
.login-card h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.login-card h1 span { color: var(--accent); }
.login-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }
/* Login-Links (UI-Audit 3 A1): Browser-Blau #0000ee hatte 1,97:1; #85c7ff = 10,2:1, besucht gleich */
.login-card a, .login-card a:visited { color: #85c7ff; text-decoration: underline; text-underline-offset: 3px; border-radius: 4px; }
.login-card a:hover, .login-card a:active { color: #b8ddff; text-decoration-thickness: 2px; }
.login-card a:focus-visible { outline: 2px solid #85c7ff; outline-offset: 3px; }
.login-card input {
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem; font-family: var(--font-apple);
}
/* Login-Feld (UI-Audit 3 A4): Label bleibt beim ausgefüllten Feld sichtbar; Fehlversuch zusätzlich am Rahmen (6,6:1) */
.login-card .login-label { margin-bottom: -6px; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.login-card input[aria-invalid="true"] { border-color: #ff6961; }
.btn-primary {
  padding: 11px; border: 0; border-radius: 10px; background: var(--accent);
  color: #fff; font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.err-msg { color: #ff6961; font-size: 0.82rem; min-height: 16px; }

/* App Shell */
.app-shell {
  --content-edge: 5px;
  --focus-border: 3px;
  --section-start: calc(var(--content-edge) - var(--focus-border));
  position: relative; display: flex; flex-direction: column; height: 100dvh;
}

/* Ultra-kompakte 1-Zeilen-Topbar */
.topbar {
  display: flex; align-items: center; gap: 5px; padding: 4px var(--content-edge);
  background: var(--panel); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.topbar > .pill-status { margin-inline-end: auto; }
.topbar:not(:has(> .pill-status)) { justify-content: flex-end; }
.task-pills { display: flex; gap: 4px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.task-pills::-webkit-scrollbar { display: none; }
.pill {
  white-space: nowrap; border: 1px solid var(--border); background: #11192c;
  color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 0.78rem;
  font-weight: 500; cursor: pointer; line-height: 1.2; font-family: var(--font-apple);
}
.task-pills .pill { display: inline-flex; align-items: center; gap: 5px; border-color: #9ab6d3; }
.pill-provider {
  width: 14px; height: 14px; flex: none;
  background: center / contain no-repeat;
}
/* Anbieterlogos: https://github.com/lobehub/lobe-icons/tree/05260484d9f4de68f90cc87a634ae68fa4043efd (MIT).
MIT License

Copyright (c) 2023 LobeHub

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
.pill-provider--codex { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAF6UlEQVR42p2YXYiWVRDH//PuZ4lruYaVKGJhrEoKXZS1RuRXWrtmH0ZYlmWFZmQX0YVBRWFJUTcRUTeVFNGXpZikRGFaYhZF6q5pa6bkWpYatW657/66cM42Hd99d+vcvM97zjxz5sz8Z+Z/HqmPAVh4Hg88A3wD/AF0AT8B64FFwECXqwQqoo40F/X955FeBmqBp9yIcqMVmNUPvRW9rVk/PFMnabWkSf5/paRVkloldUo6U9IUSXMkDXeZZyWdJmmMpBpJRyRtk7RW0hoz6wIqzKz4X7xTARSAtX76XcBlZeTPBfYCf/Xhxa3A1L48lSuv9N87Xcn3wMiAjyqgOsjf4rhK41PgAeBq4ErX8wpw1Ne7gXv6ZZR7pQo4FdjjCpp9rToD64XAB8GQ3cBNfXhxZZC/saxR2WaT/KWvQggTyM8GngWOu8xR4GGgLno4ZFhNNrfC3zvsugwolDQGGAwsAb521z7l81Vu1GLgYDjlq8B5YfOk5yygGajNPG+etS3+/vL8ENGYWUBbBsJ7g9ylYf4zYFpYqw6eXAzsd7mvgdlBLhk4P4S5piezgzF3hM2+BXb686KgrMm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VJNeIzruC7RY8rGKACsivo0ioFofazneE1n32pwbata99Z3FCZuqlEEs2Drvp8v37NHXdJTT6ducP2fNhlfncg7dkMpqX1u8c4Xfrk/7LBWRX2aAD61IfArtnirybPnjSWqv3Vbz5KJmREB4EkrfLSr8P15zfl73i+Nv7LQW/RpRFH9CEHdv3/s9GOSutbdz5ek4Bs/LNVWLN75wi+LQSCnlmvVlcukoLlKGwZ4iAgcToxcJiPFDGp7h79qMl5hKP3ClOTl6WDqfujSXoYB4Npt8dtTxil6YoDAACAhMkFMDa6NWpYNAUD34n6Kpq5BABBrxPj19LX/X/MhDkMx3aJQFBkOQ3HNtn84mGj9pGZzgg09wQDhSDtfLAUmxzwft9//AKkhi7wkGmIjAAAAAElFTkSuQmCC"); }
.pill-provider--gemini { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAI+0lEQVR42r1YbYxcZRV+znnfOzM7O8u23bKCtBGiqFkKQretGtJMt9QUNI1CnaWQSEgkggQjP4jB0DK7LCQGfxg/IkFjiFEE9xorKF/ZZXcnjVG2u9VIW0FNKBG0tN3a/ZjZnXvf9xx/3Nkyu51udxPjm7zz4869557znOc857yXcIGlRTAAUC8EAN7Lb74kneJtCs2r6LUKrFegVaEWQESg00w4xqBDFhiasziw9uXRKQDQQsEgDIUAPd/7aElnCgVDYegB4PT2LVut0buc4MaU4XZDBCcKpwqBQhUgIhgAlgmGCLEoROUYgP0O/OO1g6/9dbHdZTmkAKEIol7I8e2fvCbL+igz7UozY8Z5xKKCmgsgEL1vRzUxoIAqiDjNRDljMO18RKo/ehfo6Xj14IQWwfOoL+mQAsQ1wxM7tjwQEPrSzJnJ2ItClYiYLoDsInsKqCeQXRNYlJ28VRb35UuHxocVYMJCp3ixMwTo6x0dqf/s2PL0amu+HYlmzsTOE4GZyFDjIHR+N4iYCGQV0FNx7Dz0ivZUaujkDZ2fJ0C0UDD199vFafrbax9JrY1zz7UGZuepyMUJJcicE7WqAA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b0KVfkkNLo48GNacAYNMvdz9Alvs4MBlfiUQFSrQQsWV0XVWoACCbDVgdIu+iB8dv3f+dYrHIvb29Wi+2dB4jBBQJ1CvX/WL3NTbNjxLTLrYGfs5BvRfV2nSQ/NICrEh1/n8yzJyxgFeIkwFx7sHxPfsPFQpqwpBksfIvGel89QHAlnD3ViW+S0VvZMvtZAjqNdmSBElU+9Zhkq2ikFgmyNCgePxkvDscWGx3RV/Q5tW2dqwQANjcX7hEodvAyMPrtVCsh2qrJuobgzDJoH8q6+ukdICML43u3v/O2QNBTw/N22q0/gtnOrMQb6sHEgAAAABJRU5ErkJggg=="); }
.pill.active { border-color: var(--accent); background: rgba(10, 132, 255, 0.22); color: #fff; font-weight: 600; }
.task-pills .pill.active, .pill-new.active, .ov-item.active,
.task-entry:is([data-status="running"], [data-status="waiting_confirm"],
               [data-status="sources"], [data-status="answer_sync"], [data-status="partial_sync"]) {
  border-color: var(--current-task); box-shadow: inset 0 0 0 1px var(--current-task);
}
.task-pills .pill.active { background: #192437; color: var(--muted); }
.task-pills .pill.waiting-user:not(.active) { border-color: #f59e0b; background: rgba(245, 158, 11, 0.18); color: #fde68a; }
.task-pills .pill.waiting-user:not(.active) .pill-title { color: #fef3c7; font-weight: 600; }
.task-pills .pill.waiting-user.active { background: rgba(245, 158, 11, 0.22); }
/* WebKit zeichnet seinen Fokus sonst über den roten Auswahlrahmen. */
.task-pills .pill, .pill-new { -webkit-tap-highlight-color: transparent; }
:is(.task-pills .pill, .pill-new).active:focus { outline: none; }
:is(.task-pills .pill, .pill-new).active:focus-visible {
  outline: 1px dashed var(--current-task); outline-offset: -4px;
}
.pill-title { color: var(--text); }
.pill.prio .pill-title { color: #fdba74; }
.pill.boosted .pill-title { color: #ffd60a; }
.pill.fast .pill-title { color: #7dd3fc; }
.pill-new { border-color: var(--new-task-green); color: var(--new-task-green); font-weight: 700; flex-shrink: 0; }
.pill-status { position: relative; border-color: #64748b; color: #e2e8f0; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cpu-gauge {
  position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px);
  pointer-events: none; fill: none; stroke-width: 3; stroke: var(--new-task-green);
}
.cpu-gauge[data-level="high"] { stroke: #ff9f0a; }
.cpu-gauge[data-level="critical"] { stroke: var(--danger); }
.pill-icon { display: block; flex: 0 0 auto; }

/* Fokus-Kontrast: Aktiver Bereich klar markiert, lesbare Bereiche bleiben knackig */
.prev-final, .prompt-dock, .output-wrap {
  transition: opacity 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.app-shell.focus-prev .prev-final,
.app-shell.focus-prompt .prompt-dock,
.app-shell.focus-output .output-wrap {
  opacity: 1;
  border-left: var(--focus-border) solid var(--accent);
  background-image: linear-gradient(90deg, rgba(10, 132, 255, 0.10), transparent 56px);
}
.app-shell:is(.focus-prev, .focus-output) .prompt-dock { opacity: 0.84; }

#prevFinalText:focus, #promptDock:focus, #outputWrap:focus { outline: none; }

/* Maximize-Modi (Prompt-Vergrößern) */
.app-shell.max-prev .prompt-dock { --dock-padding-y: 3px; --prompt-padding-y: 4px; --prompt-font: .86rem; }
.app-shell.max-prev #promptInput { max-height: var(--prompt-three-lines); padding-inline: 9px; }

.app-shell.max-prompt .prev-final { display: none !important; }
.app-shell.max-prompt .prompt-dock { flex: 1 1 76%; }
.app-shell.max-prompt.no-output .output-wrap { display: none; }
.app-shell.max-prompt #promptInput { flex: 1; height: auto !important; max-height: none !important; }
.app-shell.max-prompt .output-wrap { flex: 0 0 24%; }

/* Zone 1: Letzte finale Ausgabe (oben, wenn vorhanden) */
.prev-final {
  flex: 0 0 auto; max-height: 24dvh; display: flex; flex-direction: column;
  padding: 8px var(--content-edge) 10px var(--section-start); background: #090e1a;
  border-bottom: 1px solid var(--border); border-left: var(--focus-border) solid transparent;
}
.app-shell:not(.max-prev):has(.live-progress:not(.hidden)) .prev-final { max-height: 18dvh; }
.final-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; }
.final-header .zone-tag { margin: 0; min-width: 0; overflow-wrap: anywhere; user-select: none; }
.task-entry-model { max-width: 100%; overflow-wrap: anywhere; }
#finalShareBtn { margin-inline-start: auto; }
.answer-share-btn:disabled { opacity: .65; }
.task-entry-answer > .answer-share-btn { display: block; margin: 4px 0 0 auto; }
.section-size {
  flex: none; min-height: 28px; padding: 3px 8px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--panel); color: var(--text); font: inherit; font-size: 0.8rem; cursor: pointer;
}
#prevFinalText { min-height: 0; overflow-y: auto; overflow-anchor: none; padding-top: 2px; }
.app-shell.max-prev .prev-final { flex: 1 1 0; height: auto; min-height: 0; max-height: none !important; border-left-color: var(--accent); }
.app-shell.max-prev #prevFinalText { flex: 1; overscroll-behavior-y: contain; }
.app-shell.max-prev .output-wrap { display: none !important; }

/* Zone 2: Prompt-Dock (direkt darunter) */
.prompt-dock {
  --dock-padding-y: 6px;
  --prompt-padding-y: 8px;
  --prompt-font: .98rem;
  --prompt-leading: 1.4;
  flex: 0 1 auto; overflow-y: auto; background: var(--panel);
  /* Even a scrollable dock must expose the full editor when the keyboard takes most of the viewport. */
  min-height: calc(3 * var(--prompt-font) * var(--prompt-leading) + 2 * var(--prompt-padding-y) + 2 * var(--dock-padding-y) + 3px);
  border-bottom: 1px solid var(--border); border-left: var(--focus-border) solid transparent;
  padding: var(--dock-padding-y) var(--content-edge) var(--dock-padding-y) var(--section-start); display: flex; flex-direction: column; gap: 5px;
}
.prompt-toolbar { display: flex; flex-flow: row-reverse wrap; align-items: center; gap: 5px; }
.prompt-tools { max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.prompt-tools > :is(button, label) { min-width: 40px; min-height: 36px; }
.prompt-close { display: none; }
.prompt-tools #sendBtn { padding: 4px 12px; }
#micJobs:empty, #guestFileErrors:empty { display: none; }
.prompt-tools #sendBtn:disabled { opacity: 0.4; cursor: default; }
.prompt-feedback { display: flex; flex-wrap: wrap; gap: 6px; overflow-wrap: anywhere; font-size: 0.75rem; }
.prompt-feedback:not(:has(span:not(:empty))) { display: none; }
.prompt-feedback span:empty { display: none; }
.opt-btn { border: 1px solid var(--border); border-radius: 10px; background: #121b2f; color: var(--text); padding: 4px 8px; cursor: pointer; }
.opt-btn span { position: relative; display: inline-block; font-size: 1.15rem; line-height: 1; color: #ffd166; }
.opt-btn[aria-pressed="false"] span { color: var(--muted); }
.opt-btn[aria-pressed="false"] span::after {
  content: ""; position: absolute; top: 50%; left: -12%; width: 124%; height: 2px;
  background: currentColor; box-shadow: 0 0 0 1px #121b2f; transform: rotate(-45deg);
}
.mode-badge { color: #64d2ff; }
.status-strip {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 2px var(--content-edge); overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.status-strip::-webkit-scrollbar { display: none; }
.status-strip:not(:has(> :not(.hidden))) { display: none; }
.task-action-status { color: #30d158; font-size: 0.74rem; font-weight: 600; flex: none; }
#archiveNotice, #taskActionStatus { flex: none; padding: 1px 0; }
#taskActionStatus:empty { display: none; }
#micJobs, #guestFileErrors { padding-inline: var(--content-edge); }
.opt-status { color: #30d158; font-size: 0.75rem; font-weight: 500; }

.audio-capture { display: flex; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; align-items: center; gap: 6px 8px; padding: 1px 0; }
.mic-live-transcript {
  flex: 1 0 100%; width: 100%; margin-top: 4px; padding: 11px 14px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.96); border: 1.5px solid rgba(10, 132, 255, 0.65);
  box-shadow: 0 6px 24px rgb(0 0 0 / 45%), inset 0 0 0 1px rgb(10 132 255 / 15%);
  color: var(--text); font-size: 1rem; font-weight: 400; line-height: 1.5;
  min-height: 5.2rem; max-height: 38dvh; overflow-y: auto; overscroll-behavior: contain;
  touch-action: pan-y; white-space: pre-wrap; overflow-wrap: anywhere;
  pointer-events: auto; user-select: text; -webkit-user-select: text;
}
.mic-live-transcript.hidden { display: none; }
.mic-live-body { min-height: 1.5em; }
.mic-live-empty { color: var(--muted); margin-inline-start: 4px; }
.mic-live-transcript[data-has-text="true"] .mic-live-empty { display: none; }
.mic-live-chunk { animation: mic-chunk-in 180ms ease-out; }
.mic-live-cursor {
  display: inline-block; width: 2px; height: 1.15em; margin-inline-start: 2px;
  vertical-align: -0.18em; border-radius: 1px; background: #0a84ff;
  animation: mic-cursor-blink 1.05s steps(1, end) infinite;
}
.mic-live-transcript[data-state="stopping"] .mic-live-cursor,
.mic-live-transcript[data-live="false"] .mic-live-cursor { display: none; }
.mic-live-pending { display: none; color: #64d2ff; font-weight: 600; }
.mic-live-transcript[data-busy="true"][data-state="recording"] .mic-live-pending {
  display: inline; animation: mic-pending-pulse 1.1s ease-in-out infinite;
}
@keyframes mic-chunk-in { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes mic-cursor-blink { 0%, 54% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes mic-pending-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (any-pointer: coarse), (max-width: 720px) {
  .mic-live-transcript { font-size: 16px; min-height: 6rem; max-height: 50dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .mic-live-chunk, .mic-live-cursor, .mic-live-pending { animation: none !important; }
}
.mic-progress { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .6em; color: var(--muted); font-size: .82rem; }
.mic-capture-status { flex: none; max-width: 100%; }
.mic-capture-status:empty, .mic-ticker:has(.mic-ticker-track:empty) { display: none; }
.mic-ticker { min-width: 0; overflow: hidden; white-space: nowrap; scrollbar-width: none; }
.mic-ticker::-webkit-scrollbar { display: none; }
.mic-ticker-track { display: block; width: max-content; }
.mic-ticker.is-scrolling .mic-ticker-track { animation: mic-ticker-slide var(--ticker-time) linear infinite; }
@keyframes mic-ticker-slide {
  0%, 6% { transform: translateX(0); }
  94%, 100% { transform: translateX(var(--ticker-end)); }
}
@media (hover: hover) {
  .mic-ticker:hover .mic-ticker-track { animation-play-state: paused; }
}
.mic-ticker:focus { overflow-x: auto; }
.mic-ticker:focus .mic-ticker-track { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .mic-ticker { overflow-x: auto; }
  .mic-ticker.is-scrolling .mic-ticker-track { animation: none; }
}
.audio-capture button { flex: none; }
.mic-jobs { max-height: 18dvh; overflow-y: auto; }
.mic-job { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding-block: .2rem; font-size: .82rem; }
.mic-job span { overflow-wrap: anywhere; }
.mic-job button, .mic-job a { color: #8bc7ff; font: inherit; background: none; border: 0; cursor: pointer; text-decoration: underline; }
.audio-capture button, .audio-capture a, .att-audio a { font: inherit; font-size: .82rem; border-radius: 7px; padding: 7px 8px; }
.audio-capture button { color: var(--text); background: #192437; border: 1px solid var(--border); cursor: pointer; }
.audio-capture a, .att-audio a { color: #8bc7ff; }
.audio-capture [hidden] { display: none; }
.att-thumb.att-audio { width: auto; height: auto; display: flex; align-items: center; padding-inline-end: 18px; }

.attach-strip { display: flex; flex: none; width: max-content; max-width: 100%; margin-inline-end: auto; gap: 6px; overflow-x: auto; }
.att-thumb {
  position: relative; width: 44px; height: 44px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--border); flex-shrink: 0;
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-rm {
  position: absolute; top: 0; right: 0; border: 0; width: 16px; height: 16px;
  background: rgba(0, 0, 0, 0.8); color: #fff; font-size: 11px; cursor: pointer; padding: 0;
}

#promptInput { width: 100%; touch-action: manipulation; }
@media (any-pointer: coarse), (max-width: 720px) {
  .app-shell .prompt-dock, .app-shell.max-prev .prompt-dock { --prompt-font: 16px; }
}
.icon-btn {
  border: 1px solid var(--border); background: #121b2f; color: var(--text);
  border-radius: 10px; padding: 7px 9px; font-size: 0.95rem; cursor: pointer; line-height: 1;
}
.icon-btn.recording { border-color: var(--danger); background: #3b1219; }
#promptInput {
  --prompt-three-lines: calc(3lh + 2 * var(--prompt-padding-y) + 2px);
  flex: none; min-width: 0; resize: none; min-height: var(--prompt-three-lines); max-height: 140px;
  padding: var(--prompt-padding-y) 11px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
  font-family: var(--font-apple); font-size: var(--prompt-font); line-height: var(--prompt-leading); letter-spacing: -0.008em;
}
/* Let the full help wrap when the empty composer is in its normal layout. */
.app-shell:not(.max-prev, .max-prompt) #promptInput:placeholder-shown {
  max-height: none; line-height: 1.2;
}
#promptInput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.45); }
.ov-btn:disabled, .queue-move:disabled { opacity: 0.4; cursor: default; }

/* Zone 3: Ausgabe unter dem Prompt (Aufgabenkarten inkl. Live-Fortschritt und Antworten) */
.output-wrap {
  position: relative; flex: 1; min-height: 0; overflow-y: auto;
  padding: 8px var(--content-edge) calc(14px + env(safe-area-inset-bottom)) var(--section-start);
  border-left: var(--focus-border) solid transparent;
}
.zone-tag {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: #64d2ff; margin-bottom: 5px;
}
.apple-text {
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-apple); font-size: 15px; line-height: 1.54;
  letter-spacing: -0.01em; color: #f1f5f9;
}
.apple-text.live-ticker {
  font-size: 13.5px; line-height: 1.46; color: #cbd5e1;
}
.task-timeline {
  margin: 0 0 14px;
}
.task-timeline .final-header { margin-bottom: 5px; }
.task-entries {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
}
.task-entry {
  border: 1px solid #34455e; border-radius: 13px; padding: 10px 12px;
  background: #0d1626; min-width: 0;
}
.task-entry[data-status="running"], .task-entry[data-status="waiting_confirm"] {
  background: var(--state-running-bg);
}
.task-entry[data-status="needs_reply"] {
  background: var(--state-reply-bg);
  border-color: var(--state-reply-border);
  box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.35);
}
.task-entry[data-status="queued"] {
  background: var(--state-queued-bg);
  border-style: dashed;
  border-color: var(--state-queued-border);
}
.task-entry[data-status="completed"] {
  background: var(--state-done-bg);
  border-color: var(--state-done-border);
}
.task-entry[data-status="interrupted"], .task-entry[data-status="unknown"] { border-color: #9b615f; }
.task-entry-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 5px;
}
.task-entry-state { color: #b9d9ff; font-size: 0.78rem; font-weight: 650; }
.task-entry[data-status="completed"] .task-entry-state { color: #80e4b1; }
.task-entry[data-status="needs_reply"] .task-entry-state { color: #ffbe4f; }
.entry-action-reply { border-color: var(--state-reply-border); color: #ffd080; background: rgba(255, 159, 10, 0.14); }
.entry-action-reply-subtle { opacity: 0.72; font-size: 0.72rem; }
.task-entry[data-status="running"] .task-entry-state, .task-entry[data-status="waiting_confirm"] .task-entry-state { color: #f7d680; }
.task-entry[data-status="interrupted"] .task-entry-state, .task-entry[data-status="unknown"] .task-entry-state { color: #ffaba5; }
.task-entry-time, .task-entry-model { color: #aebcce; font-size: 0.75rem; }
.task-entry-prompt { margin: 0; }
.answer-link { color: #60a5fa; text-decoration: underline; overflow-wrap: anywhere; }
.answer-link-host { font-size: 0.82em; color: var(--muted); white-space: nowrap; }
.answer-link-host[data-mismatch="true"] { color: #f59e0b; font-weight: 600; }
.answer-image { display: block; width: fit-content; max-width: 100%; margin: 0.5rem 0; }
.answer-image img { display: block; max-width: 100%; height: auto; }
.app-shell:not(.max-prev) #prevFinalText .answer-image img { max-height: max(64px, calc(24dvh - 5rem)); }
.task-entry-live, .task-entry-answer { margin-top: 8px; }
:is(.task-entry-live, .task-entry-answer) > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 36px; padding: 7px 12px; border-radius: 9px;
  border: 1px solid rgba(147, 197, 253, 0.34); background: rgba(96, 165, 250, 0.13);
  list-style: none; cursor: pointer; line-height: 1.25;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
:is(.task-entry-live, .task-entry-answer) > summary::-webkit-details-marker { display: none; }
:is(.task-entry-live, .task-entry-answer) > summary::after {
  content: "▸"; flex: none; font-size: 0.95rem; line-height: 1; opacity: 0.9;
  transition: transform 0.15s ease;
}
:is(.task-entry-live, .task-entry-answer)[open] > summary::after { transform: rotate(90deg); }
:is(.task-entry-live, .task-entry-answer) > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:is(.task-entry-live, .task-entry-answer) > summary:active { filter: brightness(1.12); }
.task-entry-live > summary {
  color: #7dd3fc; font-size: 0.78rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(100, 210, 255, 0.12); border-color: rgba(100, 210, 255, 0.34);
}
.task-entry-live > summary:hover { background: rgba(100, 210, 255, 0.20); border-color: rgba(100, 210, 255, 0.52); }
.task-entry[data-status="waiting_confirm"] .task-entry-live > summary {
  color: #f7d680; background: rgba(247, 214, 128, 0.14); border-color: rgba(247, 214, 128, 0.42);
}
.task-entry[data-status="waiting_confirm"] .task-entry-live > summary:hover {
  background: rgba(247, 214, 128, 0.22); border-color: rgba(247, 214, 128, 0.6);
}
.task-entry-answer > summary { color: #cfe4ff; font-size: 0.84rem; font-weight: 600; }
.task-entry-answer > summary:hover { background: rgba(96, 165, 250, 0.22); border-color: rgba(147, 197, 253, 0.52); }
.task-entry-live .apple-text { margin-top: 7px; }
.task-entry-answer .apple-text { margin-top: 7px; }
.task-entry-ordinal {
  display: block; text-align: end; margin-top: 2px;
  font-size: 0.72rem; line-height: 1; color: #aebcce; font-variant-numeric: tabular-nums;
}
.queue-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; align-items: center; gap: 4px; margin-left: auto; }
.entry-action, .queue-append, .queue-move, .queue-drag {
  min-width: 30px; min-height: 30px; display: inline-grid; place-items: center;
  border: 1px solid #405b7a; border-radius: 7px; background: #111e31;
  color: var(--text); cursor: pointer; font-size: 0.85rem;
}
.queue-append, .queue-inject, .entry-action { padding: 3px 8px; }
.entry-action { margin-inline-start: auto; }
.entry-action-confirm { border-color: var(--accent); color: #64d2ff; font-weight: 600; }
.queue-drag { cursor: grab; }
.task-entry.dragging { opacity: 0.6; }
.task-entry.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.task-entry.drop-after { box-shadow: 0 3px 0 var(--accent); }
.task-entry.kb-selected {
  border-color: var(--accent); border-style: solid;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.45);
  background: #122138;
}
.task-entry.kb-moving {
  border-color: #f59e0b; border-style: solid;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.65), 0 8px 20px rgba(0, 0, 0, 0.45);
  background: #231c0d;
}
.task-entry.kb-inject-source { opacity: 0.55; border-style: dashed; }
.task-entry.kb-inject-target {
  border-color: #34d399; border-style: solid;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.65), 0 0 18px rgba(52, 211, 153, 0.22);
  background: #10241d;
}
.inject-preview-banner {
  margin-top: 8px; padding: 6px 9px; border-radius: 8px;
  background: rgba(52, 211, 153, 0.16); border: 1px solid rgba(52, 211, 153, 0.55);
  color: #a7f3d0; font-size: 0.8rem; font-weight: 600;
}
.queue-nav-hint {
  margin: 0 0 8px; padding: 5px 9px; border-radius: 8px;
  background: rgba(96, 165, 250, 0.12); border: 1px solid rgba(96, 165, 250, 0.4);
  color: #cfe4ff; font-size: 0.78rem; line-height: 1.35;
}
.queue-inject { color: #a7f3d0; border-color: #2d6a56; }
.queue-blocked { color: #f7d680; font-size: 0.85rem; margin: 4px 0 9px; }
.task-timeline:not(.hidden) ~ #outputText.live-ticker {
  max-width: 66rem; margin-inline: auto;
}
.scroll-down {
  position: fixed; right: 12px; bottom: 16px; z-index: 15;
  border: 1px solid var(--accent); background: rgba(12, 18, 32, 0.9);
  color: var(--accent); border-radius: 999px; width: 34px; height: 34px;
  font-size: 0.95rem; cursor: pointer;
}

/* Schwebendes, halbtransparentes Status-Overlay oben links unterhalb des Status-Knopfs */
.status-overlay {
  position: fixed; top: 38px; left: 8px; z-index: 30;
  width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 54px);
  display: flex; flex-direction: column; gap: 6px; padding: 11px;
  background: var(--panel-glass); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(10, 132, 255, 0.45); border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
}
.ov-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.ov-health { font-size: 0.78rem; color: #cbd5e1; line-height: 1.35; }
.provider-usage { border-block: 1px solid var(--border); padding-block: 6px; font-size: .78rem; }
.provider-usage h2 { font-size: .85rem; margin: 0 0 4px; }
.provider-usage dl { margin: 0; display: grid; gap: 2px; }
.provider-usage dt { font-weight: 600; margin-top: 4px; }
.provider-usage dd { margin: 0; display: flex; align-items: center; gap: .5rem; color: #cbd5e1; }
.provider-usage progress { flex: 0 0 56px; width: 56px; height: 6px; margin-inline-start: auto; accent-color: var(--accent); }
.provider-usage dd strong { text-align: end; min-width: 3.6em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.ov-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.f-btn {
  border: 1px solid var(--border); background: rgba(15, 23, 42, 0.75);
  color: var(--text); border-radius: 7px; padding: 3px 8px; font-size: 0.76rem; cursor: pointer;
}
.f-btn.active { border-color: var(--accent); background: rgba(10, 132, 255, 0.24); }
.ov-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; max-height: 240px; }
.ov-item {
  text-align: left; border: 1px solid rgba(36, 48, 71, 0.8); background: rgba(8, 12, 24, 0.74);
  color: var(--text); border-radius: 8px; padding: 6px 9px; font-size: 0.78rem; cursor: pointer;
}
.ov-item.active { background: rgba(10, 132, 255, 0.24); }
.ov-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ov-actions:not(:has(> button:not(.hidden))) { display: none; }
.ov-actions:has(> button:not(.hidden)):not(:has(> button:not(.hidden) ~ button:not(.hidden))) { grid-template-columns: 1fr; }
#ovMaintenanceBox .ov-actions { margin-top: 6px; }
.ov-btn {
  border: 1px solid var(--border); background: rgba(16, 24, 42, 0.88);
  color: var(--text); border-radius: 8px; padding: 6px 8px; font-size: 0.76rem; cursor: pointer;
}
.ov-btn.accent { border-color: var(--accent); color: #64d2ff; }
.ov-btn.danger { border-color: var(--danger); color: #ff6961; }
.ov-hint { font-size: 0.7rem; color: var(--muted); }

@media (max-width: 720px) {
  .apple-text { font-size: 14.8px; line-height: 1.5; }
  .task-entry { padding: 8px 9px; }
}

/* Sternenlauf im Hintergrund, sobald die KI den Text verbessert hat. */
#promptInput.opt-sparkle {
  background-image:
    radial-gradient(circle, #fff 0 2px, rgba(255, 255, 255, 0.35) 4px, transparent 7px),
    radial-gradient(circle, #64d2ff 0 3px, rgba(100, 210, 255, 0.35) 6px, transparent 9px),
    radial-gradient(circle, #ffd60a 0 2px, rgba(255, 214, 10, 0.35) 5px, transparent 8px),
    radial-gradient(circle, #fff 0 1.5px, transparent 5px),
    linear-gradient(100deg, transparent 15%, rgba(10, 132, 255, 0.55) 50%, transparent 85%);
  background-repeat: no-repeat;
  background-size: 16px 16px, 20px 20px, 18px 18px, 12px 12px, 55% 100%;
  animation: opt-sparkle-run 2.2s ease-in-out 1;
}
@keyframes opt-sparkle-run {
  from { background-position: -2% 25%, -14% 70%, -24% 45%, -8% 85%, -120% 0; box-shadow: 0 0 14px 2px rgba(100, 210, 255, 0.9); }
  to { background-position: 112% 35%, 104% 55%, 100% 20%, 118% 75%, 220% 0; box-shadow: 0 0 0 0 rgba(100, 210, 255, 0); }
}
/* Bei "reduzierter Bewegung" nichts bewegen, aber die Änderung sichtbar aufleuchten lassen. */
@media (prefers-reduced-motion: reduce) {
  #promptInput.opt-sparkle { background-image: none; animation: opt-glow 2.2s ease-out 1; }
}
@keyframes opt-glow {
  from { background-color: rgba(10, 132, 255, 0.5); }
  to { background-color: var(--bg); }
}

/* iPhone-App: Nur eine angeheftete, deckende Leiste über volle Breite ganz oben verhindert die
   iOS-Unschärfe (kein backdrop-filter, kein Abstand darüber). */
.topbar { position: sticky; top: 0; z-index: 10; padding-top: calc(4px + env(safe-area-inset-top, 0px)); }
.login-view { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.status-overlay { top: calc(38px + env(safe-area-inset-top, 0px)); left: calc(8px + env(safe-area-inset-left, 0px)); }

/* Wischen links/rechts gehört der App (Projektwechsel), auch innerhalb scrollender Bereiche. */
.app-shell, .app-shell *:not(pre, pre *, table, table *, .attach-strip, .attach-strip *, .mic-ticker, .mic-ticker *) { touch-action: pan-y pinch-zoom; }

/* Handy: Benachbarte Aufgaben teilen sich die Rundung des nächsten Tabs. */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 0; max-height: 30dvh; overflow-y: auto; }
  .task-pills { display: contents; }
  .topbar .pill { font-size: 0.72rem; padding: 3px 8px; }
  .topbar > .pill-new { margin-inline-end: 4px; }
  .task-pills .pill { position: relative; z-index: 0; gap: 3px; padding-inline: 6px; max-width: 100%; }
  .task-pills .pill.joins-next:not(.active) { border-end-end-radius: 0; border-start-end-radius: 0; }
  .task-pills .pill.joins-next:not(.active)::after {
    content: ""; position: absolute; pointer-events: none;
    inset-block: -1px; inset-inline-start: 100%; width: 1lh;
    background: inherit; border-block: inherit;
  }
  .task-pills .pill:focus-visible { outline-offset: -3px; }
}

/* Gedrücktes Plus bleibt unter iOS bei der App. */
.topbar :is(#newTaskBtn, #micBtn) {
  flex: none; width: 34px; height: 26px; padding: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar #micBtn { border-color: var(--new-task-green); }
#newTaskBtn.hold-ready { background: var(--new-task-green); border-color: var(--new-task-green); color: var(--bg); }
#newTaskBtn.hold-archive {
  background: var(--danger); border-color: var(--danger); color: #fff;
  box-shadow: 0 0 0 3px rgb(255 69 58 / 32%);
}
.topbar #newTaskBtn.hold-archive { font-size: 0.78rem; }
.phone-actions #newTaskBtn.hold-archive { font-size: 20px; }
#newTaskBtn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Handy: Leeres ausblenden, der aktive Bereich bekommt den Platz. */
@media (max-width: 720px) {
  .app-shell.no-output .output-wrap { display: none; }
  .app-shell {
    container: mobile-hub / size;
    min-width: 0;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overflow: hidden;
    background: var(--panel);
  }
  .app-shell .topbar { max-height: 28%; }
  .app-shell #promptInput { max-height: min(140px, 20cqh); }
  .prompt-tools > :is(button, label) { min-width: 44px; min-height: 44px; }
}

/* Bei wenig Höhe bleibt unter dem Editor Platz für Fortschritt und Warteschlange. */
@container mobile-hub (max-height: 520px) {
  .app-shell.max-prompt .output-wrap { display: none; }
  .app-shell:not(.no-output, .max-prompt) #promptInput { max-height: var(--prompt-three-lines); }
  .app-shell .topbar { max-height: 22%; }
}

/* Offene Bildschirmtastatur (Plus/Folgeauftrag): Der Editor bekommt den Platz, die letzte Antwort bleibt als kleiner Ausschnitt.
   Nur Bereiche unter der Werkzeugleiste ändern sich, damit ein Tipp auf GO/Vergrößern nicht ins Leere springt. */
@container mobile-hub (max-height: 600px) {
  .app-shell:not(.max-prompt):has(.prompt-dock:focus-within #promptInput:not([readonly])) .output-wrap { display: none !important; }
  .app-shell:not(.max-prompt):has(.prompt-dock:focus-within #promptInput:not([readonly])) .prev-final { flex: 0 1 auto; min-height: 0; max-height: 18% !important; }
  .app-shell:not(.max-prompt):has(.prompt-dock:focus-within #promptInput:not([readonly])) .prompt-dock { flex: 1 1 auto; }
  .app-shell:has(.prompt-dock:focus-within #promptInput:not([readonly])) #promptInput { flex: 1 0 auto; max-height: none !important; }
}


/* Touch-Geräte: Seite selbst ist unverschiebbar, die App füllt genau das Sichtbare (JS misst nach). */
@media (pointer: coarse) {
  html { overscroll-behavior: none; }
  body { position: fixed; inset: 0; width: 100%; }
  .app-shell { height: 100%; }
}

/* Structural Markdown in the final answer and in previous replies. */
.apple-text :is(h1,h2,h3,h4,h5,h6) { margin: .55em 0 .2em; font-weight: 650; line-height: 1.25; }
.apple-text h1 { font-size: 1.35em; }
.apple-text h2 { font-size: 1.2em; }
.apple-text :is(h3,h4,h5,h6) { font-size: 1.06em; }
.apple-text :is(ul,ol) { margin: .25em 0; padding-inline-start: 1.65em; }
.apple-text li > :is(ul,ol) { margin: 0; }
.apple-text pre { margin: .45em 0; padding: .65em; border-radius: 6px; background: #101725; overflow-x: auto; white-space: pre; }
.apple-text pre code { color: inherit; background: none; padding: 0; }
.apple-text > :first-child { margin-top: 0; }
.apple-text > :last-child { margin-bottom: 0; }
.att-file { width: auto; max-width: 16em; height: auto; padding: 5px 20px 5px 7px; overflow-wrap: anywhere; font-size: .78rem; }
#guestFiles {
  width: min(28rem, calc(100vw - 2rem)); max-height: 80dvh; overflow-y: auto;
  padding: 1rem; border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); color: var(--text); font: inherit;
}
#guestFiles::backdrop { background: rgba(0, 0, 0, .6); }
#guestFiles h2 { margin: 0; font-size: 1rem; }
#guestFiles > * + * { margin-top: .6rem; }
#guestFiles .ov-actions { display: flex; flex-wrap: wrap; }
#guestFiles .ov-btn { min-height: 44px; padding-inline: .8rem; }
.guest-file-list { max-height: 45dvh; overflow-y: auto; }
.guest-file-row { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem; padding: .25rem 0; }
.guest-file-row label { display: flex; align-items: baseline; gap: .4rem; overflow-wrap: anywhere; }
.guest-file-row a { color: #85c7ff; }
.status-overlay { overflow-y: auto; }
.status-overlay > * { flex-shrink: 0; }
.apple-text blockquote { margin: .4em 0; padding-inline-start: .65em; border-inline-start: 2px solid #6c829c; }
.answer-table { max-width: 100%; overflow-x: auto; margin: .5em 0; }
.answer-table table { border-collapse: collapse; text-align: start; font-size: .95em; }
.answer-table :is(td,th) { padding: .3em .55em; border: 1px solid var(--border); }
.answer-table th { background: #182435; }
.answer-table .align-right { text-align: right; }
.answer-table .align-center { text-align: center; }

.ov-empty { font-size: .76rem; color: #94a3b8; }

.entry-files { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.entry-files a { display: inline-flex; align-items: center; gap: .35em; color: #85c7ff; font-size: .85em; }
.entry-files img { width: 2rem; height: 2rem; object-fit: cover; border-radius: .3em; }

#queueCompose { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; }
.saved-additions { display: flex; flex-wrap: wrap; gap: .25rem; }
.saved-additions button { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task-action-status[data-error="true"] { color: #ffb16b; }
#queueComposeTarget { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Anchored right below the tab pills on the app's measured visible height. */
.phone-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 12;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}
.phone-actions:not(:has(> button)) { display: none; }
.phone-actions > button {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 24px;
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 45%));
}
.phone-context-actions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}
.phone-context-actions[data-avoid-go="true"] { display: none !important; }
.ctx-jump {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 24px;
  cursor: pointer;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 45%));
}
.phone-context-actions > .scroll-down {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  pointer-events: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 24px;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 45%));
}
.ctx-jump-running {
  background: var(--state-running-bg);
  border: 1px solid var(--state-running-border);
  box-shadow: inset 0 0 0 1px var(--state-running-border);
}
.ctx-jump-reply {
  background: var(--state-reply-bg);
  border: 1px solid var(--state-reply-border);
  box-shadow: inset 0 0 0 1px var(--state-reply-border);
}
.ctx-jump-queued { background: var(--state-queued-bg); border: 1px solid var(--state-queued-border); }
.ctx-jump-done { background: var(--state-done-bg); border: 1px solid var(--state-done-border); }
.app-shell.is-recording .phone-context-actions { display: none !important; }
.phone-actions .pill-new.active { background: #192437; }
.phone-actions .icon-btn { border-color: var(--new-task-green); }
.app-shell > #statusToggleBtn {
  position: absolute;
  right: 0;
  bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  z-index: 12;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 24px;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 45%));
}
.app-shell > #statusToggleBtn .pill-icon {
  width: 21px;
  height: 21px;
}
#micBtn { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

.app-shell.is-recording { pointer-events: none; }
.is-recording [data-recording-muted] { filter: blur(3px) brightness(.46); }
.app-shell.is-recording .prompt-dock { opacity: 1; }
.is-recording .audio-capture { pointer-events: auto; color: var(--text); }
.is-recording .mic-progress { color: inherit; font-weight: 600; }
.is-recording .audio-capture::before {
  content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: #ff545b;
}
.is-recording #micBtn.recording {
  pointer-events: auto; border: 3px solid #ff545b; background: #4a1018;
  box-shadow: 0 0 0 3px rgb(255 84 91 / 28%), 0 0 18px rgb(255 84 91 / 48%);
}

/* UI-Analyse 01.12.2026 ---------------------------------------------------------------- */
/* 1 (+ Audit 02.12. H02): Die schwebende Knopfspalte bekommt am Handy eine eigene Spur; nichts liegt darunter. */
.app-shell:has(#phoneActions > button) :is(.output-wrap, .status-strip, #micJobs, #guestFileErrors) { padding-inline-end: 56px; }

/* 8: Live-Fortschritt nur so hoch wie sein Text, höchstens ein Drittel. */
.live-progress { flex: 0 1 auto; height: auto; max-height: 33.333dvh; }
#liveProgressText { min-height: calc(2lh + 2px); }

/* 5: Statuspanel – Abbrechen-Gruppe abgesetzt, wichtigste Aktion hervorgehoben, Legende einklappbar. */
.ov-danger { margin-top: 2px; padding-top: 8px; border-top: 1px solid rgba(255, 105, 97, 0.35); }
#actConfirm:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ov-hint-box > summary { cursor: pointer; color: var(--muted); font-size: 0.78rem; width: fit-content; }
.ov-hint-box[open] > summary { margin-bottom: 4px; }
.ov-hint-box .ov-hint { font-size: 0.78rem; line-height: 1.45; }

/* 9: Anhang-Auswahl für Gäste direkt an der Büroklammer. */
.attach-menu { position: fixed; z-index: 30; display: grid; gap: 6px; padding: 8px; min-width: 200px;
  background: rgba(13, 19, 34, 0.98); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 28px rgb(0 0 0 / 55%); }
.attach-menu .ov-btn { min-height: 44px; text-align: left; font-size: 0.9rem; padding-inline: 12px; }
.attach-menu .ov-btn:focus-visible { outline: 2px solid #85c7ff; outline-offset: 2px; }
.guest-file-row { align-items: center; min-height: 44px; }
.guest-file-row label { align-items: center; min-height: 44px; flex: 1; }
.guest-file-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin: 0; }
.guest-file-row a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; }

/* 6: Einmaliger Hinweis zu Tippen/Halten neben Plus und Mikrofon. */
.press-hint { position: absolute; top: 0; right: 56px; width: min(250px, calc(100vw - 76px)); pointer-events: auto;
  display: grid; gap: 6px; padding: 10px 12px; font-size: 0.82rem; line-height: 1.35; color: var(--text);
  background: rgba(13, 19, 34, 0.97); border: 1px solid var(--new-task-green); border-radius: 12px; box-shadow: 0 6px 22px rgb(0 0 0 / 55%); }
.press-hint p { margin: 0; }
.press-hint .ov-btn { justify-self: end; min-height: 44px; padding-inline: 14px; }
.app-shell.is-recording .press-hint { display: none; }

/* 4: Touch – wirksame Tippflächen von etwa 44 px, die Optik bleibt möglichst kompakt. */
@media (pointer: coarse) {
  .topbar { row-gap: 8px; }
  .topbar .pill { min-height: 36px; position: relative; }
  .topbar > .pill-status { min-width: 36px; }
  .topbar .pill::before { content: ""; position: absolute; inset: -4px 0; }
  .section-size, .entry-action, .queue-append, .queue-move, .queue-drag, .queue-inject { min-height: 44px; min-width: 44px; }
  .task-entry-answer > summary, .task-entry-live > summary { min-height: 44px; line-height: 1.25; }
  .att-thumb { width: 56px; height: 56px; }
  .att-rm { width: 30px; height: 30px; font-size: 16px; border-bottom-left-radius: 8px; }
  .att-rm::after { content: ""; position: absolute; inset: 0 0 -14px -14px; }
  .f-btn, .ov-btn, .ov-item { min-height: 44px; }
  .ov-hint-box > summary { line-height: 44px; }
}

/* UI-Audit 02.12.2026 (GPT-6.1 Terra) ------------------------------------------------- */
/* M01: Sprungknöpfe tragen ein Zeichen, nicht nur eine Farbe. */
.ctx-jump { display: grid; place-items: center; color: #e2e8f0; font-size: 18px; font-weight: 700; line-height: 1; }
.ctx-jump-running::before { content: "▶"; color: #f7d680; font-size: 15px; }
.ctx-jump-queued::before { content: "⋯"; color: #bfdbfe; font-size: 22px; }
.ctx-jump-done::before { content: "✓"; color: #e2e8f0; }
/* M02: Weiße Schrift auf Blau mit 5,6:1 statt 3,65:1. */
.btn-primary, #actConfirm:not(:disabled) { background: #0066cc; border-color: #0066cc; }
/* M04: Status- und Aufnahmezeile brechen um, statt seitlich zu scrollen. */
.status-strip { flex-wrap: wrap; row-gap: 2px; white-space: normal; overflow-x: visible; }
.mic-progress { flex-wrap: wrap; }
.status-strip > * { max-width: 100%; min-width: 0; flex-shrink: 1; overflow-wrap: anywhere; }
/* M06: Statuspanel am Handy deckend über volle Breite; rechte Schnellbuttons dabei ausblenden. */
@media (max-width: 720px), (pointer: coarse) and (max-width: 960px) {
  .status-overlay {
    left: calc(var(--content-edge) + env(safe-area-inset-left, 0px));
    right: calc(var(--content-edge) + env(safe-area-inset-right, 0px));
    width: auto;
    background: rgba(12, 18, 32, 0.98);
  }
}
.app-shell:has(#statusOverlay:not(.hidden)) #phoneActions { display: none !important; }
.app-shell:has(#statusOverlay:not(.hidden)) > #statusToggleBtn { visibility: hidden; pointer-events: none; }
/* N01: Alle Laufzustände (auch Quellen/Abgleich) sehen aus wie „In Bearbeitung“. */
.task-entry:is([data-status="sources"], [data-status="answer_sync"], [data-status="partial_sync"]) { background: var(--state-running-bg); }
.task-entry:is([data-status="sources"], [data-status="answer_sync"], [data-status="partial_sync"]) .task-entry-state { color: #f7d680; }
/* M05: Schmale Handys – Symbolknöpfe in eine Zeile, „Zur laufenden Aufgabe“ darunter. */
@media (max-width: 380px) {
  .queue-controls { gap: 4px; }
  .queue-controls > .queue-inject { order: 3; }
  .queue-controls > button { padding-inline: 8px; }
  .queue-controls > .queue-move:not(.queue-inject), .queue-controls > .queue-drag { min-width: 40px; }
}
/* H03: Verbindung weg – alter Stand bleibt sichtbar, ist aber als veraltet markiert. */
.conn-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #ffb16b; font-size: 0.8rem; font-weight: 600; }
.conn-status.hidden { display: none; }
.app-shell.is-stale #taskEntries { opacity: 0.55; }
@media (pointer: coarse) {
  /* M03 */
  .conn-status .section-size { min-height: 44px; }
}

/* Statusfenster am Handy (02.12.): direkt unter der ganzen Tab-Leiste, von Rand zu Rand, Schließen so groß
   wie der Status-Knopf (Maße setzt fitOverlay). Kein blauer Bereichsstreifen mehr links am Prompt. */
@media (max-width: 720px), (pointer: coarse) and (max-width: 960px) {
  .status-overlay {
    left: 0; right: 0; width: auto;
    border-inline: 0; border-top: 0; border-radius: 0 0 14px 14px;
    padding-inline: calc(var(--content-edge) + 6px + env(safe-area-inset-left, 0px)) calc(var(--content-edge) + 6px + env(safe-area-inset-right, 0px));
  }
  #ovCloseBtn { flex: none; display: grid; place-items: center; padding: 0; border-radius: 999px; font-size: 1.1rem; }
  .app-shell :is(.prompt-dock, .output-wrap, .live-progress) { border-left-color: transparent !important; }
}

/* Vollbild-Eingabe am Handy ab ganz oben links (überdeckt Tabs, Aufgaben & rechte Buttons). */
.app-shell:has(#phoneActions > button) #promptDock:not(.hidden) {
  position: absolute;
  inset: 0;
  z-index: 25;
  min-height: 0;
  max-height: none;
  padding: calc(8px + env(safe-area-inset-top, 0px)) calc(10px + env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) calc(10px + env(safe-area-inset-left, 0px));
  border: 0;
  background: var(--panel);
  background-image: none;
  opacity: 1;
}
.app-shell:has(#phoneActions > button) #promptDock .prompt-tools { width: 100%; }
.app-shell:has(#phoneActions > button) #promptDock .prompt-close {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border-radius: 999px; font-size: 1.1rem;
  margin-inline-end: auto;
}
.app-shell:has(#phoneActions > button) #promptDock #promptSizeBtn { display: none; }
.app-shell:has(#phoneActions > button) #promptDock #promptInput {
  flex: 1 1 auto; height: auto !important; max-height: none !important; min-height: 120px;
}
.app-shell:has(#phoneActions > button):has(#promptDock:not(.hidden)) #phoneActions { display: none !important; }
.app-shell:has(#phoneActions > button):has(#promptDock:not(.hidden)) > #statusToggleBtn { visibility: hidden; pointer-events: none; }

