/*
 * Startseite (Joy, 15.11.2026, gekuerzt am 16.11.2026), Gestaltung
 * "Tageslicht" wie seite.css. Handy: alles untereinander und knapp, Stand
 * und eigene Buchungen ohne Scrollen zu sehen. Rechner: zwei Spalten fuer
 * die Buchungen, "Fuer Freunde" rechts daneben.
 */

/* Ueberschrift nur fuer Vorleseprogramme, sichtbar steht keine Kopfzeile. */
.start-unsichtbar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.start-stand {
  font-size: 1.05rem;
  line-height: 1.35;
}

/* Kurzes Datum dezent hinter dem beschriebenen Tag: "kommenden Freitag (20.11.)". */
.start-tag {
  white-space: nowrap;
}

.start-kurz {
  color: var(--grau);
  font-size: 0.8em;
  white-space: nowrap;
}

/*
 * Foto des Tages hinter dem Stand (Joy, 16.11.2026): Foto fuellt den Kasten,
 * der Stand steht unten weiss auf einem dunklen Verlauf. Unter der Schrift
 * ist der Verlauf mindestens 72 % schwarz, so bleibt sie auch auf hellen
 * Fotos lesbar (weiss auf 72 % schwarz ueber weiss: etwa 9:1). Der ganze
 * Kasten oeffnet das Foto, der Text laesst das Tippen durch.
 */
.start-stand-foto {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 12rem;
  padding: 0;
  overflow: hidden;
  background: #3b3934;
  color: #fff;
}

.start-foto {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
}

.start-foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.start-foto:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
}

.start-foto-quelle {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  max-width: 70%;
  padding: 0.05rem 0.45rem;
  overflow: hidden;
  border-radius: 1rem;
  /* Leicht dunkles Feld: auch auf hellem Himmel mindestens 4.5:1. */
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-stand-text {
  position: relative;
  margin: 0;
  padding: 2.75rem 0.85rem 0.65rem;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.72) 2.4rem
  );
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.start-stand-foto .start-kurz {
  color: rgba(255, 255, 255, 0.85);
}

.start-block h2 {
  margin: 0.9rem 0 0.2rem;
  font-size: 1.05rem;
}

/* Listen: Haarlinien, jede Zeile ganz antippbar. */
.start-liste {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--linie);
}

.start-liste li {
  border-top: 1px solid var(--linie);
}

.start-liste a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0;
  color: var(--schrift);
  text-decoration: none;
}

.start-liste a:hover .zeitraum,
.start-liste a:hover .titel {
  text-decoration: underline;
}

/* Zeitraum bricht vor "bis" um, nie mitten im Datum. */
.start-liste .von,
.start-liste .bis {
  white-space: nowrap;
}

.start-meine .start-liste a {
  justify-content: space-between;
}

.start-meine .zeitraum {
  flex: 1 1 12rem;
}

/* Eigene Buchung: oben beschreibend, darunter das Datum dezent. */
.start-meine .start-beschrieben {
  display: block;
}

.start-meine .start-datum {
  display: block;
  color: var(--grau);
  font-size: 0.9em;
}

.start-liste .dauer {
  flex: none;
  color: var(--grau);
}

.start-aufgaben .start-liste a {
  column-gap: 0.4rem;
}

/* Zuletzt eingetragen: je Buchung eine kleine Zeile. */
.start-kurzliste a {
  flex-wrap: nowrap;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0.2rem 0;
  font-size: 0.9rem;
  white-space: nowrap;
}

.start-kurzliste strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-kurzliste .zeitraum {
  color: var(--grau);
}

.start-leer,
.start-zahl {
  margin: 0.2rem 0 0.35rem;
  color: var(--grau);
}

.start-zahl {
  font-size: 0.9rem;
}

.start-aktion {
  margin: 0.5rem 0 0;
}

.start-mehr {
  margin: 0;
}

.start-mehr a {
  display: inline-block;
  padding: 0.5rem 0;
}

/* Kasten "Fuer Freunde" auf heller Flaeche */
.start-freunde {
  margin-top: 1rem;
  padding: 0.1rem 0.85rem 0.5rem;
  border-radius: 0.6rem;
  background: var(--flaeche);
}

.start-freunde h2 {
  margin-top: 0.6rem;
}

.start-freunde p {
  margin: 0.35rem 0;
}

.start-freunde label {
  margin-top: 0.5rem;
}

.start-freunde input {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.start-passwort strong {
  font-size: 1.1rem;
}

/* WhatsApp-Link und Teilen-Knopf untereinander, je ueber die ganze Breite. */
.start-teilen {
  display: grid;
  gap: 0.5rem;
}

.start-teilen .knopf,
.start-teilen button {
  margin: 0;
}

.start-teilen .start-whatsapp {
  fill: #25d366;
  stroke: none;
}

/* Rechner: Stand ueber die ganze Breite, rechts "Fuer Freunde". */
@media (min-width: 56rem) {
  main:has(> .startseite) {
    max-width: 62rem;
  }

  .startseite {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(18rem, 22rem);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "stand stand rechts"
      "meine andere rechts"
      "aufgaben aufgaben rechts";
    align-items: start;
    column-gap: 2.5rem;
  }

  .start-stand {
    grid-area: stand;
    padding: 0.85rem 1.1rem;
    font-size: 1.35rem;
  }

  /* Am Rechner wirkt das Foto gross und breit. */
  .start-stand.start-stand-foto {
    min-height: 20rem;
    padding: 0;
  }

  .start-stand-foto .start-stand-text {
    padding: 3.5rem 1.1rem 0.85rem;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 0.72) 3rem
    );
  }

  .start-foto-quelle {
    top: 0.6rem;
    right: 0.8rem;
    font-size: 0.8rem;
  }

  .start-meine {
    grid-area: meine;
  }

  .start-andere {
    grid-area: andere;
  }

  .start-aufgaben {
    grid-area: aufgaben;
  }

  .start-rechts {
    grid-area: rechts;
  }
}

.start-teilen .start-signal {
  fill: #3a76f0;
}

.start-teilen-hinweis {
  display: block;
  color: var(--grau);
  font-size: 0.85em;
}

/* Kopf mit Logo, nur auf dem Handy. Am Rechner zeigt die Leiste oben das Logo. */
.start-kopf {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.25rem 0 1rem;
}

.start-kopf img {
  width: 3.2rem;
  height: 3.2rem;
}

.start-kopf h1 {
  display: grid;
  margin: 0;
  line-height: 1.15;
}

.start-name {
  font-size: 1.3rem;
}

.start-zusatz {
  color: var(--grau);
  font-size: 1rem;
  font-weight: 400;
}

@media (min-width: 56rem) {
  .start-kopf {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
