/* Tagesplan (A319): CSS 1:1 aus dem Artefakt "Stefans Tagesplan", Stand 19.11.2026 */
:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
html{scroll-padding-top:env(safe-area-inset-top,0px);font-size:105%}
body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}
img{max-width:100%}
[hidden]:not([hidden=until-found i]){display:none!important}

/* Layout: Apple-Stil (iPhone Erinnerungen und Kalender), Akzent vis-Grün.
   Von oben: Kopf mit Schnelleingabe, Wichtig (Konflikte, Mails), Erinnerungen, Kalender, Karten. */
:root {
  --bg: #f2f2f7; --surface: #ffffff; --ink: #000000; --muted: #8a8a8e; --line: #e3e3e8; --grid: #ececf0;
  --accent: #5cb73b; --accent-ink: #3f8f24; --accent-soft: #e9f6e3;
  --warn: #c76b00; --warn-soft: #fff2e0; --crit: #ff3b30; --crit-soft: #ffe9e7;
  --a-vis: #5cb73b; --a-axs: #007aff; --a-fwportal: #ff3b30; --a-erfideo: #30b0c7; --a-feuerwehr: #ff3b30; --a-iu: #ffcc00; --a-sport: #007aff; --a-privat: #007aff; --a-wdg: #a2845e; --a-feiertag: #ff3b30; --a-gemeinsam: #af52de;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-d: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --r: 14px; --hour: 60px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #1c1c1e; --ink: #ffffff; --muted: #8e8e93; --line: #2c2c2e; --grid: #262628;
  --accent: #6cc94a; --accent-ink: #8bdc6b; --accent-soft: #1d3317;
  --warn: #ff9f0a; --warn-soft: #33240c; --crit: #ff453a; --crit-soft: #3a1714;
  --a-vis: #6cc94a; --a-axs: #0a84ff; --a-fwportal: #ff453a; --a-erfideo: #40c8e0; --a-feuerwehr: #ff453a; --a-iu: #ffd60a; --a-sport: #0a84ff; --a-privat: #0a84ff; --a-wdg: #b59469; --a-feiertag: #ff453a; --a-gemeinsam: #bf5af2;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --ink: #ffffff; --muted: #8e8e93; --line: #2c2c2e; --grid: #262628;
  --accent: #6cc94a; --accent-ink: #8bdc6b; --accent-soft: #1d3317;
  --warn: #ff9f0a; --warn-soft: #33240c; --crit: #ff453a; --crit-soft: #3a1714;
  --a-vis: #6cc94a; --a-axs: #0a84ff; --a-fwportal: #ff453a; --a-erfideo: #40c8e0; --a-feuerwehr: #ff453a; --a-iu: #ffd60a; --a-sport: #0a84ff; --a-privat: #0a84ff; --a-wdg: #b59469; --a-feiertag: #ff453a; --a-gemeinsam: #bf5af2;
  color-scheme: dark }

* { box-sizing: border-box }
body { background: var(--bg); color: var(--ink); font: 15.75px/1.45 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -0.005em }
.wrap { max-width: 1880px; margin: 0 auto; padding-block: 18px 48px; padding-inline: 20px; display: grid; gap: 18px }
h1, h2, h3 { font-family: var(--font-d); margin: 0; text-wrap: balance }
h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; display: flex; gap: 8px; align-items: baseline }
.muted { color: var(--muted) }
.small { font-size: .82rem }
.empty { color: var(--muted); font-size: .9rem; padding: 4px 0 }
.panel { background: var(--surface); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 12px; min-width: 0 }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
button { font-family: var(--font) }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.btn { font-weight: 600; font-size: .9rem; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; background: var(--accent-soft); color: var(--accent-ink) }
.btn.fill { background: var(--accent); color: #fff }
.btn.plain { background: transparent; color: var(--accent-ink); padding-inline: 8px }
.btn.grey { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--ink) }
.btn:disabled { opacity: .5; cursor: default }
input, select { font: inherit; font-size: 16px; color: var(--ink); background: color-mix(in srgb, var(--muted) 14%, transparent); border: 0; border-radius: 10px; padding: 10px 12px; min-width: 0 }

/* Kopf */
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap }
.chip { font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink) }

/* Kopf: Datum, Uhr, Wetter (Ansage 16.10.2026) */
.datum { font: 700 clamp(1.4rem, 3vw, 2rem) var(--font-d); letter-spacing: -0.01em }
.uhr { font: 700 clamp(2.6rem, 6vw, 4.2rem) var(--font-d); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1 }
/* Erinnerungen und Kalender nebeneinander auf breiten Schirmen */
.duo { display: grid; gap: 18px; min-width: 0 }
.duo > * { min-width: 0 }
@media (min-width: 1500px) { .duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start } }

/* In Arbeit (A266, Stefan #20) */
#inarbeit[hidden] { display: none }
.ia .imp li.grp { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 0 2px; border-top: 0 }
.ia details summary { cursor: pointer; color: var(--muted); font-size: .85rem; padding: 6px 0 }
.ia .seit { white-space: nowrap; color: var(--muted); font-size: .8rem }

/* Erinnerungen */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px }
.tile { all: unset; box-sizing: border-box; cursor: pointer; background: var(--bg); border-radius: 12px; padding: 9px 11px 8px; display: grid; grid-template-columns: auto 1fr; row-gap: 6px; align-items: center }
.tile i { width: 28px; height: 28px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: var(--surface); font: 700 .8rem var(--font); font-style: normal }
.tile b { justify-self: end; font: 700 1.4rem var(--font-d); font-variant-numeric: tabular-nums }
.tile span { grid-column: 1 / -1; font-weight: 600; font-size: .85rem; color: var(--muted) }
.tile[aria-pressed="true"] { background: var(--c) }
.tile[aria-pressed="true"] i { background: var(--surface); color: var(--c) }
.tile[aria-pressed="true"] b, .tile[aria-pressed="true"] span { color: var(--surface) }
.tile:focus-visible, .lrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.lists { display: grid; background: var(--bg); border-radius: 12px; overflow: hidden }
.lrow { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line) }
.lrow:first-child { border-top: 0 }
.lrow i { width: 22px; height: 22px; border-radius: 50%; background: var(--c) }
.lrow span { color: var(--muted); font-variant-numeric: tabular-nums }
.lrow[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 14%, transparent) }
details.prompt { margin-top: 6px }
details.prompt summary { cursor: pointer; font-size: .84rem; color: var(--accent-ink) }
details.prompt pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .8rem/1.45 ui-monospace, Consolas, monospace; background: var(--bg); border-radius: 8px; padding: 8px 10px; max-height: 220px; overflow: auto; margin: 6px 0 0 }

/* Kalender */
.calhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.calhead .nav { display: flex; gap: 4px; align-items: center }
.cal { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.cal .dh { padding: 6px 4px 8px; text-align: center; border-bottom: 1px solid var(--line) }
.cal .dh span { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; color: var(--muted) }
.cal .dh b { display: inline-block; font: 600 1.3rem var(--font-d); min-width: 1.8em; border-radius: 999px; font-variant-numeric: tabular-nums }
.cal .dh.today b { background: var(--accent); color: #fff }
.cal .dh.hol span { color: var(--crit) }
.allday { display: grid; gap: 3px; align-content: start; padding: 4px 3px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--grid); min-height: 30px; min-width: 0 }
.gut { font-size: .68rem; color: var(--muted); text-align: right; padding-right: 6px }
.calbody { grid-column: 1 / -1; display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); max-height: 620px; overflow-y: auto; position: relative }
.hours { position: relative }
.hours div { position: absolute; right: 6px; font-size: .7rem; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums }
.daycol { position: relative; border-left: 1px solid var(--grid); background-image: repeating-linear-gradient(to bottom, var(--grid) 0, var(--grid) 1px, transparent 1px, transparent var(--hour)); min-width: 0 }
.daycol.today { background-color: color-mix(in srgb, var(--accent-soft) 45%, transparent) }
.ev { position: absolute; border-radius: 6px; padding: 2px 5px; font-size: .74rem; line-height: 1.25; overflow: hidden; background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-left: 3px solid var(--c); color: var(--ink); cursor: pointer; text-align: left; border-top: 0; border-right: 0; border-bottom: 0; font-family: var(--font) }
.ev b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis }
.ev .tm { color: var(--muted); font-variant-numeric: tabular-nums }
.ev[draggable="true"] { cursor: grab }
.ev.past { opacity: .55 }
.ev.info, .adc.info, .mrow.info { opacity: .5; font-style: italic }
.adc.info.mini { font-size: .64rem; font-weight: 500; font-style: normal; opacity: .55; padding: 0 5px; background: transparent; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent) }
.adc.hannah { color: #e2569b; opacity: .8 }
.ev.option { background: transparent; border: 1px dashed var(--c); border-left: 3px dashed var(--c); opacity: .75 }
.adc { all: unset; box-sizing: border-box; cursor: pointer; font-size: .72rem; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--crit); z-index: 2 }
.nowline::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--crit) }
.calhint { font-size: .78rem; color: var(--muted) }

/* Kalender am Handy: wie iPhone */
.mstrip { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 2px }
.mstrip button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 2px; padding: 4px 0 }
.mstrip span { font-size: .7rem; font-weight: 600; color: var(--muted) }
.mstrip b { font: 600 1.15rem var(--font-d); width: 2em; height: 2em; display: grid; place-items: center; border-radius: 50% }
.mstrip .today b { color: var(--accent-ink) }
.mstrip .sel b { background: var(--ink); color: var(--surface) }
.mstrip .sel.today b { background: var(--accent); color: #fff }
.mstrip i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); opacity: .6 }
.mstrip i.none { visibility: hidden }
.mday { display: grid; gap: 0 }
.mday h3 { font-size: 1rem; padding: 8px 0 4px }
.mrow { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 62px 4px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); align-items: start }
.mrow .tm { font-size: .82rem; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.3 }
.mrow .tm small { display: block; color: var(--muted) }
.mrow i { align-self: stretch; border-radius: 2px; background: var(--c) }
.mrow b { font-weight: 600; overflow-wrap: anywhere }
.mrow small.o { display: block; color: var(--muted); font-size: .8rem }
.mobile-only { display: none }
@media (max-width: 760px) {
  .desk-only { display: none !important }
  .mobile-only { display: grid }
  .wrap { padding-inline: 12px }
}

/* Blätter */
.modal { position: fixed; inset: 0; z-index: 20; background: color-mix(in srgb, #000 35%, transparent); display: grid; place-items: center; padding: 16px }
.sheet { width: min(480px, 100%); max-height: 100%; overflow: auto; gap: 10px }
.sheet > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; text-align: center }
.sheet > header h2 { font-size: 1.05rem; justify-content: center }
.sheet label { display: grid; gap: 4px; font-size: .84rem; color: var(--muted) }
.sheet label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: .95rem }
.sheet input:not([type=checkbox]), .sheet select { width: 100% }
.sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.sheet .info { font-size: .85rem; color: var(--muted) }
.mailacts { display: flex; gap: 8px; flex-wrap: wrap }
@media (max-width: 760px) {
  .modal { place-items: end center; padding: 0 }
  .sheet { width: 100%; border-radius: 16px 16px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); max-height: 92vh }
}
/* Kompakt (Ansage 16.10.2026): Kopf mit Ziele und Wetter in einer Zeile, Erinnerungen und Kalender gleich hoch */
.wrap { padding-block: 10px 32px; gap: 14px }
@media (min-width: 1100px) {
  .top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, .55fr) auto; align-items: start; gap: 18px }
}
.uhr { font-size: clamp(2.2rem, 4.5vw, 3.2rem) }
.datum { font-size: 1.15rem }
@media (min-width: 1100px) { .top { align-items: stretch; padding-bottom: 14px; border-bottom: 1px solid var(--line) } }
@media (min-width: 1500px) {
  .duo > .panel { height: calc(100vh - 230px); min-height: 520px; overflow: auto }
}
/* Kalender: nur ein Scrollbalken, besser lesbar (Ansage 16.10.2026) */
@media (min-width: 1500px) {
  .duo > section[aria-labelledby="c-title"] { overflow: hidden; display: flex; flex-direction: column }
  .duo > section[aria-labelledby="c-title"] #c-desk { flex: 1; min-height: 0; display: flex; flex-direction: column }
  .duo > section[aria-labelledby="c-title"] .calbody { flex: 1; max-height: none; min-height: 0 }
}
.ev { font-size: .82rem; line-height: 1.3; padding: 3px 6px }
.ev b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical }
/* Noch kompakter (Ansage 27.10.2026): Kopf in einer Zeile, Ziele, Igor, Wetter und Tagesziel knapp, mehr auf einen Blick */
@media (min-width: 1100px) {
  .top { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.25fr) minmax(0, .9fr) minmax(200px, .6fr); gap: 12px; padding-bottom: 10px }
}
.uhr { font-size: clamp(1.8rem, 3.4vw, 2.5rem) }
.datum { font-size: 1rem }
.wrap { gap: 10px }
/* Aufgaben: Filter oben statt Seitenleiste, Kalender breiter (Ansage 27.10.2026) */
@media (min-width: 1500px) { .duo { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr) } }
/* A321: Kopf ohne Igor-Kachel (Datum und Uhr, Ziele, Wetter) */
@media (min-width: 1100px) { .top { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr) minmax(200px, .7fr) } }
/* A321: In Arbeit als Projektueberblick (Projektkarten seit 23.11.2026 weg) */
.ia-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px }
.ia-karten:empty { display: none }
.ia-titel { font-family: var(--font-d); font-size: .95rem; overflow-wrap: anywhere }
.ia-fuss { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px }
.ia-acts { display: flex; gap: 8px; align-items: center }
.ia-acts .btn { padding: 4px 12px; font-size: .82rem }
#ia-list:empty { display: none }
/* A442: Kopf groesser (Uhr und Jahresziele aus Abstand lesbar) */
.uhr { font-size: clamp(3rem, 7vw, 4.6rem) }
.datum { font-size: clamp(1.2rem, 2.2vw, 1.6rem) }
@media (min-width: 1100px) { .uhr { font-size: clamp(3.4rem, 5.2vw, 5.4rem) } }
.kal-einzeln { grid-template-columns: minmax(0, 1fr) !important }
