/* Assistent – Handy-Seite. Farben wie die Mac-App (main.swift), Regeln aus Melvins UI-Vorgaben:
   Regular nur in Schwarz, graue Schrift fett und dunkel, Schrift auf Orange dunkel, drei Größen 13/15/20. */
@font-face { font-family: "Hurme"; src: url("hurme-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
/* Hurme hat ein sehr breites Leerzeichen */
.kopf h1, .karte h3, .briefing .inhalt h1, .briefing .inhalt h2, .briefing .inhalt h3 { word-spacing: -0.18em; }

:root {
  --orange: #EF7D43; --nacht: #080F18; --grund: #EFF2F4; --karte: #FFFFFF; --tinte: #080F18;
  --schiefer: #4B5563; --linie: #DCE2E8; --gruen: #2E9E6B; --auf-orange: #071018; --orange-hauch: #FDF1EA;
  --klein: 13px; --normal: 15px; --gross: 20px;
}
@media (prefers-color-scheme: dark) {
  :root { --orange: #F08A55; --grund: #0C141D; --karte: #151E27; --tinte: #EFF2F4; --schiefer: #9AA6B6;
          --linie: #2A3643; --gruen: #4CC38A; --orange-hauch: #2A1E17; }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--grund); color: var(--tinte); }
body { font: 500 var(--normal)/1.45 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
       padding-bottom: calc(24px + env(safe-area-inset-bottom)); -webkit-text-size-adjust: 100%; }
button, textarea, input { font: inherit; color: inherit; }
a { color: var(--orange); font-weight: 600; text-decoration: none; }

/* Kopf: dunkel wie die Mac-App, reicht bis unter die Statusleiste */
.kopf { background: var(--nacht); color: #EFF2F4; padding: calc(12px + env(safe-area-inset-top)) 16px 14px; }
.kopf-zeile { display: flex; align-items: center; gap: 12px; }
.kopf h1 { font: 600 var(--gross)/1.2 "Hurme", -apple-system, sans-serif; margin: 0; flex: 1; }
.kopf .zahl { font-weight: 600; font-size: var(--klein); color: #9AA6B6; margin-top: 2px; }
.knopf-pause { border: 1.5px solid #2A3643; background: transparent; color: #EFF2F4; border-radius: 8px;
               padding: 6px 12px; font-weight: 600; font-size: var(--klein); }
.knopf-pause.an { background: var(--orange); color: var(--auf-orange); border-color: var(--orange); }

main { padding: 12px 16px 0; display: grid; gap: 18px; }

/* Abschnitte */
.abschnitt-kopf { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; }
.abschnitt-kopf h2 { margin: 0; font: 600 var(--klein)/1 -apple-system, sans-serif; letter-spacing: 1.3px;
                     text-transform: uppercase; display: inline-block; padding-bottom: 5px; border-bottom: 2px solid var(--orange); }
.abschnitt-kopf span { font-weight: 600; font-size: var(--klein); color: var(--schiefer); }

.karte { background: var(--karte); border-radius: 15px; padding: 14px; border: 1px solid var(--linie); }
.karte + .karte { margin-top: 10px; }
.karte h3 { font: 600 var(--normal)/1.3 "Hurme", -apple-system, sans-serif; margin: 0 0 4px; }
.leise { color: var(--schiefer); font-weight: 600; font-size: var(--klein); }
.kurz { margin: 0 0 10px; }

/* Schnelleingabe */
.eingabe textarea { width: 100%; min-height: 64px; border: 1.2px solid var(--linie); border-radius: 10px; padding: 10px 12px;
                    background: var(--karte); resize: none; font-weight: 500; }
.eingabe textarea:focus, .notiz:focus { outline: 2px solid var(--orange); outline-offset: -1px; }
.zeile { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.zeile .rechts { margin-left: auto; }

/* Knöpfe: orange = Hauptaktion (Schrift dunkel), Rahmen = Nebenaktion */
.knopf { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 600; min-height: 44px; }
.knopf.voll { background: var(--orange); color: var(--auf-orange); }
.knopf.voll:disabled { background: var(--linie); color: var(--schiefer); }
.knopf.rahmen { background: transparent; border: 1.2px solid var(--linie); color: var(--tinte); }
.knopf.text { background: transparent; color: var(--schiefer); padding: 10px 6px; }
.knopf-datei { display: inline-flex; align-items: center; gap: 6px; color: var(--schiefer); font-weight: 600; font-size: var(--klein);
               background: transparent; border: 0; padding: 8px 0; min-height: 44px; }
.knopf-datei svg, .ico { width: 18px; height: 18px; stroke: var(--orange); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: var(--grund); border: 1px solid var(--linie); border-radius: 7px; padding: 3px 8px; font-weight: 600; font-size: var(--klein); }
.chip.datei { color: var(--tinte); }

/* Vorschläge */
.vorschlag { border: 1.5px solid var(--linie); border-radius: 12px; padding: 12px; margin-top: 10px; display: block; }
.vorschlag.gewaehlt { border-color: var(--orange); background: var(--orange-hauch); }
.vorschlag-kopf { display: flex; align-items: flex-start; gap: 10px; }
.vorschlag-kopf input { margin-top: 3px; accent-color: var(--orange); width: 18px; height: 18px; flex: none; }
.vorschlag-kopf strong { flex: 1; font-weight: 600; }
.empfohlen { background: var(--orange); color: var(--auf-orange); font-weight: 600; font-size: var(--klein); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.vorschlag p { margin: 6px 0 0; }
.grund { margin-top: 10px; font-weight: 600; font-size: var(--klein); color: var(--schiefer); }

/* Bilder: eins in voller Breite, mehrere seitwärts */
.bilder { display: flex; gap: 8px; overflow-x: auto; margin: 10px -2px 0; padding: 0 2px 4px; scroll-snap-type: x mandatory; }
.bilder figure { margin: 0; flex: 0 0 86%; scroll-snap-align: start; }
.bilder figure:only-child { flex-basis: 100%; }
.bilder img { width: 100%; max-height: 260px; object-fit: contain; background: var(--grund); border-radius: 10px; border: 1px solid var(--linie); display: block; }
.bilder figcaption { font-weight: 600; font-size: var(--klein); color: var(--schiefer); margin-top: 4px; }

/* Fragen */
.option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--linie); }
.option:first-of-type { border-top: 0; }
.option input { accent-color: var(--orange); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.option span { flex: 1; }
.option span.empfohlen { flex: none; }
.notiz { width: 100%; min-height: 44px; border: 1.2px solid var(--linie); border-radius: 10px; padding: 10px 12px; background: var(--karte); resize: none; margin-top: 8px; font-weight: 500; }
.frage + .frage { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--linie); }
.frage-titel { font-weight: 600; }

/* Arbeite ich dran / Erledigt */
.schritt { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; color: var(--orange); font-weight: 600; font-size: var(--klein); }
.verlauf { margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--klein); }
.verlauf li { display: grid; grid-template-columns: 78px 1fr; gap: 8px; padding: 3px 0; }
.verlauf time { color: var(--schiefer); font-weight: 600; }
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
.erledigt-zeile { display: flex; align-items: center; gap: 10px; }
.erledigt-zeile .ico { stroke: var(--gruen); }
.erledigt-zeile div { flex: 1; min-width: 0; }

/* Briefing */
.briefing { border-left: 4px solid var(--orange); }
.briefing .inhalt h1, .briefing .inhalt h2, .briefing .inhalt h3 { font: 600 var(--normal)/1.3 "Hurme", -apple-system, sans-serif; margin: 12px 0 4px; }
.briefing .inhalt p, .briefing .inhalt ul { margin: 4px 0; }
.briefing .inhalt ul { padding-left: 18px; }

.hinweis { background: var(--orange-hauch); border: 1.5px solid var(--orange); border-radius: 12px; padding: 12px 14px; }
.hinweis p { margin: 0 0 8px; }
.leer { text-align: center; padding: 22px 10px; color: var(--schiefer); font-weight: 600; }

/* Großansicht */
.gross { position: fixed; inset: 0; background: rgba(8, 15, 24, .94); z-index: 10; display: flex; flex-direction: column;
         padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom)); }
.gross img { flex: 1; min-height: 0; width: 100%; object-fit: contain; touch-action: pinch-zoom; }
.gross p { color: #EFF2F4; font-weight: 600; text-align: center; margin: 8px 0; }
.gross button { align-self: flex-end; background: var(--orange); color: var(--auf-orange); border: 0; border-radius: 10px; padding: 8px 14px; font-weight: 600; min-height: 44px; }

.meldung { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); background: var(--nacht); color: #EFF2F4;
           border-radius: 12px; padding: 12px 14px; font-weight: 600; z-index: 20;
           /* Unsichtbar statt nur verschoben – sonst lugt sie auf dem iPhone über dem Home-Balken hervor */
           opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
.meldung.sichtbar { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
.ziel { animation: aufleuchten 1.6s ease-out; }
@keyframes aufleuchten { from { box-shadow: 0 0 0 3px var(--orange); } to { box-shadow: 0 0 0 0 transparent; } }

/* Zu tun */
.todo-gruppe { padding: 6px 14px; }
.gruppe-titel { font-weight: 600; font-size: var(--klein); color: var(--schiefer); padding: 8px 0 2px; }
.gruppe-titel.ueber, .ueber { color: #C2410C; font-weight: 600; }
.todo { border-top: 1px solid var(--linie); }
.gruppe-titel + .todo { border-top: 0; }
.todo summary { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.todo-text { flex: 1; min-width: 0; }
.todo-text strong { font-weight: 600; }
.haken { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--orange); background: transparent; flex: none; margin-top: 1px; padding: 0; position: relative; }
.haken::after { content: ""; position: absolute; inset: -9px; }  /* größere Tippfläche */
.haken.an { background: var(--orange); }
.todo-mehr { padding: 0 0 12px 38px; }
.todo-mehr p { margin: 0 0 8px; }
.knopf.klein { min-height: 36px; padding: 6px 10px; font-size: var(--klein); display: inline-flex; align-items: center; }
@media (prefers-color-scheme: dark) { .gruppe-titel.ueber, .ueber { color: #FB923C; } }
