/* Fuer alte iPads: kein Grid, kein Flexbox, keine CSS-Variablen. */
* { -webkit-box-sizing: border-box; box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  /* Neues Bild: Zahl hinter ? erhoehen, Geraete merken es sich 30 Tage. */
  background: #2b8f9c url(/hintergrund?1) center center no-repeat; background-size: cover; color: #1d2b29;
  font: 17px/1.3 "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
h2, h3, p { margin: 0; }
h2 { font-size: 22px; line-height: 44px; }
h3 { font-size: 18px; line-height: 44px; }
button, input, select { font: inherit; color: inherit; margin: 0; border-radius: 6px; -webkit-appearance: none; appearance: none; }
button { border: 0; background: none; padding: 0 12px; height: 44px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgba(0,0,0,.08); }
button:focus, input:focus, select:focus, a:focus { outline: 2px solid #1b6b5a; outline-offset: -2px; }
input, select { width: 100%; height: 44px; padding: 0 10px; border: 1px solid #a9b8b3; background: #fff; }
.stark { background: #1b6b5a; color: #fff; font-weight: bold; }
.leise { color: #1b6b5a; }
.pfeil { font-size: 30px; line-height: 38px; width: 44px; padding: 0; }

.bereich { position: absolute; background: #fff; background: rgba(255,255,255,.88); border-radius: 10px; overflow: hidden; }
.kopf { position: absolute; top: 6px; left: 14px; right: 8px; height: 44px; white-space: nowrap; }
.kopf h2, .kopf h3 { overflow: hidden; text-overflow: ellipsis; }
.rechts { position: absolute; top: 0; right: 0; }
.rechts button { vertical-align: top; }
#tag h3 { padding-right: 130px; }
.liste { position: absolute; left: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* iPad quer */
#kalender { top: 12px; bottom: 161px; left: 12px; right: 36%; }
#wetter { position: absolute; left: 12px; right: 36%; bottom: 12px; height: 137px; }
#einkauf { top: 12px; bottom: 50%; left: 64%; right: 12px; margin: 0 0 6px 12px; }
#aufgaben { top: 50%; bottom: 12px; left: 64%; right: 12px; margin: 6px 0 0 12px; }
#reiter { display: none; }

/* Wetter: Widgets auf 75 % verkleinert */
.ort { position: absolute; top: 0; height: 137px; overflow: hidden; border-radius: 10px; opacity: .92; }
.ort0 { left: 0; right: 50%; margin-right: 6px; }
.ort1 { left: 50%; right: 0; margin-left: 6px; }
.ort iframe { display: block; border: 0; width: 133.34%; height: 183px; -webkit-transform: scale(.75); transform: scale(.75); -webkit-transform-origin: 0 0; transform-origin: 0 0; }

/* Kalender */
#wochentage { position: absolute; top: 52px; left: 0; right: 0; height: 22px; }
#wochentage span { float: left; width: 14.2857%; padding-left: 8px; font-size: 13px; color: #566865; }
#monat { position: absolute; top: 74px; left: 0; right: 0; bottom: 150px; border-bottom: 1px solid #cfd9d5; }
.woche { position: absolute; left: 0; right: 0; height: 16.6667%; overflow: hidden; }
.zelle {
  position: absolute; top: 0; width: 14.2857%; height: 100%; padding: 3px 4px; overflow: hidden;
  border-top: 1px solid #cfd9d5; border-radius: 0; text-align: left; line-height: 1.2;
}
/* Browser zentrieren Button-Inhalte sonst senkrecht. */
.zelle .innen { position: absolute; top: 3px; left: 4px; right: 4px; }
.zelle .nr { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; padding: 0 4px; border-radius: 12px; text-align: center; font-size: 15px; }
.zelle .mehr { font-size: 12px; color: #566865; }
/* Liegen ueber den Tagen; Tippen geht durch zum Tag. */
.eintrag { position: absolute; height: 16px; font-size: 13px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 2px 0 4px; padding-left: 4px; border-left: 3px solid #1b6b5a; pointer-events: none; }
.todo { border-left: 0; padding-left: 0; }
.balken { margin: 0; padding: 0 6px; border: 0; border-radius: 0; background: #1b6b5a; color: #fff; }
.anfang { margin-left: 4px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.schluss { margin-right: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.fremd .nr { color: #66746f; }
/* Feiertag; steht vor .gewaehlt, damit die Auswahl sichtbar bleibt. */
.frei { background: #fbdccb; }
.festname { padding: 6px 14px; color: #a03414; font-weight: bold; }
.spalte .festname { padding: 4px 2px 4px 4px; font-size: 12px; font-weight: normal; word-wrap: break-word; }
.gewaehlt { background: #cfe6df; }
.ist-heute .nr { background: #c2431f; color: #fff; font-weight: bold; }
#tag { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; }
#tag .liste { top: 54px; }

/* Ansichten: Tag, Woche, Monat, Jahr */
#blatt { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
#kalender h2 { font-size: 18px; }
#abo, #heute { padding: 0 7px; }
#ansichten { position: absolute; top: 10px; right: 214px; height: 36px; border-radius: 6px; background: #d9e5e1; overflow: hidden; }
#ansichten button { float: left; width: 52px; height: 36px; padding: 0; font-size: 14px; }
.ansicht-tag #monat, .ansicht-tag #wochentage, .ansicht-woche #wochentage, .ansicht-jahr #wochentage, .ansicht-jahr #tag, .ansicht-woche #termine { display: none; }
.ansicht-tag #tag { top: 52px; height: auto; }
.ansicht-woche #monat { top: 52px; bottom: 56px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ansicht-woche #tag { height: 56px; }
.ansicht-jahr #monat { top: 52px; bottom: 0; border: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.spalte { position: absolute; top: 0; width: 14.2857%; min-height: 100%; border-top: 1px solid #cfd9d5; border-left: 1px solid #cfd9d5; }
.tagkopf { display: block; width: 100%; padding: 0 4px; font-size: 15px; text-align: left; white-space: nowrap; }
.tagkopf .nr { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; border-radius: 12px; text-align: center; font-weight: bold; }
.wtermin { display: block; width: 100%; height: auto; min-height: 40px; padding: 4px 3px 4px 5px; border-left: 3px solid #1b6b5a; border-radius: 0; margin-bottom: 4px; font-size: 14px; line-height: 1.2; text-align: left; word-wrap: break-word; overflow: hidden; }
.wtermin .uhr { display: block; font-size: 12px; color: #566865; }
.wtermin.lang { display: none; }
.gross { position: absolute; height: 26px; line-height: 26px; font-size: 14px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.jahrmonat { position: relative; float: left; padding: 0; }
.jahrmonat .innen { position: absolute; top: 4px; left: 8px; right: 8px; text-align: left; }
.jahrmonat b { display: block; font-size: 14px; line-height: 20px; }
.jahrmonat i { float: left; width: 14.2857%; font-style: normal; font-size: 11px; line-height: 19px; text-align: center; }
.jahrmonat .etwas { background: #cfe6df; }
.jahrmonat .voll { background: #1b6b5a; color: #fff; }
.jahrmonat .jetzt { background: #c2431f; color: #fff; font-weight: bold; }

/* Listen */
.neu { position: absolute; top: 54px; left: 14px; right: 14px; height: 44px; margin: 0; }
.neu input { padding-right: 54px; }
.neu button { position: absolute; top: 0; right: 0; width: 46px; padding: 0; font-size: 24px; border-radius: 0 6px 6px 0; }
#haeufig { position: absolute; top: 104px; left: 14px; right: 0; height: 40px; white-space: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
#haeufig::-webkit-scrollbar { display: none; }
#haeufig button { height: 36px; margin-right: 6px; font-size: 15px; background: #d9e5e1; }
#aufgaben-neu input { padding-right: 116px; }
#aufgabe-datum { right: 46px; width: 64px; font-size: 16px; border-radius: 0; }
#aufgaben .liste { top: 104px; }
#einkauf .liste { top: 146px; }
.zeile { position: relative; min-height: 46px; border-bottom: 1px solid #e6ecea; }
.zeile button { display: block; width: 100%; height: auto; min-height: 46px; padding: 11px 14px; text-align: left; word-wrap: break-word; }
.zeile .stift { position: absolute; top: 0; right: 0; width: 48px; height: 46px; padding: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M3 17l1-4L14 3l3 3L7 16z M12 5l3 3' fill='none' stroke='%231b6b5a' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center center no-repeat; }
.kreis { position: absolute; top: 11px; left: 14px; width: 24px; height: 24px; line-height: 20px; border: 2px solid #1b6b5a; border-radius: 12px; text-align: center; color: #fff; font-size: 15px; }
.mit-haken { padding-left: 50px !important; padding-right: 50px !important; }
.erledigt .text { text-decoration: line-through; color: #566865; }
.erledigt .kreis { background: #1b6b5a; }
.zusatz { display: block; font-size: 14px; color: #566865; }
.spaet { color: #b33a18; font-weight: bold; }
.zeit { display: inline-block; min-width: 108px; color: #566865; }
.leer { padding: 10px 14px; color: #566865; }

/* Dialoge */
.dialog { display: none; position: fixed; z-index: 10; top: 0; right: 0; bottom: 0; left: 0; background: #8d9c98; background: rgba(29,43,41,.5); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dialog form { max-width: 480px; margin: 24px auto; padding: 14px 20px 20px; background: #fff; border-radius: 10px; }
.dialog label { display: block; margin-top: 10px; font-size: 14px; color: #566865; }
.dialog label input, .dialog label select { display: block; margin-top: 3px; font-size: 17px; color: #1d2b29; }
.dialog p { margin: 10px 0; }
.dialog a { color: #1b6b5a; }
.dialog .fehler { color: #b33a18; min-height: 22px; }
.klein { font-size: 14px; color: #566865; }
.paar { overflow: hidden; }
.paar label { float: left; width: 48%; }
.paar label + label { float: right; }
.knoepfe { overflow: hidden; }
.knoepfe .loeschen { float: right; color: #b33a18; }
#dialog-anmelden { background: #2b8f9c url(/hintergrund?1) center center no-repeat; background-size: cover; }
#offline { display: none; position: fixed; z-index: 5; left: 0; bottom: 0; padding: 8px 14px; background: #1d2b29; color: #fff; font-size: 14px; }

/* Personen: F lila, J braun, P anthrazit */
.marke { display: inline-block; width: 20px; height: 20px; line-height: 20px; margin-right: 6px; border-radius: 10px; text-align: center; font-size: 12px; font-weight: bold; color: #fff; }
.wtermin .marke { width: 15px; height: 15px; line-height: 15px; margin-right: 0; font-size: 10px; }
.wer-F { border-color: #7a3fa0; background: #eadcf3; }
.balken.wer-F, .marke.wer-F, .wtermin.lang.wer-F { background: #7a3fa0; }
.wer-J { border-color: #80502a; background: #f0e0d2; }
.balken.wer-J, .marke.wer-J, .wtermin.lang.wer-J { background: #80502a; }
.wer-P { border-color: #383e42; background: #d6dadd; }
.balken.wer-P, .marke.wer-P, .wtermin.lang.wer-P { background: #383e42; }

.wahl p { margin: 10px 0 3px; font-size: 14px; color: #566865; }
.wahl button { width: 56px; height: 44px; line-height: normal; margin-right: 8px; border: 1px solid #a9b8b3; border-radius: 6px; font-size: 17px; font-weight: bold; }

/* Seitenmenue */
#menue { position: absolute; top: 16px; left: 14px; width: 44px; height: 44px; padding: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M2 5h18M2 11h18M2 17h18' fill='none' stroke='%231b6b5a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center center no-repeat; }
#kalender #monatsname { padding-left: 34px; }
#dialog-menue form { position: absolute; top: 0; bottom: 0; left: 0; width: 280px; margin: 0; padding: 16px 0; border-radius: 0; overflow-y: auto; -webkit-animation: herein .2s ease-out; animation: herein .2s ease-out; }
#dialog-menue h2 { padding: 0 20px 14px; }
#dialog-menue .schliessen { position: absolute; top: 8px; right: 6px; width: 44px; padding: 0; font-size: 28px; color: #1b6b5a; }
#dialog-menue .zeile button { padding: 14px 20px; font-size: 18px; }
@-webkit-keyframes herein { from { -webkit-transform: translateX(-280px); } to { -webkit-transform: none; } }
@keyframes herein { from { transform: translateX(-280px); } to { transform: none; } }

.dialog .zeile button { padding-left: 0; }
#ziele-liste + .knoepfe { margin-top: 16px; }
.mit-stift { padding-right: 50px !important; }
.fahrt { display: block; margin-top: 3px; font-size: 15px; font-weight: bold; color: #1b6b5a; }
.fahrt.stau { color: #b33a18; }
.fahrt.spaet { font-weight: normal; color: #b33a18; }
#dialog-ziele .klein { margin: 0 0 6px; }
.dialog .zeile .stift { right: -14px; }

/* iPad hochkant */
@media (max-width: 899px) {
  #kalender { right: 12px; bottom: 46%; }
  #wetter { right: 12px; }
  #einkauf { top: 54%; bottom: 161px; left: 12px; right: 50%; margin: 12px 6px 0 0; }
  #aufgaben { top: 54%; bottom: 161px; left: 50%; right: 12px; margin: 12px 0 0 6px; }
}

/* Handy: ein Bereich pro Reiter */
@media (max-width: 599px), (max-height: 500px) {
  #kalender, #einkauf, #aufgaben, #wetter { display: none; height: auto; top: 8px; bottom: 64px; left: 8px; right: 8px; margin: 0; }
  .zeige-kalender #kalender, .zeige-einkauf #einkauf, .zeige-aufgaben #aufgaben, .zeige-wetter #wetter { display: block; }
  .ort { position: relative; left: 0; right: 0; height: 183px; margin: 0 0 8px; }
  .ort iframe { width: 100%; -webkit-transform: none; transform: none; }
  #monat { bottom: 32%; }
  #tag { height: 32%; }
  #menue { top: auto; bottom: 0; left: 0; width: 48px; height: 56px; }
  #kalender #monatsname { padding-left: 0; }
  #reiter { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; padding-left: 48px; background: #dfe6e3; }
  #reiter button { float: left; width: 25%; padding: 0; font-size: 15px; height: 56px; border-radius: 0; }
  .zeige-kalender [data-ziel=kalender], .zeige-einkauf [data-ziel=einkauf], .zeige-aufgaben [data-ziel=aufgaben], .zeige-wetter [data-ziel=wetter] { background: #1b6b5a; color: #fff; font-weight: bold; }
  #kalender .kopf button { padding: 0 7px; font-size: 15px; }
  #kalender .kopf .pfeil { width: 36px; font-size: 28px; }
  #kalender h2 { font-size: 17px; }
  #blatt { top: 46px; }
  #ansichten { top: 8px; left: 8px; right: 8px; height: 40px; }
  #ansichten button { width: 25%; height: 40px; font-size: 15px; }
  .spalte { position: static; width: auto; min-height: 0; border-left: 0; padding-bottom: 4px; }
  .luft, .gross { display: none; }
  .spalte .festname { padding: 0 14px 6px; font-size: 15px; }
  .tagkopf { height: 34px; padding: 0 14px; }
  .wtermin, .wtermin.lang { display: block; width: auto; min-width: 60%; margin: 0 14px 4px; padding: 6px 10px; font-size: 16px; }
  .wtermin .uhr { display: inline; font-size: 14px; }
  .wtermin .marke { margin-left: 6px; }
  .wtermin.lang { background: #1b6b5a; color: #fff; }
  .wtermin.lang .uhr { color: #fff; }
  .jahrmonat .innen { left: 5px; right: 5px; }
  #kalender h3 { font-size: 15px; }
  .eintrag { width: 7px; height: 7px; margin: 5px 0 0 12px; padding: 0; border: 0; border-radius: 4px; background: #1b6b5a; text-indent: 20px; }
  .todo { border: 2px solid #1b6b5a; background: #fff; }
  .balken { width: auto; height: 16px; margin: 0; padding: 0 5px; border-radius: 0; font-size: 12px; text-indent: 0; }
  .anfang { margin-left: 3px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
  .schluss { margin-right: 3px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
  .eintrag.wer-F { background: #7a3fa0; }
  .todo.wer-F { background: #fff; border-color: #7a3fa0; }
  .eintrag.wer-J { background: #80502a; }
  .todo.wer-J { background: #fff; border-color: #80502a; }
  .eintrag.wer-P { background: #383e42; }
  .todo.wer-P { background: #fff; border-color: #383e42; }
  #offline { bottom: 56px; right: 0; }
  .dialog form { margin: 0 auto; border-radius: 0 0 10px 10px; }
}

/* Seitenmenue: Darstellung */
.darstellung { padding: 18px 20px; }
.darstellung p { margin: 0 0 8px; font-size: 14px; color: #566865; }
.darstellung button { width: 33.33%; height: 40px; padding: 0; border-radius: 0; background: #d9e5e1; font-size: 15px; }
.darstellung button:first-of-type { border-radius: 6px 0 0 6px; }
.darstellung button:last-of-type { border-radius: 0 6px 6px 0; }
.darstellung .klein { margin: 8px 0 0; }


/* Dunkel: steht am Ende, damit es alles oben ueberschreibt */
.dunkel { color-scheme: dark; }
.dunkel body { color: #e3eae8; background-color: #0e1615; }
.dunkel body:before { content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.45); }
.dunkel .bereich { background: #1a2322; background: rgba(22,30,29,.9); }
.dunkel input, .dunkel select { background: #222d2b; border-color: #46534f; color: #e3eae8; }
.dunkel .leise, .dunkel .dialog a, .dunkel #dialog-menue .schliessen { color: #5fc0a6; }
.dunkel button:focus, .dunkel input:focus, .dunkel select:focus, .dunkel a:focus { outline-color: #5fc0a6; }
.dunkel #wochentage span, .dunkel .zelle .mehr, .dunkel .wtermin .uhr, .dunkel .zusatz, .dunkel .zeit, .dunkel .leer,
.dunkel .dialog label, .dunkel .klein, .dunkel .wahl p, .dunkel .darstellung p, .dunkel .erledigt .text { color: #9fb0ab; }
.dunkel .fremd .nr { color: #75847f; }
.dunkel #monat, .dunkel .zelle, .dunkel .spalte { border-color: #33403d; }
.dunkel .zeile { border-color: #2a3533; }
.dunkel .eintrag, .dunkel .wtermin { border-left-color: #5fc0a6; }
.dunkel .todo { border-left: 0; }
.dunkel .frei { background: #4a2d23; }
.dunkel .festname { color: #f2916f; }
.dunkel .gewaehlt, .dunkel .jahrmonat .etwas { background: #1f4a40; }
.dunkel #ansichten, .dunkel #haeufig button, .dunkel .darstellung button { background: #2a3735; }
.dunkel #ansichten .stark, .dunkel .darstellung .stark { background: #1b6b5a; }
.dunkel .zeile .stift { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M3 17l1-4L14 3l3 3L7 16z M12 5l3 3' fill='none' stroke='%235fc0a6' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dunkel #menue { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M2 5h18M2 11h18M2 17h18' fill='none' stroke='%235fc0a6' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.dunkel .kreis { border-color: #5fc0a6; color: #10201c; }
.dunkel .erledigt .kreis { background: #5fc0a6; }
.dunkel .spaet, .dunkel .dialog .fehler, .dunkel .knoepfe .loeschen { color: #ff8a65; }
.dunkel .dialog { background: rgba(0,0,0,.6); }
.dunkel .dialog form { background: #1c2524; }
.dunkel .dialog label input, .dunkel .dialog label select { color: #e3eae8; }
.dunkel .wahl button { border-color: #46534f; }
.dunkel .ort { opacity: .8; }
.dunkel .fahrt { color: #5fc0a6; }
.dunkel .fahrt.stau, .dunkel .fahrt.spaet { color: #ff8a65; }
.dunkel .wer-F { border-color: #a46fd0; background: #3b2848; }
.dunkel .balken.wer-F, .dunkel .marke.wer-F, .dunkel .wtermin.lang.wer-F { background: #a46fd0; }
.dunkel .wer-J { border-color: #b98353; background: #40301f; }
.dunkel .balken.wer-J, .dunkel .marke.wer-J, .dunkel .wtermin.lang.wer-J { background: #b98353; }
.dunkel .wer-P { border-color: #6b757b; background: #30363a; }
.dunkel .balken.wer-P, .dunkel .marke.wer-P, .dunkel .wtermin.lang.wer-P { background: #6b757b; }
@media (max-width: 599px), (max-height: 500px) {
  .dunkel #reiter { background: #1c2524; }
  .dunkel .eintrag { background: #5fc0a6; }
  .dunkel .todo { border-color: #5fc0a6; background: #1c2524; }
  .dunkel .balken { background: #1b6b5a; }
  .dunkel .eintrag.wer-F { background: #a46fd0; }
  .dunkel .todo.wer-F { background: #1c2524; border-color: #a46fd0; }
  .dunkel .eintrag.wer-J { background: #b98353; }
  .dunkel .todo.wer-J { background: #1c2524; border-color: #b98353; }
  .dunkel .eintrag.wer-P { background: #6b757b; }
  .dunkel .todo.wer-P { background: #1c2524; border-color: #6b757b; }
}
