/* Startseite: Leiste „Weitere Welten & Academy" – 21.11.2026
 *
 * Vorher vier Kacheln nebeneinander mit breitgezogenen Bildern. Das hatte drei
 * Probleme: bei 375 px blieben je 76 px pro Kachel, Namen und Status wurden
 * abgeschnitten; die Bilder sind nur 340 x 156 px groß und wurden beim
 * Hochskalieren matschig; und der Schwebe-Effekt hob jede Kachel auf eine
 * eigene Zeichenebene.
 *
 * Jetzt eine Liste: kleines Vorschaubild (84 x 56), daneben Name und Status.
 * In dieser Größe sind die Bilder auch auf einem scharfen Display wirklich
 * scharf, statt vergrößert und matschig.
 *
 * Die Bilddateien selbst waren Bildschirmfotos der eigenen Startseite: oben
 * steckte ein Stück der Überschrift „Weitere Welten & Academy" mit drin, dazu
 * Kartenrand und ein Zipfel der Nachbarkachel. Das waren die abgeschnittenen
 * Reste über den Bildern. Die Dateien sind jetzt auf das Motiv freigestellt.
 */

/* 1 – Kopfzeile */
#homeView .hub-explore {
  padding: var(--ds-space-4) var(--ds-space-3) var(--ds-space-2);
}
#homeView .hub-explore-title {
  display: block;
  margin: 0 var(--ds-space-1) var(--ds-space-3);
}
#homeView .hub-explore-title h2 {
  font-size: clamp(16px, 4.4vw, 19px);
  line-height: 1.25;
  margin: 0;
}
#homeView .hub-explore-title p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

/* 2 – Aus dem Raster wird eine Liste */
#homeView .hub-world-grid {
  display: block;
  gap: 0;
}

/* 3 – Eine Zeile: Bild links, Name und Status rechts */
#homeView .hub-world {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: var(--ds-space-3);
  align-content: center;
  width: 100%;
  margin: 0;
  padding: var(--ds-space-3) var(--ds-space-2);
  border: 0;
  border-top: 1px solid var(--ds-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  overflow: visible;
}
#homeView .hub-world:first-child { border-top: 0; }

#homeView .hub-world img {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  width: 84px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: var(--ds-surface-sunken);
  box-shadow: 0 1px 3px rgba(30, 24, 10, .16);
}
/* Jedes Bild auf sein Motiv ausrichten, damit der Ausschnitt sitzt. */
#homeView .hub-world img[src*="animal"]   { object-position: 22% 50%; }
#homeView .hub-world img[src*="mushroom"] { object-position: 58% 50%; }
#homeView .hub-world img[src*="tree"]     { object-position: 58% 50%; }
#homeView .hub-world img[src*="academy"]  { object-position: 100% 50%; }

#homeView .hub-world-name {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}
#homeView .hub-world-status {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
}
#homeView .hub-available { color: var(--ds-brand); }
#homeView .hub-future { color: var(--ds-ink-muted); }
#homeView .hub-available b { padding-left: 6px; font-weight: 800; }

/* 4 – Antippbare Zeilen: kein Schweben, nur eine ruhige Fläche. */
#homeView button.hub-world { cursor: pointer; transition: background .12s; }
#homeView button.hub-world:hover,
#homeView button.hub-world:active { transform: none; box-shadow: none; background: #ffffff5c; }
#homeView button.hub-world:focus-visible { border-radius: var(--ds-radius-control); }

/* 5 – Auf breiten Fenstern zwei Zeilen nebeneinander, damit die Leiste
   nicht unnötig in die Länge geht. */
@media (min-width: 720px) {
  #homeView .hub-world-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--ds-space-5);
  }
  #homeView .hub-world:nth-child(2) { border-top: 0; }
}

/* 6 – Dunkelmodus: die Trennlinien und Farben kommen aus den Grundwerten. */
body.n30-dark.hub-on-home #homeView .hub-world {
  background: transparent;
  border-top-color: #3c5444;
  color: var(--ds-ink);
}
body.n30-dark.hub-on-home #homeView .hub-world:first-child { border-top: 0; }
body.n30-dark.hub-on-home #homeView .hub-available { background: none; color: #8fd6a4; }
body.n30-dark.hub-on-home #homeView .hub-future { background: none; color: #a8b8ac; }
body.n30-dark.hub-on-home #homeView button.hub-world:hover,
body.n30-dark.hub-on-home #homeView button.hub-world:active { background: #ffffff14; }

/* ======================================================================
   Startseite auf einen Blick – 21.11.2026
   Alles soll ohne Scrollen sichtbar sein. Die Abstände wachsen mit der
   Bildschirmhöhe (vh), damit es auf großen Geräten nicht gedrängt wirkt
   und auf kleinen trotzdem passt.
   ====================================================================== */
@media (max-width: 650px) {
  /* Die Startseite war auf volle Bildschirmhöhe gesetzt – zusätzlich zur
     Kopfleiste darüber. Dadurch liess sich die Seite immer um genau deren
     Höhe scrollen, auch wenn der Inhalt längst hineinpasste. */
  #homeView.view { min-height: calc(100vh - 64px); }
  @supports (height: 100dvh) {
    #homeView.view { min-height: calc(100dvh - 64px); }
  }
  #homeView.view { padding-bottom: 8px; }
  #homeView .hub-shell { padding-top: clamp(6px, 1vh, 14px); }

  #homeView .hub-brand { padding: clamp(8px, 1.6vh, 26px) 0 clamp(6px, 1vh, 14px); }
  #homeView .hub-brand h1 { font-size: clamp(23px, 5.6vw, 32px); }
  #homeView .hub-brand p { font-size: 11.5px; }

  #homeView .n35-logged-hub {
    margin: clamp(6px, 1.1vh, 14px) 0;
    padding: clamp(10px, 1.6vh, 18px);
  }
  #homeView .nds-home-status { margin-bottom: clamp(6px, 1vh, 12px); }
  #homeView .n35-logged-hub > h2 {
    margin: clamp(4px, .7vh, 8px) 0 clamp(6px, 1vh, 12px);
    font-size: clamp(17px, 4.6vw, 22px);
    line-height: 1.2;
  }
  #homeView .n35-hub-actions { gap: var(--ds-space-2); }
  #homeView .n35-hub-actions button { min-height: 46px; padding: 10px 8px; }

  #homeView .hub-card { margin: clamp(6px, 1vh, 12px) auto clamp(8px, 1.2vh, 16px); padding: 8px 8px 6px; }
  #homeView .hub-explore { padding: clamp(10px, 1.4vh, 16px) var(--ds-space-3) var(--ds-space-1); }
  #homeView .hub-explore-title { margin-bottom: clamp(6px, 1vh, 12px); }
  #homeView .hub-world { padding: clamp(7px, 1.1vh, 12px) var(--ds-space-2); }

  /* Die Zeile „NatureDex Universe · Closed Alpha" steht schon im Kopf der
     Seite – unten kostet sie nur Platz. */
  #homeView .hub-footer { display: none; }

  #homeView ~ .ndx-legal-home,
  .ndx-legal-home { margin-top: clamp(4px, .8vh, 12px); padding-bottom: 74px; }
  .ndx-legal-home a { padding: 4px 6px; font-size: 12.5px; }
}

/* Kleine Geräte: Untertitel und Vorschaubilder etwas zurücknehmen, damit
   die Startseite auch auf kurzen Bildschirmen ohne Scrollen passt.
   Auf großen Telefonen bleibt alles wie oben. */
@media (max-width: 650px) and (max-height: 1000px) {
  #homeView .hub-brand p,
  #homeView .hub-explore-title p { display: none; }
  #homeView .hub-world { grid-template-columns: 72px minmax(0, 1fr); }
  #homeView .hub-world img { width: 72px; height: 48px; }
  #homeView .n35-hub-actions button { min-height: 44px; }

  /* Die drei Zahlen passen in eine Zeile, statt in zwei umzubrechen. */
  #homeView .nds-chips { gap: 5px; }
  #homeView .nds-chips > span {
    min-width: 0;
    padding: 4px 8px;
    font-size: 11.5px;
    white-space: nowrap;
  }
  #homeView .hub-world { padding: clamp(6px, .9vh, 10px) var(--ds-space-2); }
  .ndx-legal-home { padding-bottom: 68px; }
}
