/* Hintergruende (Reiter neben dem Radio im Bereich Kunst): kleine, ruhige Zusatz-Ecke.
   Ablauf: Kategorien -> kompakte Leiste zum Wischen -> Vollbild-Ansicht (wischen, gross ansehen, herunterladen).
   Bewusst niedrig gehalten, damit man schnell weiter zu Buch und Kartenspiel scrollen kann. Auf kleinen Handys und Tablets getestet. */
.hg { --hg-gold: var(--gold, #e6b655); --hg-gold2: var(--gold2, #ffdc8a); --hg-line: var(--line, rgba(255,255,255,.12)); --hg-panel: var(--panel, #121528); --hg-muted: var(--muted, #9a98b0); --hg-text: var(--text, #e9e6f2);
  max-width: 1000px; margin: 0 auto; padding: 0 1rem; }
.hg-intro { color: var(--hg-muted); max-width: 640px; margin: 0 auto .9rem; line-height: 1.45; font-size: .92rem; text-align: center; }

/* Kategorien (grobe Auswahl) */
.hg [hidden] { display: none !important; }
.hg-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.hg-cat { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--hg-line); border-radius: 12px; overflow: hidden; padding: 0; cursor: pointer; background: #0a0d16; color: #fff; font-family: inherit; text-align: left; transition: transform .15s, border-color .15s; }
.hg-cat:hover, .hg-cat:focus-visible { transform: translateY(-2px); border-color: var(--hg-gold); outline: none; }
.hg-cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hg-cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,7,13,0) 35%, rgba(5,7,13,.88) 100%); }
.hg-cat .t { position: absolute; left: .6rem; right: .6rem; bottom: .5rem; z-index: 1; font-weight: 700; font-size: .88rem; line-height: 1.2; text-shadow: 0 1px 4px #000; }
.hg-cat .t small { display: block; font-weight: 400; color: var(--hg-gold2); font-size: .72rem; margin-top: .1rem; }

/* Kompakte Leiste einer Kategorie */
.hg-bar { display: flex; align-items: center; gap: .6rem; margin: 0 0 .6rem; }
.hg-bar h4 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; line-height: 1.25; color: var(--hg-gold2); }
.hg-bar h4 small { color: var(--hg-muted); font-weight: 400; margin-left: .4rem; font-size: .8rem; }
.hg-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--hg-line); background: rgba(255,255,255,.06); color: var(--hg-text); font-family: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2; cursor: pointer; text-decoration: none; }
.hg-btn:hover, .hg-btn:focus-visible { border-color: var(--hg-gold); outline: none; }
.hg-btn.gold { background: linear-gradient(135deg, #f0be53, #b8860b); color: #1a1205; border-color: var(--hg-gold2); font-weight: 700; }
.hg-btn.gold:hover { box-shadow: 0 0 14px rgba(230,182,85,.5); }
.hg-strip { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding-bottom: .5rem; scrollbar-width: thin; }
.hg-th { flex: 0 0 auto; height: 150px; padding: 0; border: 1px solid var(--hg-line); border-radius: 10px; overflow: hidden; background: #0a0d16; cursor: pointer; scroll-snap-align: start; transition: border-color .15s; }
.hg-th:hover, .hg-th:focus-visible { border-color: var(--hg-gold); outline: none; }
.hg-th img { display: block; height: 100%; width: auto; max-width: none; }
.hg-hint { color: var(--hg-muted); font-size: .78rem; margin: .1rem 0 0; }
.hg-note { margin: 1rem auto 0; max-width: 640px; color: var(--hg-muted); font-size: .78rem; line-height: 1.5; text-align: center; }
.hg-note a { color: var(--hg-gold2); }

/* Vollbild-Ansicht */
.hg-view { position: fixed; inset: 0; z-index: 5000; background: rgba(4,6,11,.97); display: none; flex-direction: column; color: var(--hg-text, #e9e6f2); }
.hg-view.on { display: flex; }
.hg-vbar { display: flex; align-items: center; gap: .6rem; padding: max(.5rem, env(safe-area-inset-top)) .7rem .4rem; }
.hg-vbar .cnt { color: var(--hg-gold2, #ffdc8a); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.hg-vbar .ttl { flex: 1; min-width: 0; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-vtrack { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.hg-vtrack::-webkit-scrollbar { display: none; }
.hg-vtrack.lock { overflow-x: hidden; scroll-snap-type: none; }
.hg-slide { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; padding: 0 .4rem; overflow: hidden; position: relative; }
.hg-slide img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 6px; }
.hg-slide .ld { position: absolute; color: var(--hg-muted, #9a98b0); font-size: .85rem; }
.hg-slide.big { overflow: auto; display: block; -webkit-overflow-scrolling: touch; }
.hg-slide.big img { max-width: none; max-height: none; width: auto; height: auto; margin: 0 auto; border-radius: 0; }
.hg-vfoot { display: flex; gap: .6rem; padding: .5rem .7rem max(.7rem, env(safe-area-inset-bottom)); justify-content: center; flex-wrap: wrap; }
.hg-vfoot .hg-btn { flex: 1 1 140px; max-width: 260px; }
.hg-arrow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hg-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--hg-gold, #e6b655); background: rgba(10,13,22,.8); color: var(--hg-gold2, #ffdc8a); font-size: 1.8rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .hg-arrow.prev { left: 14px; } .hg-arrow.next { right: 14px; }
  .hg-arrow:hover { background: rgba(230,182,85,.25); }
}

/* Tablets und groessere Fenster */
@media (min-width: 600px) { .hg-cats { grid-template-columns: repeat(3, 1fr); gap: .8rem; } .hg-th { height: 190px; } .hg-cat .t { font-size: .95rem; } }
@media (min-width: 900px) { .hg-cats { grid-template-columns: repeat(4, 1fr); } .hg-th { height: 210px; } }
/* sehr kleine Handys */
@media (max-width: 360px) { .hg { padding: 0 .4rem; } .hg-cats { gap: .45rem; } .hg-cat .t { font-size: .78rem; left: .45rem; right: .45rem; } .hg-cat .t small { font-size: .66rem; } .hg-th { height: 120px; } .hg-bar { flex-wrap: wrap; } .hg-btn { padding: .4rem .7rem; font-size: .82rem; } }
/* flache Fenster (Querformat am Handy) */
@media (max-height: 460px) { .hg-vbar { padding-top: .25rem; padding-bottom: .15rem; } .hg-vfoot { padding-top: .25rem; padding-bottom: .35rem; } .hg-vfoot .hg-btn { min-height: 38px; } .hg-th { height: 110px; } }

/* Format-Umschalter (Handy / Desktop / Ultrawide / Alle) */
.hg-fmt { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin: 0 0 .8rem; }
.hg-chip { min-height: 40px; padding: .4rem .95rem; border-radius: 999px; border: 1px solid var(--hg-line); background: rgba(255,255,255,.05); color: var(--hg-text); font-family: inherit; font-weight: 600; font-size: .85rem; line-height: 1.2; cursor: pointer; }
.hg-chip:hover, .hg-chip:focus-visible { border-color: var(--hg-gold); outline: none; }
.hg-chip.on { background: linear-gradient(135deg, #f0be53, #b8860b); color: #1a1205; border-color: var(--hg-gold2); }
.hg-chip small { opacity: .7; margin-left: .3rem; }
@media (max-width: 360px) { .hg-fmt { gap: .3rem; } .hg-chip { padding: .35rem .6rem; font-size: .78rem; min-height: 38px; } }

/* Gefaellt mir: Herz-Knopf und Herz beim Doppeltippen */
.hg-view { touch-action: manipulation; }
.hg-btn.heart.liked { color: #ff6b81; border-color: #ff6b81; }
.hg-burst { position: absolute; z-index: 4; pointer-events: none; font-size: 4.2rem; line-height: 1; color: #ff4d6d; text-shadow: 0 4px 18px rgba(0,0,0,.6); transform: translate(-50%, -50%) scale(.3); opacity: 0; animation: hgBurst .85s ease-out forwards; }
@keyframes hgBurst { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 25% { transform: translate(-50%, -60%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -120%) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hg-burst { animation-duration: .01s; } }
.hg-vfoot .hg-btn.heart { flex: 0 1 150px; }

/* Besucher mit Pinterest-Link: das passende Bild steht vorn und ist hervorgehoben */
.hg-th.sel { border-color: var(--hg-gold2, #ffdc8a); box-shadow: 0 0 0 2px rgba(255,220,138,.55), 0 0 18px rgba(230,182,85,.45); }
.hg-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 900; display: flex; align-items: center; max-width: calc(100vw - 1.2rem); background: rgba(14,16,30,.94); border: 1px solid var(--gold, #e6b655); border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.55); }
.hg-pill .go { white-space: nowrap; background: none; border: 0; color: var(--gold2, #ffdc8a); font-family: inherit; font-weight: 600; font-size: .85rem; padding: .6rem .5rem .6rem 1rem; cursor: pointer; min-height: 44px; text-align: left; }
.hg-pill .x { background: none; border: 0; color: var(--muted, #9a98b0); font-size: 1.3rem; line-height: 1; padding: .4rem .8rem .4rem .3rem; cursor: pointer; min-height: 44px; }
@media (min-width: 900px) { .hg-pill { bottom: 24px; } }
