:root { color-scheme: light; --ink: #17191c; --muted: #626870; --line: #e8eaed; --soft: #f5f6f8; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; padding: clamp(14px, 2vh, 24px) clamp(16px, 2.5vw, 36px); background: #fff; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
h1 { margin: 0; font-size: clamp(26px, 3.5vw, 38px); font-weight: 650; letter-spacing: -1.2px; line-height: 1.15; }
#datum { color: var(--muted); font-size: 15px; margin: 5px 0 0; }
#uhrzeit { font-size: clamp(34px, 4.5vw, 48px); font-weight: 350; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.karte { background: #fff; padding: 16px 18px; border: 1px solid var(--line); border-radius: 20px; min-width: 0; box-shadow: 0 3px 14px #18223505; }
.karte h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.karte h2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #20242a; flex-shrink: 0; }
.karte:nth-child(3) h2::before { background: #bd783c; }
.karte:nth-child(4) h2::before { background: #7296bc; }
.karte p { font-size: 15px; margin: 7px 0; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #3d668f; outline-offset: 3px; }
.todoEingabe { display: flex; margin-top: 12px; gap: 8px; }
.todoEingabe input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 11px; font-size: 16px; }
.todoEingabe input::placeholder { color: #737981; }
.todoEingabe button { width: 44px; border: none; background: var(--ink); color: #fff; border-radius: 11px; font-size: 25px; cursor: pointer; }
.todo { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 15px; padding: 3px 0; }
.todo label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.todo span { overflow-wrap: anywhere; }
.todo input[type="checkbox"] { width: 23px; height: 23px; flex-shrink: 0; accent-color: #20242a; }
.todo.erledigt span { text-decoration: line-through; color: var(--muted); }
.todo button { min-height: 36px; padding: 8px; border: 0; border-radius: 8px; cursor: pointer; background: var(--soft); color: var(--muted); font-size: 12px; }
#todoStatus { font-size: 11px; color: var(--muted); }
button:disabled { opacity: .5; cursor: wait; }
#stundenplanStatus { color: var(--muted); line-height: 1.3; font-size: 13px; margin: 0 0 8px; }
.unterricht { display: flex; gap: 18px; align-items: baseline; padding: 6px 10px; margin: 2px 0; border-radius: 9px; border-left: 3px solid transparent; font-size: 15px; }
.unterricht:nth-child(even) { background: #f8f9fa; }
.unterricht.aktuell { background: #edf4ef; border-left-color: #537962; }
.unterricht strong { font-weight: 600; }
.unterrichtZeit { flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.wetterTitel { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: normal; letter-spacing: 0; }
#wetterJetzt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
#wetterJetzt > strong { font-size: 32px; font-weight: 550; letter-spacing: -1px; line-height: 1.1; }
#wetterJetzt small { color: var(--muted); font-size: 11px; }
#wetterVerlauf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
#wetterVerlauf > div { display: flex; flex-direction: column; gap: 3px; text-align: center; padding: 6px 2px; background: var(--soft); border-radius: 10px; font-size: 11px; overflow-wrap: anywhere; }
#wetterVerlauf strong { font-size: 18px; font-weight: 600; }
#wetterVerlauf small { font-size: 10px; color: var(--muted); }
.karte #wetterStatus { font-size: 10px; color: var(--muted); margin: 5px 0 0; }
.wetterQuelle { font-size: 10px; color: var(--muted); text-underline-offset: 3px; }
.karte #essenStatus { font-size: 11px; color: var(--muted); margin: 8px 0 3px; }
.essenLink { font-size: 12px; color: var(--ink); text-underline-offset: 3px; }
#essenMittag, #essenAbend { overflow-wrap: anywhere; margin: 3px 0 10px; font-size: 17px; font-weight: 550; letter-spacing: -.2px; }
.karte:nth-child(3) > p:has(> strong) { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin: 7px 0 0; }
@media (max-height: 700px) and (min-width: 600px) {
  body { padding: 12px 18px; }
  header { margin-bottom: 10px; }
  .karte { padding: 12px 15px; border-radius: 16px; }
  .karte h2 { font-size: 18px; margin-bottom: 7px; }
  .unterricht { padding: 4px 8px; }
  main { gap: 10px; }
}
@media (max-width: 599px) {
  main { grid-template-columns: 1fr; }
  #datum { font-size: 13px; }
}

.termineHeute { color: #ae2525; margin-top: 12px; }
.todo.terminWichtig span { color: #ae2525; }
.todo.terminWichtig.erledigt span { color: #ae2525; opacity: .65; }
.todo.terminWichtig input[type="checkbox"] { accent-color: #ae2525; }
#termineHinweis { color: #ae2525; font-size: 12px; }
footer { display: flex; justify-content: center; margin-top: 12px; }
footer button, .terminDialog button { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); min-height: 40px; padding: 8px 12px; cursor: pointer; }
footer button { color: var(--muted); font-size: 13px; }
.dialogHintergrund { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; background: #17191c66; }
.terminDialog { background: #fff; border-radius: 20px; padding: 22px; width: min(100%, 640px); max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 15px 60px #0003; }
.dialogKopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialogKopf h2 { margin: 0; font-size: 22px; }
.terminDialog > p { color: var(--muted); font-size: 14px; line-height: 1.5; }
#terminForm { display: flex; flex-direction: column; gap: 8px; }
#terminForm label { font-size: 14px; font-weight: 600; }
#terminForm input { min-width: 0; width: 100%; padding: 11px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 16px; }
.terminAktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
#terminSpeichern { background: var(--ink); color: white; }
.terminZeile { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.terminZeile > span { flex: 1; min-width: 160px; overflow-wrap: anywhere; }
.terminZeile button { font-size: 12px; }
.terminHeute > span { color: #ae2525; font-weight: 600; }
@media (max-width: 599px) { .terminDialog { padding: 16px; } .dialogKopf h2 { font-size: 19px; } }
