/* The Jungle: library, playlist and video pages */
#jungle-root { padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: clamp(3rem, 8vw, 6rem); min-height: 60vh; }
#jungle-root h1 { font-size: clamp(2.2rem, 6vw, 3.75rem); max-width: none; }
.jg-sub { color: var(--c-muted); margin: 0.75rem 0 0; max-width: var(--measure); }
.jg-back { display: inline-block; margin-bottom: 1.25rem; color: var(--c-muted); }

/* search */
.jg-search { position: relative; margin: 2rem 0 2rem; max-width: 36rem; }
.jg-search input {
  width: 100%; font: inherit; color: var(--c-text); background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: 999px; padding: 0.8rem 1.25rem;
}
.jg-search input::placeholder { color: var(--c-muted); }
.jg-results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 0.4rem); margin: 0; padding: 0.4rem; list-style: none;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.jg-results[hidden] { display: none; }
.jg-results a { display: block; padding: 0.6rem 0.8rem; border-radius: 10px; color: var(--c-text); text-decoration: none; }
.jg-results a:hover, .jg-results a:focus-visible { background: var(--c-bg); }
.jg-results small { display: block; color: var(--c-muted); }
.jg-results .jg-none { padding: 0.6rem 0.8rem; color: var(--c-muted); }

/* square playlist tiles */
.jg-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); }
.jg-tile {
  display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1 / 1; padding: 1.1rem;
  border-radius: 20px; border: 1px solid var(--c-line); text-decoration: none; color: var(--c-text);
  background: var(--c-surface); overflow: hidden; transition: transform 0.15s ease, border-color 0.15s ease;
}
.jg-tile:hover, .jg-tile:focus-visible { transform: translateY(-3px); border-color: var(--c-accent); }
.jg-tile h2 { font-size: 1.35rem; margin: 0; overflow-wrap: anywhere; }
.jg-tile span { color: var(--c-muted); font-size: 0.9rem; margin-top: 0.3rem; }
.jg-empty { color: var(--c-muted); }

/* episodes */
.jg-eps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.jg-ep { display: block; height: 100%; padding: 1.1rem 1.2rem; border-radius: 16px; border: 1px solid var(--c-line); background: var(--c-surface); text-decoration: none; color: var(--c-text); }
.jg-ep:hover, .jg-ep:focus-visible { border-color: var(--c-accent); }
.jg-ep .jg-num { display: block; color: var(--c-accent); font-family: var(--font-heading); font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; }
.jg-ep strong { display: block; margin: 0.35rem 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.jg-ep small { color: var(--c-muted); }

/* video page */
.jg-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--c-line); }
.jg-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.jg-video-head { margin-top: 1.75rem; }
.jg-video-head h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
.jg-num-label { color: var(--c-accent); font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.4rem; }
.jg-meta { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; color: var(--c-muted); }
.jg-meta strong { color: var(--c-text); font-weight: 600; }
.jg-speech { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); }
.jg-speech h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.jg-speech p { white-space: pre-wrap; max-width: var(--measure); margin: 0; overflow-wrap: anywhere; }
.jg-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
