/* Media page styles. Uses each site's own colour tokens (--primary, --ink, --muted, --card, --border, --accent). */
.media-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 0 auto 26px; max-width: 1100px; padding: 0 24px; }
.media-chip {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--ink);
}
.media-chip:hover { border-color: var(--accent); }
.media-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.media-shuffle { margin-left: 6px; }

.media-grid {
  display: grid; gap: 22px; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.media-card { min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius, 14px); overflow: hidden; box-shadow: var(--shadow-sm); }
.media-h { grid-column: span 2; }
@media (max-width: 560px) { .media-h { grid-column: auto; } }

.media-frame { position: relative; aspect-ratio: 9 / 16; background: var(--primary-2, #111); }
.media-h .media-frame { aspect-ratio: 16 / 9; }
/* TikTok and Instagram embeds carry their own header/footer, so they need a taller frame than a bare Short */
.media-tt .media-frame { aspect-ratio: 325 / 739; }
.media-ig .media-frame { aspect-ratio: 9 / 19; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.media-play {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(160deg, var(--primary, #37474f), var(--primary-2, #1c262b)); color: #fff; overflow: hidden;
}
.media-tt .media-play { background: linear-gradient(160deg, #0b0b0f, #253238); }
.media-ig .media-play { background: linear-gradient(160deg, #5b3a8c, #c2477a 60%, #e8a35c); }
.media-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-glyph { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.04em; opacity: 0.9; }
.media-badge {
  position: absolute; left: 10px; top: 10px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(0, 0, 0, 0.62); color: #fff; padding: 4px 9px; border-radius: 999px;
}
.media-icon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 1.3rem; padding-left: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.media-tt .media-icon, .media-ig .media-icon { top: 55%; }
.media-play:hover .media-icon, .media-play:focus-visible .media-icon { background: var(--accent); }
.media-play:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.media-caption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.media-title { font-weight: 600; font-size: 0.92rem; line-height: 1.35; color: var(--ink); }
.media-link { font-size: 0.82rem; color: var(--muted); text-decoration: none; }
.media-link:hover { color: var(--primary); text-decoration: underline; }
@media (prefers-color-scheme: dark) { .media-link:hover { color: var(--accent); } }

.media-note { max-width: 780px; margin: 26px auto 0; padding: 0 24px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.media-note a { color: inherit; text-decoration: underline; }
