/* Grundlayout */
body {
  margin: 0;
  background: #cfcac7;
  color: #2a1b18;
  font-family: system-ui, sans-serif;
}

/* zentrale Begrenzung */
.wrapper {
  max-width: 1500px;
  margin: 0 auto;
}

/* Desktop Layout */
.layout {
  --nav-width: 220px;
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  align-items: start;
  transition: grid-template-columns .22s ease;
}

body.nav-collapsed .layout {
  --nav-width: 64px;
}

/* Header / Banner */
.site-header {
  max-width: 1472px;
  margin: 22px auto 20px auto;
}

.site-header img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2171 / 196;
  display: block;
  margin: 0 auto;
  opacity: 0.90;
  box-shadow: 6px 10px 24px rgba(0, 0, 0, 0.42);
}

                       /* Themenabhängige Banner-Overlays */
.site-header--lesen {
  position: relative;
  overflow: hidden;
}
.site-header--lesen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../bilder/andere/book_gr.jpg") center center / cover no-repeat;
  background-position-y: 70%;
  opacity: 0.24;
  pointer-events: none;
}

.site-header--geheimdienst {
  position: relative;
  overflow: hidden;
}

.site-header--geheimdienst::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../bilder/andere/buchcover_2048x1536.jpg") center center / cover no-repeat;
  background-position-y: 45%;
  opacity: 0.25;
  pointer-events: none;
}

.site-header--diy {
  position: relative;
  overflow: hidden;
}

.site-header--diy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../bilder/andere/diy_theme.png") center center / cover no-repeat;
  background-position-y: 48%;
  opacity: 0.22;
  pointer-events: none;
}

.site-header--landschaften {
  position: relative;
  overflow: hidden;
}
.site-header--landschaften::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../bilder/fotos/germania_rhein_gr.jpg") center center / cover no-repeat;
  background-position-y: 50%;
  opacity: 0.30;
  pointer-events: none;
}

.site-header--essen {
  position: relative;
  overflow: hidden;
}

.site-header--essen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../bilder/essen/zwei_fisch_gr.jpg") center center / cover no-repeat;
  background-position-y: 28%;
  opacity: 0.25;
  pointer-events: none;
}

.site-header--grafiken {
  position: relative;
  overflow: hidden;
}

.site-header--old-times {
  position: relative;
  overflow: hidden;
}

.site-header--old-times::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../bilder/andere/videorekorder_gr.jpg") center center / cover no-repeat;
  background-position-y: 50%;
  opacity: 0.23;
  pointer-events: none;
}

.site-header--grafiken::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../bilder/andere/auge.png") center center / cover no-repeat;
  background-position-y: 45%;
  opacity: 0.20;
  pointer-events: none;
}


            /* Navigation */
.site-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  height: 32px;
  margin: 8px 0 4px;
  padding: 0 9px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #dcd9d7;
  color: #6B140D;
  font-family: inherit;
  cursor: pointer;
}

.nav-toggle:hover {
  background: #e6e3e1;
}

.nav-toggle-label {
  font-size: 11px;
}

.nav-toggle-icon {
  display: none;
  position: relative;
  top: 5px;
  font-size: 24px;
  line-height: 1;
  transition: transform .22s ease;
}

body.nav-collapsed .nav-toggle-icon {
  display: block;
  transform: rotate(180deg);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #6B140D;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  background: linear-gradient(145deg, #e0ddda, #d2cfcc);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform .12s ease, box-shadow .12s ease;
}

.nav-icon {
  display: none;
  flex: 0 0 22px;
  width: 22px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
  opacity: 0.65;
  filter: grayscale(35%) saturate(70%);
}

.nav-text {
  overflow: hidden;
}

.nav-extras {
  display: block;
}

.nav-link:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.nav-link.active {
  background: #dcd9d7;
  border-right: 3px solid #6B140D;
  border-left: 3px solid #6B140D;
  padding-left: 8px;
}

body.nav-collapsed .site-nav {
  padding-left: 10px;
  padding-right: 10px;
}

body.nav-collapsed .nav-toggle {
  width: 36px;
  padding: 0;
  margin-left: auto;
  margin-right: auto;
}

body.nav-collapsed .nav-toggle-label {
  display: none;
}

body.nav-collapsed .nav-icon {
  display: block;
}

body.nav-collapsed .nav-toggle-icon {
  transform: rotate(180deg);
}

body.nav-collapsed .nav-link {
  justify-content: center;
  gap: 0;
  padding-left: 8px;
  padding-right: 8px;
}

body.nav-collapsed .nav-link.active {
  padding-left: 6px;
}

body.nav-collapsed .nav-text,
body.nav-collapsed .nav-extras {
  display: none;
}

/* Navigation: Audio */
.nav-audio {
  margin-top: 8px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(145deg, #e0ddda, #d2cfcc);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-audio audio {
  height: 18px;
}

.nav-audio-title {
  font-size: 12px;
  color: #6B140D;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Letzte Überarbeitung - Datum*/
.last-update {
  margin-top: 30px;
  font-size: 12px;
  color: #5a4a47;
  font-family: inherit;
  text-align: center;
}

/* Inhalt */
main {
  padding: 10px 20px 20px;
  line-height: 1.5;
}

/* Karten / Kacheln */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: linear-gradient(145deg, #dcd9d7, #d2cfcc);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.card h1 {
  margin: 0 0 14px;
  font-size: 22px;
  color: #6B140D;
  text-align: center;
}

.card h2 {
  margin: 24px 0 10px;
  font-size: 18px;
  color: #990033;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 10px 0;
}

/* news */
.news-card .media>.center>a {
  display: block;
  width: 260px;
  max-width: 100%;
  height: 170px;
  margin: 10px auto;
  overflow: hidden;
  border-radius: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(42, 27, 24, .45);
  background: #111;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .32);
  transition: transform .15s ease, box-shadow .15s ease;
}

.news-card .media>.center>a>img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.news-card .media>.center>a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
}

.news-card .media>.center>a:hover>img {
  transform: none;
}

.news-card h2 {
  max-width: 850px;
  margin: 0 auto 8px;
  font-size: 17px;
  color: #6B140D;
}

.news-card h3,
.news-card .excerpt {
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

/* physics */
.physics-card h3 {
  color: #6B140D;
  margin-left: 40px;
}

/* Star Trek / DS9 */
.trek-card h3 {
  color: #6B140D;
  margin-left: 42px;
}

.skin-card h3 {
  color: #6B140D;
  margin-left: 40px;
}

/* Leseprobe */
.leseprobe-card h3 {
  color: #6B140D;
  margin-left: 42px;
}

/* Weiterführende Links zum Buch */
.book-links-card>h1,
.book-links-card>h2,
.book-links-card>.text-story,
.book-links-card>.muted-block {
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}


/* Favoriten */
.grid.favoriten-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1150px;
  margin: 24px auto 0;
}
.grid.favoriten-grid .card {
  padding: 18px 24px;
}
.favorite-card h3 {
  margin: 0 0 14px;
  color: #6B140D;
  text-align: center;
}
.favorite-item {
  padding: 12px 0;
  border-top: 1px solid rgba(42, 27, 24, 0.16);
}
.favorite-item:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.favorite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.favorite-name {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.favorite-item .excerpt {
  margin: 5px 0 0;
  font-size: 14px;
}

.favorite-button {
  display: inline-block;
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid rgba(107, 20, 13, 0.45);
  border-radius: 7px;
  background: linear-gradient(to bottom, #ece9e7, #d8d3d0);
  color: #6B140D;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(42, 27, 24, 0.18);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.favorite-button:hover {
  background: linear-gradient(to bottom, #f4f1ef, #e0dbd8);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(42, 27, 24, 0.22);
}


/* Filme: Liste */
.film-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 24px;
}

.movie-card h3 {
  color: #6B140D;
  font-weight: 700;
}

.movie-card h3,
.movie-card>p {
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.film-list .text-story {
  max-width: 850px;
  margin: 0 auto;
}

/* Filme: Sortieroptionen */
.sort-options .sort-label {
  font-size: 16px;
  font-weight: 500;
}

.sort-options a {
  color: #444;
}

.sort-options a.active-sort {
  color: #6B140D;
  font-weight: 700;
}

/* Text */
.meta {
  font-size: 13px;
  color: #5a4a47;
  margin-bottom: 14px;
  text-align: center;
}

/* Copyright-Hinweis */
.copyright-note {
  text-align: right;
  font-size: 12px;
  color: #777;
}

.excerpt {
  margin-bottom: 12px;
}

.text-story {
  text-align: justify;
}

.album-tracks {
  font-size: 13px;
}

.center {
  text-align: center;
}

.title {
  color: #990033;
  font-weight: 700;
}

.title-soft {
  color: #6B140D;
  font-weight: 400;
  opacity: 0.80;
}

.amazon {
  font-size: 15px;
  font-weight: 500;
}

.section-note {
  text-align: center;
  margin: 28px 0 18px;
  font-size: 13px;
  color: #5a4a47;
}

.muted-block,
.card .muted-block {
  color: #666666;
}

.section-title {
  color: #990033;
  font-size: 18px;
  font-weight: 500;
}

.banner-icon-grid .figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 10px auto;
}


/* Fotos / Figuren */
.figure {
  text-align: center;
}

/* Einheitliche schwebende Vorschaubilder in Kacheln
   Banner und Icons bleiben durch .banner-icon-grid ausgenommen. */
.grid:not(.banner-icon-grid) .card.figure img,
.card.is-clickable>img,
.card.is-clickable>a>img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 2px solid #bcb7b4;
  background: #e6e3e1;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6),
    inset 0 -1px 0 rgba(0, 0, 0, .15),
    0 6px 14px rgba(0, 0, 0, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.grid:not(.banner-icon-grid) .card.figure img:hover,
.card.is-clickable>img:hover,
.card.is-clickable>a>img:hover {
  transform: scale(1.01);
}

.caption {
  margin: 8px 0 0;
  font-size: 13px;
  color: #5a4a47;
}

/* Landschaften: Fröschis hinter dem Märchenwald-Bild */
.froeschi-card {
  position: relative;
  overflow: visible;
}

.froeschi-card.froeschi-show {
  z-index: 5;
}

.froeschi-photo {
  position: relative;
  overflow: visible;
  margin: 10px 0;
  border-radius: 10px;
}

.froeschi-photo>a {
  position: relative;
  z-index: 2;
  display: block;
  line-height: 0;
}

.grid .froeschi-card .froeschi-photo>a>img {
  position: relative;
  z-index: 2;
  margin: 0 !important;
}

.grid .froeschi-card img.froeschis {
  position: absolute;
  left: 10%;
  top: 0;
  z-index: 1;
  display: block;
  width: 170px !important;
  max-width: 52% !important;
  height: auto !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 28%) rotate(-13deg);
}

.froeschi-card.froeschi-show img.froeschis {
  animation: froeschis-behind-image 3.4s ease-in-out forwards;
}

@keyframes froeschis-behind-image {
  0% {
    opacity: 0;
    transform: translate(-50%, 15%);
  }

  26% {
    opacity: 0;
    transform: translate(-50%, -42%) rotate(-14deg);
  }

  38% {
    opacity: 1;
    transform: translate(-50%, -63%) rotate(-15deg);
  }

  53% {
    transform: translate(-50%, -67%) rotate(-18deg);
  }

  68% {
    opacity: 1;
    transform: translate(-50%, -63%) rotate(-13deg);
  }

  78% {
    opacity: 0;
    transform: translate(-50%, -42%) rotate(-14deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 15%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .froeschi-card.froeschi-show img.froeschis {
    animation: none;
  }
}

/* Bilder: Emojis */
.card img.emoji-img {
  display: block;
  margin: 10px auto;
  width: 30px;
  height: auto;
  border-radius: 0;
}

/* Bilder: Buchcover */
.card img.book-cover {
  width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Arduino-Codebox */
.code-box {
  position: relative;
  background: #555555;
  color: #e6e6e6;
  border-radius: 10px;
  padding: 46px 16px 16px;
  overflow: auto;
  margin-top: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.code-box pre {
  margin: 0;
  white-space: pre;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.45;
}

.copy-code {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dcd9d7;
  color: #6B140D;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-code:hover {
  background: #eeeeee;
}

.code-comment {
  color: #8fbf7f;
}

.code-define {
  color: #c586c0;
}

.code-keyword {
  color: #6aaed6;
}

.code-number {
  color: #d7ba7d;
}

.code-func {
  color: #dcdcaa;
}

/* Erotischer Chat */
.chat-card {
  margin-bottom: 22px;
}

.chat-subtitle {
  margin: 0 0 18px;
  text-align: center;
  font-size: 14px;
  color: #5a4a47;
}

.chat-warning {
  margin: 0 0 22px;
  text-align: center;
  color: #6B140D;
  font-weight: 700;
}

.chat-dialog {
  max-width: 850px;
  margin: 0 auto;
  font-family: Tahoma, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.chat-line {
  margin: 0 0 3px;
}

.chat-him {
  color: #244A70;
}

.chat-her {
  color: #A02738;
}

.chat-note {
  color: #5a4a47;
  font-style: italic;
}

.chat-space {
  height: 10px;
}

.chat-separator {
  width: 100%;
  margin: 18px 0;
  border-top: 1px solid rgba(42, 27, 24, 0.22);
}

.chat-details summary {
  cursor: pointer;
  color: #6B140D;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}

.chat-explicit {
  margin-top: 18px;
}

.chat-image-line {
  text-align: center;
}

.card img.chat-image {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 214px;
  margin: 12px auto;
}


/* Versteckter Chat-Link */
.secret-chat-link {
  text-align: center;
  margin-top: 18px;
}

.secret-chat-link a {
  font-size: 16px;
  text-decoration: none;
  opacity: 0.35;
  transition: opacity .15s ease;
}

.secret-chat-link a:hover {
  opacity: 1;
}

/* Medien-Blöcke */
.media {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Footer */
.site-footer {
  text-align: left;
  font-size: 12px;
  color: #5a4a47;
  padding: 5px 0 20px;
}

/* Tablet */
@media (max-width:900px) {
  .layout {
    --nav-width: 180px;
  }

  body.nav-collapsed .layout {
    --nav-width: 64px;
  }

  .grid.favoriten-grid {
  grid-template-columns: 1fr;
}
}

/* Smartphone */
@media (max-width:650px) {
  .layout {
    --nav-width: 160px;
  }

  body.nav-collapsed .layout {
    --nav-width: 58px;
  }

  .site-nav {
    padding: 10px;
  }

  main {
    padding: 10px 8px;
  }

  .site-header img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 2171 / 196;
    display: block;
    margin: 0 auto;
    opacity: 0.90;
    box-shadow: 6px 10px 24px rgba(0, 0, 0, 0.42);
  }
}
/* Like-Button für Lesetexte */
.like-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 24px auto 8px;
  font-size: 13px;
  color: #5a4a47;
}

.like-button {
  padding: 5px 10px;
  border: 1px solid rgba(107, 20, 13, 0.30);
  border-radius: 7px;
  background: linear-gradient(to bottom, #ece9e7, #d8d3d0);
  color: #6B140D;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.like-button:hover {
  background: linear-gradient(to bottom, #f4f1ef, #e0dbd8);
}

.like-button:disabled {
  opacity: 0.65;
  cursor: default;
}

.like-count {
  min-width: 1.3em;
  text-align: left;
  font-weight: 600;
}

  /* Print-Einstellung */
  @media print {
  .like-box {
    display: none !important;
  }


  .site-header,
  .site-nav,
  .site-footer,
  .section-note,
  .back-link,
  .nav-extras,
  .secret-chat-link {
    display: none !important;
  }

  .copyright-note {
    display: block !important;
    visibility: visible !important;
    color: #555 !important;
  }

  .layout {
    display: block !important;
  }

  main {
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    background: #fff !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }
}
