/* ============================================================================
   Home page.

   The page's problem was never how much it carried; it was that every piece
   arrived in the same weight, on a painted background nobody could see, under
   four patch notes printed in full. So: the plate shows, the news folds, the
   entries that have a poster ARE the poster, and everything that belonged to
   another tab went back to it.

   The layout is a page from a book — a narrow measure, real typographic
   hierarchy, rules instead of borders — chosen over an art-forward version and
   a card grid.
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   LAYOUT — no cards, a narrow measure, rules instead of borders.
   ══════════════════════════════════════════════════════════════════════════ */
#panelHome .home-content {
  max-width: 720px;
  padding: 34px 22px 80px;
}
#panelHome .home-bg { opacity: 0.5; }

#panelHome .home-greet {
  gap: 16px;
  padding: 0 0 20px;
  background: none;
  border-left: 0;
  border-radius: 0;
  /* A double rule: the one piece of ornament on the page, so it means something. */
  border-bottom: 3px double rgba(200, 168, 78, 0.35);
  margin-bottom: 8px;
}
#panelHome .home-greet-av {
  width: 64px !important; height: 64px !important; min-width: 64px;
  border-radius: 50% !important;
  box-shadow: 0 0 0 1px rgba(200, 168, 78, 0.5);
}
#panelHome .home-greet-hi {
  font-size: 9px; letter-spacing: 0.5em; color: rgba(200, 168, 78, 0.6);
}
#panelHome .home-greet-nm {
  font-family: Cinzel, serif; font-size: 34px; line-height: 1.05;
  letter-spacing: 0.03em;
}
#panelHome .home-greet-meta {
  font-size: 11px; letter-spacing: 0.06em; color: rgba(214, 200, 240, 0.65);
}

/* Section titles become chapter marks: centred, spaced, flanked by rules. */
#panelHome .home-st {
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.4em;
  font-size: 10px;
  color: rgba(200, 168, 78, 0.7);
  margin: 38px 0 18px;
}
#panelHome .home-st::before,
#panelHome .home-st::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.3), transparent);
}

/* Newsy tekstowe: caly wyglad przeniesiony do style.css (sekcja
   „NEWSY NA HOME — depesza, nie kafel", 07.09.2026). Stad znikly
   reguly karty, tytulu, daty, skrotu i tresci — zostawaly w kaskadzie
   PO style.css i cofaly nowy stopien pisma oraz szerokosc kolumny.
   Jeden wyglad w jednym miejscu. */

#panelHome .home-kw {
  background: rgba(12, 8, 22, 0.5);
  border: 1px solid rgba(200, 168, 78, 0.16);
  border-radius: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Folded news — shared by all three, because it is a fix and not a taste.
   ══════════════════════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════════════════════
   NEWS COVERS — shared by all three, because it is the fix, not the taste.

   The old card announced a picture with an outlined button. This is the
   picture: the poster's own top band, headline already drawn into it, so the
   card says the thing instead of describing it. Nothing else on the tile
   competes — a category, a line of summary and a date, all in one quiet strip
   under the image.
   ══════════════════════════════════════════════════════════════════════════ */
#panelHome .home-news-cover {
  display: block;
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(14, 9, 26, 0.75);
  border: 1px solid rgba(160, 120, 220, 0.2);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
  transition: transform 0.18s ease, border-color 0.18s, box-shadow 0.18s;
}
#panelHome .home-news-cover:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 201, 84, 0.42);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.9), 0 0 30px -14px rgba(255, 201, 84, 0.5);
}
#panelHome .home-news-cover-img {
  position: relative;
  /* The band is drawn at 720x282-372; letting it letterbox rather than crop
     keeps whichever headline the poster put there. */
  line-height: 0;
}
#panelHome .home-news-cover-img img {
  width: 100%; height: auto; display: block;
}
/* The image ends in whatever the poster's background is; this fades it into the
   footer so the two do not meet at a hard line. */
#panelHome .home-news-cover-img::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42px;
  background: linear-gradient(180deg, transparent, rgba(14, 9, 26, 0.75));
  pointer-events: none;
}
#panelHome .home-news-cover-foot {
  display: flex; align-items: baseline; gap: 9px;
  padding: 10px 14px 12px;
}
#panelHome .home-news-cover-cat {
  flex-shrink: 0;
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: #ffc954;
}
#panelHome .home-news-cover-sum {
  flex: 1; min-width: 0;
  font-size: 11.5px; line-height: 1.45; color: rgba(200, 188, 225, 0.75);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
#panelHome .home-news-cover-date {
  flex-shrink: 0;
  font-family: Consolas, ui-monospace, monospace;
  font-size: 9.5px; color: rgba(190, 175, 225, 0.4);
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO PLATE — the greeting sits on the painting instead of a flat bar.
   ══════════════════════════════════════════════════════════════════════════ */
#panelHome .home-greet {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
#panelHome .home-greet::before {
  content: '';
  position: absolute; inset: 0; z-index: -2;
  /* Framed on the sky, not the castle: at 38% the towers landed directly
     behind the player's name and the two fought each other. */
  background: url('../img/home/hero-plate.webp') center 16% / cover no-repeat;
  opacity: 0.5;
}
/* A scrim, because a name has to stay readable over a painting. */
#panelHome .home-greet::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 6, 20, 0.88), rgba(10, 6, 20, 0.35) 70%, rgba(10, 6, 20, 0.7));
}
#panelHome .home-greet {
  padding: 20px 18px;
  border-radius: 10px;
  border-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   ARCHIVE — one line at the foot of the list, and the index it opens.

   The news list only grows. Ten entries is a screenful of recent releases; the
   rest is a year of patch notes that nobody scrolls to and everybody scrolls
   past. It goes behind a control that says how much is back there, so the page
   stops getting longer every release.
   ══════════════════════════════════════════════════════════════════════════ */
#panelHome .home-news-archive {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin: 22px 0 0; padding: 13px 16px;
  font-family: Cinzel, serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(200, 168, 78, 0.75);
  background: none;
  border: 0;
  border-top: 1px solid rgba(200, 168, 78, 0.16);
  border-bottom: 1px solid rgba(200, 168, 78, 0.16);
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
#panelHome .home-news-archive:hover {
  color: #ffd98a;
  border-color: rgba(255, 201, 84, 0.4);
  background: rgba(255, 201, 84, 0.04);
}
#panelHome .home-news-archive-n {
  font-family: Consolas, ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0;
  padding: 2px 7px; border-radius: 20px;
  color: rgba(230, 214, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
}

/* The archive itself. Plainer than the page it came from on purpose: you are
   here to find one release, not to browse. */
.nar-wrap { padding: 4px 2px 2px; }
.nar-hd {
  font-family: Cinzel, serif;
  font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase;
  color: #e8dcc4; text-align: center;
  padding-bottom: 14px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(200, 168, 78, 0.2);
}
.nar-list { max-height: 62vh; overflow-y: auto; scrollbar-width: thin; }
.nar-row {
  padding: 12px 4px;
  border-bottom: 1px solid rgba(200, 168, 78, 0.1);
  cursor: pointer;
}
.nar-row:last-child { border-bottom: 0; }
.nar-row:hover .nar-title { color: #fff6e2; }
.nar-row-top { display: flex; align-items: baseline; gap: 10px; }
.nar-date {
  flex-shrink: 0;
  font-family: Consolas, ui-monospace, monospace;
  font-size: 10px; color: rgba(190, 175, 225, 0.42);
}
.nar-cat {
  flex-shrink: 0;
  font-size: 8px; font-weight: 800; letter-spacing: 0.14em;
  padding: 2px 6px; border-radius: 4px;
  color: #ffc954; background: rgba(255, 201, 84, 0.1);
}
.nar-cat-event { color: #ff6b81; background: rgba(255, 107, 129, 0.1); }
.nar-cat-community { color: #bf5fff; background: rgba(191, 95, 255, 0.1); }
.nar-cat-update { color: #4fd8c4; background: rgba(79, 216, 196, 0.1); }
.nar-title {
  flex: 1; min-width: 0;
  font-family: Cinzel, serif; font-size: 14px; line-height: 1.3;
  color: #cbbfe0;
  transition: color 0.15s;
}
.nar-go { flex-shrink: 0; color: rgba(190, 175, 225, 0.35); font-size: 13px; }
.nar-sum {
  font-size: 12px; line-height: 1.55; margin-top: 5px;
  color: rgba(190, 175, 225, 0.6);
}
/* Bodies stay shut until the row is pressed — the whole point of an index. */
.nar-body { display: none; }
.nar-row.is-open .nar-body {
  display: block;
  font-size: 12.5px; line-height: 1.7; margin-top: 10px;
  color: rgba(205, 193, 230, 0.8);
  white-space: pre-wrap;
  border-left: 2px solid rgba(200, 168, 78, 0.2);
  padding-left: 13px;
}

/* Archiwum newsow: tresc idzie teraz akapitami (_newsProse w ui.js),
   wiec <p> potrzebuje odstepu, a `pre-wrap` nie ma juz czego zawijac —
   puste wiersze sa akapitami, nie bialymi znakami. Kolumna do czytania
   tak samo waska jak na Home. */
.nar-sum p, .nar-row.is-open .nar-body p { margin: 0 0 .85em; max-width: 62ch; }
.nar-sum p:last-child, .nar-row.is-open .nar-body p:last-child { margin-bottom: 0; }
.nar-row.is-open .nar-body { white-space: normal; }

/* ══════════════════════════════════════════════════════════════
   TLO POD TEKSTEM  (07.09.2026)

   Mark: „tlo tez brzydkie jakosciowo widac pixele". Dwie osobne
   sprawy i obie trzeba zalatwic:

   1. JAKOSC — img/home/bg.webp ma 1472x832 i jest rozciagane na cala
      szerokosc okna. Na monitorze 2560 px to skala 1,7x, stad widac
      piksele. Nowa grafika idzie osobno (prompty w notatkach).
   2. CZYTELNOSC — nawet ladne tlo przeszkadza, gdy jasny ksiezyc
      wypada dokladnie za akapitem. Kolumna tekstu dostaje wiec
      wlasna ciemna podklade: pionowy pas, ktory po bokach schodzi
      do zera. Bez krawedzi i bez ramki — to nie jest pudelko,
      tylko cien, w ktorym stoi tekst. Grafika zostaje widoczna tam,
      gdzie jest najladniejsza, czyli przy brzegach ekranu.

      Po podmianie tla pas zostal mocno sciszony (z 0,84 na 0,32):
      srodek nowej grafiki ma jasnosc 9/255, wiec tekst i tak stoi na
      czerni, a mocna zaslona robila z tla plaska plame. */
#panelHome > .home-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(7, 3, 18, 0.14) 9%,
    rgba(7, 3, 18, 0.30) 24%,
    rgba(7, 3, 18, 0.32) 76%,
    rgba(7, 3, 18, 0.14) 91%,
    transparent 100%);
}
/* Na telefonie tresc zajmuje cala szerokosc, wiec pas nie ma gdzie
   wygasnac po bokach — gasnie u gory i u dolu. */
@media (max-width: 720px) {
  #panelHome > .home-content {
    background: linear-gradient(180deg,
      rgba(7, 3, 18, 0.20) 0%,
      rgba(7, 3, 18, 0.42) 8%,
      rgba(7, 3, 18, 0.42) 92%,
      rgba(7, 3, 18, 0.25) 100%);
  }
}
