/* Spolecny vzhled weboveho archivu Narsil. */
:root {
  color-scheme: dark;
  background: #000;
  color: #fff;
}

html, body {
  background: #000;
  color: #fff;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  line-height: 1.5;
}

a,
a:visited {
  color: #fff;
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

a:hover,
a:focus {
  opacity: .78;
}

/* Index cisla */
h1 { margin-bottom: .25rem; }
.subtitle { margin-top: 0; opacity: .7; }
section { margin: 2rem 0; }
h2 {
  font-size: 1.2rem;
  margin-bottom: .6rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: .25rem;
}
ul.contents { list-style: none; margin: 0; padding: 0; }
ul.contents li { margin: .32rem 0; padding-left: 2.8rem; position: relative; }
.key {
  position: absolute;
  left: 0;
  width: 2.2rem;
  text-align: right;
  opacity: .55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.continuation { display: block; font-size: .92em; opacity: .75; }
.missing { opacity: .55; }
/* Puvodni text a grafika za seznamem obsahu. */
.index-tail { margin-top: 2.5rem; }
.index-tail p { margin: .7rem 0; }
.index-tail-images { margin-top: 1rem; }
.index-tail-images::after { content: ""; display: block; clear: both; }
.index-image { display: inline-block; vertical-align: top; margin: 1em .5rem; }
.generated { margin-top: 3rem; font-size: .85rem; opacity: .55; }


.issue-cover { margin: 1.25rem 0 2rem; }
.issue-cover img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.back-to-index { margin: 0 0 1.5rem; font-size: .92rem; }
.animation-view { margin: 1.5rem 0; }
.animation-view img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.asset-links { margin-top: 1.25rem; font-size: .92rem; opacity: .8; }

/* Clanky */
article::after { content: ""; display: block; clear: both; }
p { margin: 0 0 1em; }

/* Pevne formatovane tabulky a textove layouty z puvodniho Narsilu. */
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
  line-height: 1.25;
  margin: 0 0 1em;
}

.paragraph-with-image { display: flow-root; }
.narsil-image {
  image-rendering: pixelated;
  max-width: 100%;
  height: auto;
}
.float-left { float: left; margin: .2em 1em .7em 0; }
.float-right { float: right; margin: .2em 0 .7em 1em; }
.image-block,
.image-full,
.image-center {
  display: inline-block;
  clear: none;
  vertical-align: top;
  margin: 1em .5rem;
}

/* Záhlaví stránky ------------------------------------------------------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 0 0 1.5rem;
  padding: 0 0 .85rem;
  border-bottom: 1px solid rgba(255, 255, 255, .42);
}

.page-header-text {
  min-width: 0;
}

.page-kicker {
  margin: 0 0 .18rem;
  font-size: .88rem;
  line-height: 1.25;
  opacity: .62;
}

.page-header h1 {
  margin: 0;
  line-height: 1.15;
}

.page-up-link,
.page-up-link:visited {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: .3rem;
  background: rgba(255, 255, 255, .06);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.page-up-link:hover,
.page-up-link:focus {
  background: rgba(255, 255, 255, .12);
  opacity: 1;
}

/* Patička stránky ------------------------------------------------------- */
.page-footer {
  clear: both;
  margin: 3rem 0 0;
  padding: .85rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, .42);
  font-size: .82rem;
  line-height: 1.4;
  text-align: center;
  opacity: .52;
}

/* Hlavní index archivu -------------------------------------------------- */
.main-page-header {
  margin-bottom: 1.75rem;
}

.archive-issue-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
}

.archive-issue,
.archive-issue:visited {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  text-decoration: none;
}

.archive-issue:hover,
.archive-issue:focus {
  opacity: 1;
  background: rgba(255, 255, 255, .045);
}

.archive-issue-cover {
  display: block;
  flex: 0 0 160px;
  width: 160px;
  height: 100px;
  object-fit: contain;
  background: #000;
  image-rendering: pixelated;
}

.archive-issue-title {
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

@media (max-width: 700px) {
  .archive-issue-list {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
}


/* Hudba čísla: normální stránky + samostatné popup okno ---------------- */
.issue-layout { min-width: 0; }
#narsil-content { min-width: 0; }

/* Kompaktní horní blok indexu čísla: screenshot vlevo, hudba vpravo. */
.narsil-issue-top {
  display: flow-root;
  width: 100%;
  margin: 1.25rem 0 1.5rem;
}

.narsil-issue-shot {
  float: left;
  margin: 0 1.5rem 0 0;
}
.narsil-issue-shot img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.narsil-music-launcher {
  float: right;
  width: 19rem;
  box-sizing: border-box;
  margin: 0 0 0 1.5rem;
  padding: .8rem .9rem;
  border: 1px solid #777;
  background: #090909;
}
.mod-player-head { font-weight: bold; margin-bottom: .55rem; }
.mod-title-list { margin: .35rem 0 .8rem; padding-left: 1.2rem; }
.mod-title-list li { margin: .22rem 0; }
.music-open-button,
.page-music-link {
  color: inherit;
  background: transparent;
  border: 1px solid #777;
  font: inherit;
  cursor: pointer;
}
.music-open-button { width: 100%; padding: .38rem .55rem; }
.music-open-button:hover,
.music-open-button:focus,
.page-music-link:hover,
.page-music-link:focus { border-color: currentColor; }
.music-popup-note { margin-top: .7rem; font-size: .78em; line-height: 1.35; opacity: .65; }
.music-popup-status { margin-top: .5rem; font-size: .78em; line-height: 1.35; opacity: .8; }

.page-header-actions {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  flex: 0 0 auto;
}
.page-music-link {
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border-radius: .4rem;
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 700px) {
  .narsil-issue-top {
    margin-top: 1rem;
  }
  .narsil-issue-shot,
  .narsil-music-launcher {
    float: none;
    width: auto;
    margin: 0 0 1rem 0;
  }
}
