/**
 * Media Engine V2 — Three-column grid layout
 *
 * Design reference: 51xfree_homepage_v2.html (Fintech Clean)
 *   - Pure #0d0d0d shell, #141414 side panels
 *   - Purple gradient #7c3aed → #a855f7 (brand + CTA)
 *   - 180px left-nav | fluid center feed | 200px right panel
 *   - 9:16 vertical video cards with soft purple gradient glow
 *   - Syne (display) + DM Sans (body) type system
 *
 * Fonts are imported here (self-contained, no functions.php changes needed).
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Syne:wght@700;800&display=swap');

:root {
  --vswp-bg: #0d0d0d;
  --vswp-surface: #141414;
  --vswp-surface-2: #1a1a1a;
  --vswp-surface-3: #0f0f0f;
  --vswp-border: #1e1e1e;
  --vswp-text: #fff;
  --vswp-text-dim: #a0a0a0;
  --vswp-text-muted: #555;
  --vswp-text-faint: #444;
  --vswp-accent: #a855f7;
  --vswp-accent-deep: #7c3aed;
  --vswp-accent-soft: #2d1b4e;
  --vswp-accent-bg: #1a0f2e;
  --vswp-grad: linear-gradient(135deg, #7c3aed, #a855f7);
  --vswp-grad-h: linear-gradient(90deg, #7c3aed, #a855f7);

  /* Override legacy --primary/--secondary defined in style.css (red/cyan
     TikTok palette) so any leftover var(--primary) reference in feed.css
     or the legacy modal/comment styles automatically picks up the V2
     purple palette. layout.css loads after style.css, so this wins. */
  --primary: #7c3aed;
  --secondary: #a855f7;
  --primary-dark: #6d28d9;

  /* ─────────────────────────────────────────────
     Type system — modular scale (1.25 ratio).
     Used across layout.css / pages.css / feed.css
     so every page lands on the same 7-step ramp.
     ───────────────────────────────────────────── */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Step  Use                                         px / line-height */
  --vt-display: 36px;  /* hero (author name, page title)             1.1 */
  --vt-h1:      26px;  /* primary heading (Trending in …, For You)   1.2 */
  --vt-h2:      20px;  /* section heading (Comments, Related)        1.3 */
  --vt-h3:      17px;  /* sub-section, sidebar primary, video title  1.35 */
  --vt-body:    15px;  /* nav, paragraphs, default                   1.5 */
  --vt-caption: 13px;  /* card title, creator name, supporting       1.4 */
  --vt-small:   12px;  /* card stats, tabs, dense UI                 1.45 */
  --vt-meta:    11px;  /* uppercase section labels, badges           1.4 */
  --vt-micro:   10px;  /* tertiary meta, age stamps, view counts     1.4 */

  /* Letter spacing presets */
  --vt-tracking-display: -0.02em;
  --vt-tracking-tight:   -0.01em;
  --vt-tracking-wide:     0.06em;   /* uppercase labels */
  --vt-tracking-extra:    0.12em;   /* tiny tracked labels */

  /* Weight presets */
  --vw-display: 800;
  --vw-bold:    700;
  --vw-semi:    600;
  --vw-medium:  500;
  --vw-regular: 400;
}

/* ============================================
   Global shell — pure black, DM Sans everywhere
   ============================================ */
html, body {
  background: var(--vswp-bg) !important;
  color: var(--vswp-text);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* On grid pages, strip the legacy top chrome (header/footer). The left
   nav owns the brand so the WP site-title link can no longer leak a raw
   URL into the page. Single-video pages don't render .videoswipe-layout,
   so they keep their header untouched. */
body:has(.videoswipe-layout) .videoswipe-header,
body:has(.videoswipe-layout) .videoswipe-footer { display: none; }
body:has(.videoswipe-layout) #content,
body:has(.videoswipe-layout) #page { margin: 0; padding: 0; }

/* ============================================
   Grid shell — 180 | fluid | 200
   ============================================ */
.videoswipe-layout {
  display: grid;
  /* Bumped ~25% so the design feels right at 100% browser zoom (was 180/1fr/200) */
  grid-template-columns: 220px minmax(0, 1fr) 250px;
  gap: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--vswp-bg);
  color: var(--vswp-text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
}

.videoswipe-col-left,
.videoswipe-col-center,
.videoswipe-col-right { min-width: 0; }

/* ============================================
   LEFT — sticky nav rail
   ============================================ */
.videoswipe-col-left {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}

.videoswipe-left-nav {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--vswp-surface);
  border-right: 1px solid var(--vswp-border);
  padding: 20px 0 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.videoswipe-left-nav::-webkit-scrollbar { width: 3px; }
.videoswipe-left-nav::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }

.videoswipe-brand {
  display: block;
  padding: 0 24px 22px;
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  background: var(--vswp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 150ms ease;
}
.videoswipe-brand:hover { opacity: 0.85; }

.videoswipe-nav-label {
  padding: 16px 20px 8px;
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--vswp-text-faint);
}

/* style.css line ~330 puts .videoswipe-nav-menu on `display: flex` for the
   legacy top-header nav (horizontal). Force vertical stacking inside the
   left rail with higher specificity so the override wins regardless of
   load order. */
.videoswipe-left-nav .videoswipe-nav-menu,
.videoswipe-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.videoswipe-left-nav .videoswipe-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.videoswipe-left-nav .videoswipe-nav-menu li {
  margin: 0;
  width: 100%;
  list-style: none;
}
.videoswipe-nav-menu li { margin: 0; }

.videoswipe-nav-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  color: #888;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}
.videoswipe-nav-menu a:hover { color: #ccc; }

.videoswipe-nav-menu .current-menu-item > a,
.videoswipe-nav-menu .current-menu-parent > a,
.videoswipe-nav-menu .current-menu-ancestor > a {
  color: #fff;
  font-weight: 500;
  border-left-color: var(--vswp-accent);
  background: rgba(168, 85, 247, 0.07);
}

.videoswipe-nav-count {
  font-size: 10px;
  color: var(--vswp-text-muted);
}

/* Inline SVG icons in the left nav inherit currentColor so they fade in
   sync with the text (888 → ccc → fff). */
.videoswipe-nav-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.videoswipe-nav-label-text { flex: 1; }

/* Sign In / Sign Out CTA pinned to the bottom of the left nav */
.videoswipe-nav-footer {
  margin-top: auto;
  padding: 16px 24px 0;
  border-top: 1px solid var(--vswp-border);
}
.videoswipe-login-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--vswp-grad);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 150ms ease;
}
.videoswipe-login-btn:hover { opacity: 0.9; }

/* Homepage center header — geo chip + heading + tabs row */
.videoswipe-center-header {
  flex-shrink: 0;
  padding: 22px 22px 0;
  border-bottom: 1px solid var(--vswp-border);
}
.videoswipe-center-header .videoswipe-feed-heading {
  padding: 8px 0 14px;
  border-bottom: none;
}

/* Geo chip — "🇲🇾 Trending in Malaysia" pill above heading */
.videoswipe-geo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--vswp-accent);
  background: var(--vswp-accent-bg);
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--vswp-accent-soft);
  margin-bottom: 4px;
}

/* For You / Hot / New / Following tabs */
.videoswipe-feed-tabs {
  display: flex;
  gap: 0;
  margin: 0 -22px;
  padding: 0 22px;
}
.videoswipe-tab {
  padding: 8px 16px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 150ms ease, border-color 150ms ease;
}
.videoswipe-tab:hover { color: #aaa; }
.videoswipe-tab.active {
  color: var(--vswp-accent);
  border-bottom-color: var(--vswp-accent);
}

/* ============================================
   CENTER — header + scrollable feed
   ============================================ */
.videoswipe-col-center {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.videoswipe-feed-heading {
  flex-shrink: 0;
  margin: 0;
  padding: 24px 22px 16px;
  font-family: var(--font-display);
  font-size: var(--vt-h1);
  line-height: 1.2;
  font-weight: var(--vw-display);
  letter-spacing: var(--vt-tracking-display);
  color: #fff;
  /* If a seeded value still leaks a long URL, soft-wrap it instead of overflowing */
  word-break: break-word;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--vswp-border);
}

.videoswipe-feed-heading .videoswipe-geo-country,
.videoswipe-feed-heading .videoswipe-search-query {
  background: var(--vswp-grad-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.videoswipe-feed-heading .videoswipe-search-query {
  /* Search terms can be long — allow wrap, but keep gradient continuous */
  white-space: normal;
}

/* ============================================
   FEED — 9:16 cards with purple gradient glow
   ============================================ */
.videoswipe-grid-feed {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  align-content: start;
  align-items: start;
  /* Auto-rows = max-content (not auto/stretch) so each row sizes exactly
     to the card's intrinsic height (the padding-bottom hack below) and
     never stretches a row taller because of one tall sibling. Combined
     with align-items:start this gives the cleanest reflow during resize. */
  grid-auto-rows: max-content;
  overscroll-behavior: contain;
}
.videoswipe-grid-feed::-webkit-scrollbar { width: 3px; }
.videoswipe-grid-feed::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }
.videoswipe-grid-feed::-webkit-scrollbar-track { background: transparent; }

.videoswipe-grid-card {
  position: relative;
  display: block;
  /* Lock 9:16 with the padding-bottom hack instead of aspect-ratio.
     During fast resize the aspect-ratio CSS property sometimes lags
     behind the grid track recalculation, causing momentary uneven row
     heights. padding-bottom is computed synchronously from the rendered
     width by every layout engine since 2009 — zero quirks.
     16 / 9 = 1.777… → 177.78% */
  padding-bottom: 177.78%;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1a2e;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 220ms ease;
  isolation: isolate;
}

/* Soft ambient purple glow sitting behind the poster — the signature
   Fintech-Clean look. Strengthens on hover. */
.videoswipe-grid-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 70%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(60% 40% at 50% 100%, rgba(168, 85, 247, 0.18), transparent 70%);
  pointer-events: none;
  opacity: 0.7;
  z-index: 1;
  transition: opacity 220ms ease;
}

.videoswipe-grid-card:hover {
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.35),
    0 12px 40px -10px rgba(124, 58, 237, 0.55);
}
.videoswipe-grid-card:hover::before { opacity: 1; }

.videoswipe-grid-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}
/* Pin the IMG to the thumb box so the image's natural size can never push
   the card taller than its 9:16 aspect-ratio. */
.videoswipe-grid-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bottom fade for legibility */
.videoswipe-grid-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 45%);
  pointer-events: none;
  z-index: 1;
}

.videoswipe-grid-badge-hd,
.videoswipe-grid-badge-duration {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 3;
}
.videoswipe-grid-badge-hd {
  top: 8px;
  right: 8px;
  background: rgba(168, 85, 247, 0.85);
  color: #fff;
}
.videoswipe-grid-badge-duration {
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.videoswipe-grid-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  z-index: 3;
  pointer-events: none;
}

.videoswipe-grid-title {
  margin: 0 0 4px 0;
  font-family: var(--font-body);
  font-size: var(--vt-caption);
  font-weight: var(--vw-medium);
  line-height: 1.35;
  letter-spacing: var(--vt-tracking-tight);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.videoswipe-grid-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #aaa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Pagination sits inside the scroll area */
.videoswipe-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0 16px;
  flex-wrap: wrap;
}
.videoswipe-pagination a,
.videoswipe-pagination span {
  display: inline-block;
  min-width: 32px;
  padding: 6px 12px;
  background: var(--vswp-surface-2);
  color: var(--vswp-text-dim);
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.videoswipe-pagination a:hover {
  background: var(--vswp-accent-soft);
  color: var(--vswp-accent);
}
.videoswipe-pagination .current {
  background: var(--vswp-grad);
  color: #fff;
}

.videoswipe-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--vswp-text-muted);
  font-size: 13px;
}

/* ============================================
   RIGHT — sticky sidebar (200px)
   ============================================ */
.videoswipe-col-right {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: #111;
  border-left: 1px solid var(--vswp-border);
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.videoswipe-col-right::-webkit-scrollbar { width: 3px; }
.videoswipe-col-right::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }
.videoswipe-col-right::-webkit-scrollbar-track { background: transparent; }

.videoswipe-sidebar-module {
  margin-bottom: 18px;
}

.videoswipe-sidebar-heading {
  font-family: var(--font-body);
  font-size: var(--vt-meta);
  font-weight: var(--vw-semi);
  text-transform: uppercase;
  letter-spacing: var(--vt-tracking-wide);
  color: var(--vswp-text-muted);
  margin: 0 0 12px 0;
}

/* Ad slot */
.videoswipe-ad-placeholder {
  height: 120px;
  border: 1px dashed var(--vswp-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vswp-text-faint);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--vswp-surface-3);
}

.videoswipe-ad { min-height: 60px; }
.videoswipe-ad img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Creator list */
.videoswipe-creator-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.videoswipe-creator-list li { margin: 0 0 10px 0; }

.videoswipe-creator-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--vswp-text);
  text-decoration: none;
  transition: opacity 120ms ease;
}
.videoswipe-creator-item:hover { opacity: 0.85; }

.videoswipe-creator-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--vswp-grad);
}

.videoswipe-creator-name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  color: #ddd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.videoswipe-creator-count {
  font-size: 9px;
  color: var(--vswp-text-muted);
}

/* Tag cloud */
.videoswipe-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.videoswipe-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  background: var(--vswp-surface-2);
  border: 1px solid #232323;
  border-radius: 4px;
  font-size: 10px;
  color: #666;
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.videoswipe-tag-chip:hover {
  color: var(--vswp-accent);
  border-color: #3d1b6e;
  background: var(--vswp-accent-bg);
}
.videoswipe-tag-chip span {
  color: var(--vswp-text-faint);
  font-size: 9px;
}
.videoswipe-tag-chip:hover span { color: var(--vswp-accent); }

/* Recent videos */
.videoswipe-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.videoswipe-recent-list li { margin: 0 0 8px 0; }

.videoswipe-recent-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px;
  color: var(--vswp-text);
  text-decoration: none;
}
.videoswipe-recent-list a:hover { opacity: 0.85; }

.videoswipe-recent-list img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.videoswipe-recent-list span {
  flex: 1;
  font-size: 11px;
  line-height: 1.35;
  color: #ccc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   SINGLE-VIDEO PLAY PAGE
   Reference: 51xfree_play_page_v2.html
   Layout: 60px collapsed left | fluid black center (full-bleed 9:16) | 300px right
   Player: HTML5 <video>, autoplay+muted+loop, click toggle, overlays inside
   ============================================ */
.videoswipe-layout--single {
  display: block;
  background: #050505;
  min-height: 100vh;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #fff;
}

/* Hide site chrome on play page (also hidden on grid page; this is a backup) */
.videoswipe-layout--single ~ .videoswipe-footer,
body:has(.videoswipe-layout--single) .videoswipe-header,
body:has(.videoswipe-layout--single) .videoswipe-footer { display: none; }

/* ── LEFT — 60px collapsed: vertical 51X logo + single Home icon ── */
.videoswipe-layout--single .videoswipe-col-left {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 100vh;
  background: #0c0c0c;
  border-right: 1px solid #1a1a1a;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
}
/* Hide the default full nav rendering on this page */
.videoswipe-layout--single .videoswipe-col-left .videoswipe-left-nav { display: none; }

.videoswipe-single-mini-brand {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--vswp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  writing-mode: vertical-rl;
  margin-bottom: 18px;
  text-decoration: none;
}
.videoswipe-single-mini-home {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--vswp-accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--vswp-accent);
  text-decoration: none;
  border: 1px solid #2d1b4e;
  transition: background 150ms ease;
}
.videoswipe-single-mini-home:hover {
  background: rgba(168, 85, 247, 0.18);
}

/* ── RIGHT — 300px fixed ── */
.videoswipe-layout--single .videoswipe-col-right {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background: #0a0a0a;
  border-left: 1px solid #1a1a1a;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 20;
}
.videoswipe-layout--single .videoswipe-col-right::-webkit-scrollbar { width: 3px; }
.videoswipe-layout--single .videoswipe-col-right::-webkit-scrollbar-thumb { background: #1a1a1a; }

/* ── CENTER — fluid black, player centered, no overflow ── */
.videoswipe-layout--single .videoswipe-col-center {
  margin-left: 60px;
  margin-right: 300px;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

/* Hide SEO-only description + comments visually on play page */
.videoswipe-layout--single .videoswipe-single-description,
.videoswipe-layout--single .videoswipe-comments-section {
  display: none;
}

/* Swipe scaffolding (.videoswipe-feed--embedded → .videoswipe-swiper →
   .videoswipe-swiper-wrapper → .videoswipe-slide) is added by the
   bootstrap so feed.js can swipe the next video in. We don't style any
   of those — they are transparent pass-throughs that fill the parent so
   the .videoswipe-player-wrap inside still gets centered + 9:16 sized. */
.videoswipe-layout--single .videoswipe-feed,
.videoswipe-layout--single .videoswipe-feed--embedded,
.videoswipe-layout--single .videoswipe-swiper,
.videoswipe-layout--single .videoswipe-swiper-wrapper {
  width: auto;
  height: 100vh;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.videoswipe-layout--single .videoswipe-slide {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;            /* override feed.css's --dark-bg fallback */
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
/* Only the active slide is visible — non-active slides are kept in DOM
   for feed.js to preload but pulled out of paint. */
.videoswipe-layout--single .videoswipe-slide:not(.active) {
  display: none;
}

/* AJAX-rendered slides (template-parts/video-card.php) wrap the player
   in .videoswipe-video-container — make sure that container fills the
   slide on the embedded swipe page, with a black backdrop while the
   first video frame is loading. Without these overrides the cascade
   from feed.css produces a white/gray box (the user reported "blank
   second slide" — that's what they were seeing). */
.videoswipe-layout--single .videoswipe-video-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.videoswipe-layout--single .videoswipe-player {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* fill the 9:16 frame instead of letterboxing */
  background: #000;
  display: block;
}
/* AJAX-loaded slides ship their own creator/info/like chrome via
   .videoswipe-overlay + .videoswipe-actions + .videoswipe-hd-badge
   from video-card.php. Style them here for the embedded layout so
   every slide has consistent UI (creator name, like/comment/share)
   instead of slide 0 having the chrome and slides 2+ being naked. */

.videoswipe-layout--single .videoswipe-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 18px;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}
.videoswipe-layout--single .videoswipe-overlay a,
.videoswipe-layout--single .videoswipe-overlay button { pointer-events: auto; }

.videoswipe-layout--single .videoswipe-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.videoswipe-layout--single .videoswipe-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--vswp-grad);
  border: 2px solid rgba(255,255,255,0.2);
}
.videoswipe-layout--single .videoswipe-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.videoswipe-layout--single .videoswipe-details { min-width: 0; flex: 1; }
.videoswipe-layout--single .videoswipe-creator-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  margin-bottom: 2px;
}
.videoswipe-layout--single .videoswipe-video-title {
  font-size: 12px;
  color: #ddd;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.videoswipe-layout--single .videoswipe-actors,
.videoswipe-layout--single .videoswipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.videoswipe-layout--single .videoswipe-actor,
.videoswipe-layout--single .videoswipe-tag {
  font-size: 10px;
  color: var(--vswp-accent);
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.videoswipe-layout--single .videoswipe-actor:hover,
.videoswipe-layout--single .videoswipe-tag:hover { color: #fff; }

/* Right rail action buttons (heart, comment, share) */
.videoswipe-layout--single .videoswipe-actions {
  position: absolute;
  right: 12px;
  bottom: 110px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 7;
}
.videoswipe-layout--single .videoswipe-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20,20,20,0.85);
  border: 1px solid #2a2a2a;
  color: #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 150ms ease, color 150ms ease;
  position: relative;
}
.videoswipe-layout--single .videoswipe-action-btn:hover { border-color: var(--vswp-accent); color: #fff; }
.videoswipe-layout--single .videoswipe-action-btn.liked { color: #ef4444; border-color: #ef4444; }
.videoswipe-layout--single .videoswipe-action-icon { font-size: 18px; line-height: 1; }
.videoswipe-layout--single .videoswipe-action-count {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 2px;
  font-size: 10px;
  color: #ccc;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  white-space: nowrap;
}

/* HD badge (top-left to avoid clashing with player back button) */
.videoswipe-layout--single .videoswipe-hd-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(168,85,247,0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 6;
}

/* Hide the duplicate chrome on slide 0 — single-video.php already
   wraps slide 0 with its own elaborate .videoswipe-player-bottom /
   .videoswipe-player-creator-row UI, so we suppress the lighter
   video-card.php overlay specifically there to avoid double creator
   names + double action rails on the first slide. AJAX-loaded slides
   (slide 1+) keep these chrome elements visible. */
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-slide:first-child > .videoswipe-overlay,
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-slide:first-child > .videoswipe-actions,
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-slide:first-child > .videoswipe-hd-badge {
  display: none;
}

/* P0-2: Tap-to-play overlay — shown when video.play() promise rejects
   (Safari iOS / Firefox strict mode autoplay policy). feed.js toggles
   the .needs-tap class on the slide; clicking the overlay triggers
   .play() and removes the class. Without this, the user lands on a
   frozen first frame and has no idea what to do. */
.videoswipe-layout--single .videoswipe-tap-to-play {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.videoswipe-layout--single .videoswipe-slide.needs-tap .videoswipe-tap-to-play {
  display: flex;
}
.videoswipe-layout--single .videoswipe-tap-to-play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
  animation: vswpPulseTap 1.6s ease-in-out infinite;
}
.videoswipe-layout--single .videoswipe-tap-to-play-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid #fff;
  margin-left: 6px;
}
@keyframes vswpPulseTap {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 40px rgba(168, 85, 247, 0.5); }
  50%      { transform: scale(1.06); box-shadow: 0 0 60px rgba(168, 85, 247, 0.8); }
}
/* Top progress bar from feed.js — pin it to the player wrap edge */
.videoswipe-layout--single .videoswipe-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 8;
}
.videoswipe-layout--single .videoswipe-progress-bar {
  height: 100%;
  background: var(--vswp-grad-h);
}

/* Up/Down swipe buttons — pinned to the player's right edge, slightly
   below vertical centre. This is the TikTok / Instagram Reels / YouTube
   Shorts standard position for "next/prev" affordances on web.

   feed.css line ~220 sets `.videoswipe-nav-controls` to `bottom: 2rem;
   left: 50%; transform: translateX(-50%)` for the legacy mobile bottom-
   centre layout. We explicitly null `left` and `bottom` here so our
   right-edge anchor wins — without these the element would stretch
   horizontally between left:50% and right:14px, rendering centred. */
/* feed.css's .videoswipe-nav-controls has identical specificity in some
   load orders, so we use !important to guarantee the right-edge anchor
   wins regardless of cascade quirks. */
.videoswipe-layout--single .videoswipe-feed--embedded .videoswipe-nav-controls,
.videoswipe-layout--single .videoswipe-nav-controls {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  bottom: auto !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  z-index: 10 !important;
  pointer-events: none !important;
  width: auto !important;
}
.videoswipe-layout--single .videoswipe-nav-btn {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 150ms ease;
}
.videoswipe-layout--single .videoswipe-nav-btn:hover { background: var(--vswp-accent); }

/* ── Player wrap — full viewport-height 9:16 with purple glow ── */
.videoswipe-player-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #1a1730;
  isolation: isolate;
  cursor: pointer;
  overflow: hidden;
}
/* Outer halo */
.videoswipe-player-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.5), transparent 45%, rgba(124, 58, 237, 0.5));
  z-index: -1;
  pointer-events: none;
  filter: blur(10px);
}

.videoswipe-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.videoswipe-player-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.videoswipe-player-wrap .videoswipe-embed,
.videoswipe-player-wrap .videoswipe-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Top + bottom legibility gradients */
.videoswipe-player-grad-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
  z-index: 4;
  pointer-events: none;
}
.videoswipe-player-grad-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
  z-index: 4;
  pointer-events: none;
}

/* Top overlay row */
.videoswipe-player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 6;
}
.videoswipe-player-back {
  font-size: 18px;
  color: #aaa;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
}
.videoswipe-player-back:hover { color: #fff; }
.videoswipe-player-tag-top {
  background: rgba(168, 85, 247, 0.85);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
}

/* Center play overlay (visible only when paused) */
.videoswipe-center-play {
  position: absolute;
  top: 50%; left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--vswp-accent-deep);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
}
.videoswipe-center-play::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  margin: -12px 0 0 -8px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 20px solid #fff;
}
.videoswipe-player-wrap.is-paused .videoswipe-center-play { opacity: 1; }

/* Bottom overlay — creator row + desc + hashtags + progress bar + time */
.videoswipe-player-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 14px;
  z-index: 6;
}
.videoswipe-player-creator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.videoswipe-player-creator-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--vswp-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.videoswipe-player-creator-name {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
}
.videoswipe-player-creator-name:hover { color: var(--vswp-accent); }
.videoswipe-player-follow-sm {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ccc;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  margin-left: 4px;
  text-decoration: none;
  transition: all 150ms ease;
}
.videoswipe-player-follow-sm:hover {
  border-color: var(--vswp-accent);
  color: #fff;
  background: rgba(168, 85, 247, 0.18);
}
.videoswipe-player-desc {
  font-size: 11px;
  color: #aaa;
  line-height: 1.4;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.videoswipe-player-hashtags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.videoswipe-player-hashtag {
  font-size: 10px;
  color: var(--vswp-accent);
  text-decoration: none;
}
.videoswipe-player-progress {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin-bottom: 8px;
  position: relative;
}
.videoswipe-player-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--vswp-grad-h);
  border-radius: 2px;
}
.videoswipe-player-progress-dot {
  position: absolute;
  left: 0%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vswp-accent);
}
.videoswipe-player-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #555;
}

/* HD badge (legacy class — rarely used, but keep) */
.videoswipe-layout--single .videoswipe-hd-badge {
  display: none; /* covered by .videoswipe-player-tag-top */
}

/* ────────────────────────────────────────────
   RIGHT RAIL CONTENT — creator card / share & earn / related
   ──────────────────────────────────────────── */

/* Creator card */
.videoswipe-creator-card {
  margin: 14px 14px 0;
  padding: 14px;
  border-radius: 10px;
  background: #111;
  border: 1px solid #1e1e1e;
}
.videoswipe-cc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.videoswipe-cc-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--vswp-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border: 2px solid var(--vswp-accent);
  flex-shrink: 0;
  text-decoration: none;
}
.videoswipe-cc-info { min-width: 0; }
.videoswipe-cc-name {
  font-family: var(--font-body);
  font-size: var(--vt-body);
  font-weight: var(--vw-semi);
  letter-spacing: var(--vt-tracking-tight);
  color: #fff;
  margin: 0;
}
.videoswipe-cc-handle {
  font-family: var(--font-body);
  font-size: var(--vt-meta);
  color: var(--vswp-text-muted);
  margin: 0;
}
.videoswipe-cc-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}
.videoswipe-cc-stat-num {
  font-family: var(--font-display);
  font-size: var(--vt-h3);
  font-weight: var(--vw-bold);
  letter-spacing: var(--vt-tracking-tight);
  color: #fff;
}
.videoswipe-cc-stat-lbl {
  font-family: var(--font-body);
  font-size: var(--vt-micro);
  font-weight: var(--vw-medium);
  text-transform: uppercase;
  letter-spacing: var(--vt-tracking-wide);
  color: var(--vswp-text-muted);
  margin-top: 4px;
}
.videoswipe-cc-follow-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background: var(--vswp-grad);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  display: block;
  letter-spacing: 0.05em;
  transition: opacity 150ms ease;
}
.videoswipe-cc-follow-btn:hover { opacity: 0.9; }

/* Share & Earn CTA */
.videoswipe-share-earn {
  margin: 10px 14px;
  padding: 11px 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
  text-decoration: none;
  width: calc(100% - 28px);
  transition: transform 150ms ease;
}
.videoswipe-share-earn:hover { transform: translateY(-1px); }
.videoswipe-share-earn-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.videoswipe-share-earn-body strong {
  display: block;
  font-weight: 600;
}
.videoswipe-share-earn-sub {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.75;
  display: block;
  margin-top: 2px;
}

/* Related videos */
.videoswipe-related-section {
  padding: 0 14px 14px;
}
.videoswipe-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #151515;
  margin-bottom: 10px;
}
.videoswipe-related-title {
  font-family: var(--font-body);
  font-size: var(--vt-meta);
  font-weight: var(--vw-semi);
  color: var(--vswp-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--vt-tracking-wide);
}
.videoswipe-related-more {
  font-size: 10px;
  color: var(--vswp-accent);
  cursor: pointer;
  text-decoration: none;
}
.videoswipe-related-more:hover { opacity: 0.8; }
.videoswipe-related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.videoswipe-related-card {
  display: flex;
  gap: 10px;
  padding: 5px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 150ms ease;
}
.videoswipe-related-card:hover { background: #111; }
.videoswipe-related-thumb {
  width: 50px;
  height: 88px;
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #1a1730;
}
.videoswipe-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.videoswipe-related-views {
  position: absolute;
  bottom: 3px;
  left: 3px;
  font-size: var(--vt-micro);
  font-weight: var(--vw-medium);
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 4px;
  border-radius: 2px;
  color: #bbb;
}
.videoswipe-related-info {
  flex: 1;
  padding-top: 2px;
  min-width: 0;
}
.videoswipe-related-title-text {
  font-family: var(--font-body);
  font-size: var(--vt-caption);
  font-weight: var(--vw-medium);
  color: #ddd;
  line-height: 1.4;
  letter-spacing: var(--vt-tracking-tight);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.videoswipe-related-meta {
  font-family: var(--font-body);
  font-size: var(--vt-meta);
  color: var(--vswp-text-muted);
  margin-top: 4px;
}

/* ============================================
   Responsive — fold to single column on tablet
   ============================================ */
@media (max-width: 1100px) {
  .videoswipe-layout {
    grid-template-columns: 160px minmax(0, 1fr) 180px;
  }
  .videoswipe-grid-feed {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  /* Single page: shrink right rail, keep left nav fixed */
  .videoswipe-layout--single .videoswipe-col-right { width: 260px; }
  .videoswipe-layout--single .videoswipe-col-center { margin-right: 260px; }
}

@media (max-width: 900px) {
  .videoswipe-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .videoswipe-col-left,
  .videoswipe-col-right {
    position: static;
    height: auto;
    border: none;
  }
  .videoswipe-col-left { order: 2; }
  .videoswipe-col-right { order: 3; }
  .videoswipe-col-center { order: 1; height: auto; max-height: none; }
  .videoswipe-left-nav { height: auto; }
  .videoswipe-grid-feed {
    overflow: visible;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    padding: 12px;
    gap: 8px;
  }
  .videoswipe-feed-heading { font-size: 18px; padding: 16px 12px 12px; }

  /* ── Single video PLAY PAGE on tablet/mobile ──
     Once the layout collapses to a single column we drop the upper
     "51X" + Home brand bar entirely (it was the desktop left rail
     stacked at the top). The Home action moves into the player itself
     as a TikTok-style floating circle. The right rail (creator card +
     Share & Earn) stacks below the player; only the Related Videos
     block is hidden because it's noisy on small screens. */
  .videoswipe-layout--single .videoswipe-col-left { display: none !important; }
  .videoswipe-layout--single .videoswipe-related-section { display: none !important; }

  .videoswipe-layout--single .videoswipe-col-right {
    position: static;
    width: 100%;
    height: auto;
    border-left: none;
  }
  .videoswipe-layout--single .videoswipe-col-center {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    height: auto;
    overflow: visible;
  }
  .videoswipe-layout--single .videoswipe-feed,
  .videoswipe-layout--single .videoswipe-feed--embedded,
  .videoswipe-layout--single .videoswipe-swiper,
  .videoswipe-layout--single .videoswipe-swiper-wrapper {
    height: auto;
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 100vw;
  }
  .videoswipe-player-wrap {
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  /* Player overlay home button — TikTok-style floating circle */
  .videoswipe-mobile-home-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 150ms ease;
  }
  .videoswipe-mobile-home-icon:hover { background: var(--vswp-accent); }
  .videoswipe-mobile-home-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Make room for the new home icon — the back arrow shifts right */
  .videoswipe-layout--single .videoswipe-player-top { padding-left: 60px; }
}

@media (max-width: 600px) {
  .videoswipe-grid-feed {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* On desktop (>900px) the floating mobile home icon is hidden — the
   left rail already provides Home navigation. The icon styles +
   visibility for ≤900px live inside the responsive block above. */
@media (min-width: 901px) {
  .videoswipe-mobile-home-icon { display: none; }
}
