/*
Theme Name: AdultEmbed Swipe
Theme URI: https://adultembed.com/wordpress/
Author: AdultEmbed
Author URI: https://adultembed.com/
Description: Vertical swipe feed for adult video sites, like RedGIFs and TikTok: every video plays its clip full screen the moment it appears, swipe for the next one, double tap to like, the full video one tap away. Built for AdultEmbed Studio.
Version: 1.2.3
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adultembed-swipe
Tags: dark, one-column, custom-colors, custom-logo
Icons: Lucide (https://lucide.dev), ISC License, Copyright (c) Lucide Icons and Contributors
*/

:root {
  --accent: #fe2c55; --r: 14px; --bar: rgba(0, 0, 0, .55);
  --bg: #000; --text: #fff; --muted: rgba(255, 255, 255, .72); --faint: rgba(255, 255, 255, .14);
  --glass: rgba(22, 22, 26, .52); --top-h: 56px; --bar-h: calc(58px + env(safe-area-inset-bottom));
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
body.asw-is-feed { overflow: hidden; overscroll-behavior: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.asw-top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: calc(var(--top-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  background: linear-gradient(rgba(0, 0, 0, .62), rgba(0, 0, 0, 0)); pointer-events: none; }
.asw-is-page .asw-top { display: flex; justify-content: space-between; background: rgba(0, 0, 0, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--faint); }
.asw-top > * { pointer-events: auto; }
.asw-logo { justify-self: start; font-weight: 800; font-size: 18px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.asw-logo img { max-height: 28px; width: auto; }
.asw-logo .w2 { color: var(--accent); }
.custom-logo-link { justify-self: start; }
.custom-logo-link img { max-height: 28px; width: auto; display: block; }
.asw-tabs { display: flex; gap: 18px; font-weight: 700; font-size: 16px; }
@media (max-width: 899px) { .asw-is-feed .asw-top { grid-template-columns: 40px 1fr 40px; } .asw-is-feed .asw-logo, .asw-is-feed .custom-logo-link { visibility: hidden; width: 40px; } .asw-is-feed .asw-tabs { justify-self: center; } }
.asw-tabs a { position: relative; text-decoration: none; color: var(--muted); padding: 8px 0; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); transition: color .2s; }
.asw-tabs a[aria-current] { color: #fff; }
.asw-tabs a[aria-current]::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: #fff; }
.asw-top__btn { justify-self: end; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.asw-top__btn svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5)); }

body.admin-bar .asw-top { top: 32px; }
@media (max-width: 782px) { body.admin-bar .asw-top { top: 46px; } }
body.admin-bar .asw-page { padding-top: calc(var(--top-h) + env(safe-area-inset-top) + 48px); }
@media (max-width: 782px) { body.admin-bar .asw-page { padding-top: calc(var(--top-h) + env(safe-area-inset-top) + 62px); } #wpadminbar { position: fixed; } }

/* ---------- feed ---------- */
.asw-feed { position: fixed; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; background: #000; }
.asw-feed::-webkit-scrollbar { display: none; }
.asw-slide { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; contain: strict; }

/* blurred backdrop of the poster behind any letterboxing (RedGIFs-style) */
.asw-back { position: absolute; inset: -40px; background: #111 center / cover no-repeat; filter: blur(34px) saturate(1.3) brightness(.5); transform: scale(1.1); }

/* the stage: full screen on phones; on desktop the video's own shape, centred */
.asw-stage { position: absolute; inset: 0; }
.asw-media { position: absolute; inset: 0; overflow: hidden; }
.asw-media video, .asw-media img.asw-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.asw-media video { opacity: 0; transition: opacity .25s ease; }
.asw-slide.is-ready .asw-media video { opacity: 1; }
.asw-slide.is-fill .asw-media video, .asw-slide.is-fill .asw-media img.asw-poster { object-fit: cover; }
.asw-slide.is-kb .asw-poster { object-fit: cover; animation: asw-kb 7s ease-in-out infinite alternate; }
@keyframes asw-kb { from { transform: scale(1.02); } to { transform: scale(1.12) translateY(-1.5%); } }
.asw-tap { position: absolute; inset: 0; z-index: 2; cursor: pointer; touch-action: pan-y; }
.asw-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 3; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .28) 35%, rgba(0, 0, 0, .78)); }

/* buffering ring after a short delay (never flashes on a fast start) */
.asw-slide.is-buffering .asw-stage::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 4; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: asw-spin .8s linear infinite; }
@keyframes asw-spin { to { transform: rotate(360deg); } }

/* info, bottom left */
.asw-info { position: absolute; left: 14px; right: 86px; bottom: calc(var(--bar-h) + 26px); z-index: 5; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.asw-who { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 8px; font-weight: 700; font-size: 15px; text-decoration: none; }
.asw-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; font-weight: 800; text-transform: uppercase; text-shadow: none;
  background: hsl(var(--h, 340) 70% 52%); border: 2px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.asw-title { margin: 0 0 7px; font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asw-title a { text-decoration: none; }
.asw-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.asw-chips a { text-decoration: none; color: #fff; opacity: .9; }
.asw-chips a::before { content: '#'; opacity: .7; }
.asw-full { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; text-shadow: none;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .2s, transform .15s var(--ease); }
.asw-full:hover { background: var(--accent); border-color: var(--accent); }
.asw-full:active { transform: scale(.96); }
.asw-full svg { width: 15px; height: 15px; }
.asw-full span { font-weight: 600; opacity: .75; padding-left: 7px; margin-left: 2px; border-left: 1px solid rgba(255, 255, 255, .35); }

/* side rail, bottom right */
.asw-side { position: absolute; right: 8px; bottom: calc(var(--bar-h) + 30px); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.asw-act { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 56px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer;
  font-size: 12px; font-weight: 700; text-decoration: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.asw-act svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45)); transition: transform .2s var(--ease), color .2s; }
.asw-act:active svg { transform: scale(.86); }
.asw-act[data-asw="like"].is-on svg { color: var(--accent); }
.asw-act[data-asw="fav"].is-on svg { color: #ffc531; }
.asw-act.is-pop svg { animation: asw-pop .45s var(--ease); }
@keyframes asw-pop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }
.asw-act--stat { cursor: default; opacity: .9; }
.asw-act--stat svg { width: 26px; height: 26px; }

/* progress bar with time; drag to seek */
.asw-prog { position: absolute; left: 0; right: 0; bottom: var(--bar-h); z-index: 6; padding: 10px 14px 6px; display: flex; align-items: center; gap: 10px; }
.asw-prog__track { position: relative; flex: 1; height: 16px; cursor: pointer; touch-action: none; }
.asw-prog__track::before, .asw-prog__track i { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 3px; border-radius: 3px; }
.asw-prog__track::before { background: rgba(255, 255, 255, .25); }
.asw-prog__track i { background: #fff; transform-origin: left; transform: scaleX(0); }
.asw-prog__track b { position: absolute; top: 3px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .2s; }
.asw-prog__time { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.asw-slide.is-paused .asw-prog__track b, .asw-slide.is-paused .asw-prog__time, .asw-prog:hover .asw-prog__track b, .asw-prog:hover .asw-prog__time { opacity: 1; }
.asw-slide.is-paused .asw-prog__track::before, .asw-slide.is-paused .asw-prog__track i { height: 5px; top: 6px; }

/* tap feedback: play / pause flash, heart burst, 2x badge */
.asw-flash { position: absolute; left: 50%; top: 50%; z-index: 6; width: 76px; height: 76px; margin: -38px 0 0 -38px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .42); pointer-events: none; animation: asw-flash .65s ease forwards; }
.asw-flash svg { width: 36px; height: 36px; }
@keyframes asw-flash { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
.asw-slide.is-paused .asw-stage::before { content: ''; position: absolute; left: 50%; top: 50%; z-index: 4; width: 72px; height: 72px; margin: -36px 0 0 -36px; pointer-events: none; border-radius: 50%;
  background: rgba(0, 0, 0, .38) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='white'/%3E%3C/svg%3E") 56% 50% / 36px no-repeat; }
.asw-burst { position: absolute; z-index: 9; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; color: var(--accent); animation: asw-burst .9s var(--ease) forwards; }
.asw-burst svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); }
@keyframes asw-burst { 0% { opacity: 0; transform: scale(.3) rotate(var(--rot)); } 18% { opacity: 1; transform: scale(1.15) rotate(var(--rot)); } 34% { transform: scale(.95) rotate(var(--rot)); }
  70% { opacity: 1; transform: scale(1) translateY(-10px) rotate(var(--rot)); } 100% { opacity: 0; transform: scale(1.5) translateY(-90px) rotate(var(--rot)); } }
.asw-slide.is-fast .asw-stage::after { content: '2x \25B8\25B8'; position: absolute; top: calc(var(--top-h) + 14px); left: 50%; z-index: 6; transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 13px; font-weight: 700; }
.asw-playbadge { position: absolute; left: 50%; top: 50%; z-index: 3; width: 74px; height: 74px; margin: -37px 0 0 -37px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none; }
.asw-playbadge svg { width: 34px; height: 34px; margin-left: 4px; }

/* the tube's own player, in place, for videos without a clip */
.asw-media iframe.asw-embed { position: absolute; left: 0; right: 0; top: 50%; width: 100%; aspect-ratio: 16 / 9; height: auto; max-height: 100%; transform: translateY(-50%); border: 0; background: #000; z-index: 3; }
.asw-slide.is-embed .asw-tap, .asw-slide.is-embed .asw-shade, .asw-slide.is-embed .asw-playbadge { display: none; }
.asw-slide.is-embed .asw-poster { opacity: .25; }

/* sound: one button for the whole feed + a "tap for sound" hint once per visit */
.asw-sound { position: fixed; z-index: 31; top: calc(env(safe-area-inset-top) + var(--top-h) + 6px); right: 12px; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); cursor: pointer; }
.asw-sound svg { width: 22px; height: 22px; }
.asw-is-page .asw-sound { display: none; }
.asw-hint { position: fixed; z-index: 32; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border: 0; border-radius: 999px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-weight: 700; cursor: pointer;
  animation: asw-in .35s var(--ease); transition: opacity .35s, transform .35s; }
.asw-hint svg { width: 22px; height: 22px; }
.asw-hint.is-out { opacity: 0; transform: translate(-50%, -40%); }
@keyframes asw-in { from { opacity: 0; transform: translate(-50%, -30%); } }
.asw-toast { position: fixed; z-index: 50; left: 50%; bottom: calc(var(--bar-h) + 80px); transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: rgba(30, 30, 34, .95);
  font-weight: 600; font-size: 14px; animation: asw-in .3s var(--ease); transition: opacity .3s; }
.asw-toast.is-out { opacity: 0; }

/* ad slide + end of feed */
.asw-ad { display: grid; place-items: center; padding: calc(var(--top-h) + 20px) 14px calc(var(--bar-h) + 20px); background: radial-gradient(circle at 50% 40%, #1d1d22, #000 70%); }
.asw-ad__card { position: relative; max-width: 100%; }
.asw-ad__label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.asw-ad__box { display: grid; place-items: center; max-width: 100%; overflow: hidden; border-radius: var(--r); }
.asw-end { height: 100dvh; scroll-snap-align: start; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--muted); }

/* ---------- bottom bar ---------- */
.asw-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--bar-h); display: flex; justify-content: space-around; align-items: flex-start; padding: 7px 4px 0;
  background: var(--bar); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-top: 1px solid rgba(255, 255, 255, .08); }
/* Studio's cookie and ad blocker notices sit above the bar, never over it (2026-10-17) */
body #aes-cookie, body #aes-adblock { bottom: calc(var(--bar-h) + 10px); }   /* "body": Studio's front.css loads later */
.asw-bar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 60px; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--muted); transition: color .2s; }
.asw-bar a[aria-current] { color: #fff; }
.asw-bar svg { width: 25px; height: 25px; }
.asw-bar a[aria-current] svg path { stroke-width: 2.3; }
.asw-bar .asw-plus svg { width: 44px; height: 30px; margin-top: -5px; padding: 3px 0; border-radius: 9px; background: var(--accent); }   /* 5px taller than the other icons: raised so all labels line up */

/* ---------- ordinary pages: browse, search, watch page, favourites ---------- */
.asw-page { max-width: 1180px; margin: 0 auto; padding: calc(var(--top-h) + env(safe-area-inset-top) + 16px) 14px calc(var(--bar-h) + 28px); }
.asw-page h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 8px 0 14px; line-height: 1.25; }
.asw-page h2 { font-size: 18px; font-weight: 800; margin: 26px 0 12px; }
.asw-search { display: flex; gap: 8px; margin: 0 0 16px; }
.asw-search input { flex: 1; min-width: 0; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--faint); background: #141416; color: #fff; font: inherit; outline: none; transition: border-color .2s; }
.asw-search input:focus { border-color: rgba(255, 255, 255, .45); }
.asw-search button { padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent, #fff); font-weight: 700; cursor: pointer; }
.asw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .asw-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } }
.asw-tile { position: relative; display: block; aspect-ratio: 9 / 14; border-radius: calc(var(--r) / 1.4); overflow: hidden; background: #141416; text-decoration: none; isolation: isolate; }
.asw-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.asw-tile:hover img { transform: scale(1.05); }
.asw-tile::after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .8)); }
.asw-tile span { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 1; font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asw-chiprow { display: flex; gap: 8px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.asw-chiprow::-webkit-scrollbar { display: none; }
.asw-chiprow a { flex: none; padding: 7px 14px; border-radius: 999px; background: #18181b; border: 1px solid var(--faint); text-decoration: none; font-size: 14px; font-weight: 600; transition: background .2s; }
.asw-chiprow a:hover { background: #26262b; }
.asw-page .aes-player { border-radius: var(--r); overflow: hidden; }
.asw-page .asw-watch { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 9px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font-weight: 700; text-decoration: none; }
.asw-pages { display: flex; gap: 8px; justify-content: center; margin: 22px 0; }
.asw-pages a, .asw-pages span { min-width: 42px; padding: 9px 14px; text-align: center; border-radius: 999px; background: #18181b; border: 1px solid var(--faint); text-decoration: none; font-weight: 700; }
.asw-legal { font-size: 12px; color: var(--muted); text-align: center; margin: 28px 0 0; }
.asw-text { color: var(--muted); }
.aes-fav-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.aes-fav-list .asw-tile { aspect-ratio: 9 / 14; }

/* desktop: the video centred in its own shape, rail beside it, arrows on the right */
@media (min-width: 900px) {
  .asw-stage { inset: calc(var(--top-h) + 8px) auto 16px 50%; width: min(calc(100vw - 380px), calc((100dvh - var(--top-h) - 24px) * var(--ar, .5625))); transform: translateX(-50%); border-radius: var(--r); overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
  .asw-media video, .asw-media img.asw-poster { object-fit: cover; }
  .asw-slide.is-kb .asw-poster { object-fit: cover; }
  .asw-shade { left: 50%; width: min(calc(100vw - 380px), calc((100dvh - var(--top-h) - 24px) * var(--ar, .5625))); transform: translateX(-50%); bottom: 16px; border-radius: 0 0 var(--r) var(--r); }
  .asw-info { left: calc(50% - min(calc(100vw - 380px), calc((100dvh - var(--top-h) - 24px) * var(--ar, .5625))) / 2 + 18px); right: auto;
    width: min(460px, calc(min(calc(100vw - 380px), calc((100dvh - var(--top-h) - 24px) * var(--ar, .5625))) - 36px)); bottom: 44px; }
  .asw-side { right: auto; left: calc(50% + min(calc(100vw - 380px), calc((100dvh - var(--top-h) - 24px) * var(--ar, .5625))) / 2 + 14px); bottom: 28px; }
  .asw-act svg { width: 30px; height: 30px; }
  .asw-act { width: 56px; }
  .asw-act > svg { box-sizing: content-box; padding: 11px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
  .asw-act--stat > svg { padding: 13px; }
  .asw-prog { left: 50%; right: auto; bottom: 16px; width: min(calc(100vw - 380px), calc((100dvh - var(--top-h) - 24px) * var(--ar, .5625))); transform: translateX(-50%); }
  .asw-bar { display: none; }
  body #aes-cookie, body #aes-adblock { bottom: 12px; }                         /* no bar on wide screens */
  .asw-arrows { position: fixed; right: 26px; top: 50%; z-index: 31; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; }
  .asw-arrows button { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); cursor: pointer; transition: background .2s; }
  .asw-arrows button:hover { background: rgba(255, 255, 255, .22); }
  .asw-arrows svg { width: 24px; height: 24px; }
  .asw-sound { top: calc(50% + 66px); right: 29px; }
  .asw-media iframe.asw-embed { top: 0; transform: none; height: 100%; aspect-ratio: auto; }
  .asw-slide.is-embed .asw-stage { width: min(calc(100vw - 380px), calc((100dvh - var(--top-h) - 24px) * 1.7778)); }
}

/* ---------- watch page ---------- */
.asw-watch { max-width: 1100px; }
.asw-watch__player { margin: 0 -14px 14px; }
.asw-watch__player .aes-player { border-radius: 0; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
@media (min-width: 900px) { .asw-watch__player { margin: 0 0 18px; } .asw-watch__player .aes-player { border-radius: var(--r); } }
.asw-watch__title { margin: 4px 0 6px !important; font-size: 20px !important; line-height: 1.3 !important; }
.asw-watch__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 14px; color: var(--muted); font-size: 13px; font-weight: 600; }
.asw-watch__meta span + span::before { content: '·'; margin-right: 14px; opacity: .6; }
.asw-watch__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.asw-watch .aes-vote { display: inline-flex; align-items: center; gap: 0; margin: 0; padding: 0; border-radius: 999px; background: #1a1a1e; border: 1px solid var(--faint); overflow: hidden; }
.asw-watch .aes-vote__btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; background: none; color: #fff; font-weight: 700; cursor: pointer; }
.asw-watch .aes-vote__btn + .aes-vote__btn { border-left: 1px solid var(--faint); }
.asw-watch .aes-vote__btn:hover { background: #26262b; }
.asw-watch .aes-vote__btn.is-on, .asw-watch .aes-vote__btn[aria-pressed="true"] { color: var(--accent); }
.asw-watch .aes-vote__bar, .asw-watch .aes-vote__pct { display: none; }
.asw-watch .aes-fav, .asw-pillbtn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--faint); background: #1a1a1e; color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.asw-watch .aes-fav:hover, .asw-pillbtn:hover { background: #26262b; }
.asw-watch .aes-fav svg, .asw-pillbtn svg { width: 18px; height: 18px; }
.asw-watch .aes-fav svg path { fill: none; stroke: currentColor; stroke-width: 2; }
.asw-watch .aes-fav.is-on { color: var(--accent); border-color: var(--accent); }
.asw-watch .aes-fav.is-on svg path { fill: currentColor; }
.asw-pillbtn.is-accent { background: var(--accent); border-color: var(--accent); }
.asw-watch__who { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.asw-watch__who a { display: inline-flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 999px; background: #18181b; border: 1px solid var(--faint); text-decoration: none; font-weight: 700; }
.asw-watch__who .asw-av { width: 30px; height: 30px; font-size: 13px; border-width: 0; box-shadow: none; }
.asw-watch .asw-chiprow a { font-weight: 600; }

/* ---------- comments: watch page + bottom-sheet drawer on the feed ---------- */
.asw-comments { margin: 26px 0; }
.asw-comments__title { font-size: 16px !important; margin: 0 0 12px !important; }
.asw-comment-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.asw-comment-list .children { list-style: none; margin: 12px 0 0 42px; padding: 0; display: grid; gap: 12px; }
.asw-comment-list .comment-body { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; font-size: 14px; }
.asw-comment-list .comment-author { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.asw-comment-list .comment-author .avatar { width: 34px; height: 34px; border-radius: 50%; }
.asw-comment-list .says { display: none; }
.asw-comment-list .comment-meta { grid-column: 2; font-size: 12px; color: var(--muted); margin-top: -8px; }
.asw-comment-list .comment-meta a { text-decoration: none; }
.asw-comment-list .comment-body > p, .asw-comment-list .comment-content { grid-column: 2; margin: 2px 0; line-height: 1.45; }
.asw-comment-list .reply { grid-column: 2; font-size: 12px; font-weight: 700; }
.asw-comment-list .reply a { text-decoration: none; color: var(--muted); }
.asw-comments__empty { color: var(--muted); }
.asw-comments .comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin: 0; }
.asw-comments .comment-form > p { margin: 0; }
.asw-comments .comment-form .comment-form-comment { grid-column: 1; }
.asw-comments .comment-form .form-submit { grid-column: 2; }
.asw-comments .comment-form > :not(.comment-form-comment):not(.form-submit):not(.aes-comment-msg) { grid-column: 1 / -1; font-size: 13px; }
.asw-comments .comment-form .aes-comment-msg { grid-column: 1 / -1; }
.asw-comments textarea, .asw-comments input[type=text], .asw-comments input[type=email], .asw-comments input[type=url] { width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--faint); background: #18181b; color: #fff; font: inherit; resize: none; }
.asw-comments .asw-comments__send, .asw-comments input[type=submit] { padding: 11px 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font: inherit; font-weight: 700; cursor: pointer; }
.asw-sheet { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.asw-sheet__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.asw-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 72dvh; display: flex; flex-direction: column; padding: 8px 16px calc(14px + env(safe-area-inset-bottom));
  background: #121215; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.asw-sheet.is-open { pointer-events: auto; }
.asw-sheet.is-open .asw-sheet__shade { opacity: 1; }
.asw-sheet.is-open .asw-sheet__panel { transform: none; }
.asw-sheet__grip { width: 44px; height: 5px; margin: 2px auto 10px; border-radius: 3px; background: rgba(255, 255, 255, .25); cursor: grab; touch-action: none; padding: 6px 0; background-clip: content-box; }
.asw-sheet__x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 20px; cursor: pointer; }
.asw-sheet__body { overflow-y: auto; overscroll-behavior: contain; }
.asw-sheet__body .asw-comments { margin: 0; }
.asw-sheet__wait { color: var(--muted); padding: 30px 0; text-align: center; }
@media (min-width: 900px) { .asw-sheet__panel { left: auto; right: 24px; bottom: 24px; width: 420px; max-height: calc(100dvh - 120px); border-radius: 20px; } }

/* App-like page changes: a quick cross-fade between pages, the bars stay put */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
.asw-top { view-transition-name: asw-top; }
.asw-bar { view-transition-name: asw-bar; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

@media (prefers-reduced-motion: reduce) {
  .asw-slide.is-kb .asw-poster, .asw-burst, .asw-flash, .asw-act.is-pop svg { animation: none; }
}

/* ---------- creator profiles + creators list ---------- */
.asw-profile__head { display: flex; align-items: center; gap: 18px; margin: 6px 0 22px; }
.asw-profile__av { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; flex: none; }
.asw-profile__head h1 { margin: 0 0 4px !important; }
.asw-profile__meta { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.asw-profile__bio { margin: 8px 0 0; max-width: 60ch; }
.asw-creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.asw-creator { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; border-radius: var(--r); background: #141416; border: 1px solid var(--faint); text-decoration: none; text-align: center; transition: background .2s, transform .15s; }
.asw-creator:hover { background: #1c1c20; transform: translateY(-2px); }
.asw-creator .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.asw-creator span { font-size: 12px; color: var(--muted); }
.asw-chiprow a.is-strong { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }

/* report flag on each slide: quieter than the main actions */
.asw-act--small svg { width: 22px; height: 22px; opacity: .75; }

/* region-blocked tube video with no copy elsewhere */
.asw-slide.is-blocked .asw-poster { filter: grayscale(1) brightness(.4); }
.asw-blocked { position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); text-align: center; color: #fff; font-weight: 700; font-size: 16px; text-shadow: 0 1px 6px rgba(0,0,0,.7); }

.asw-legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 18px 16px 0; font-size: 12.5px; }
.asw-legal-links a { color: inherit; opacity: .7; text-decoration: none; }
.asw-legal-links a:hover { opacity: 1; text-decoration: underline; }

/* photo gallery slides (Pics) */
.asw-pics__strip { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.asw-pics__strip::-webkit-scrollbar { display: none; }
.asw-pics__strip figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; }
.asw-pics__strip img { max-width: 100%; max-height: 100%; object-fit: contain; }
.asw-pics__n { position: absolute; top: calc(env(safe-area-inset-top) + 64px); left: 50%; transform: translateX(-50%); z-index: 3; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font: 600 12.5px/1.4 system-ui, sans-serif; }
.asw-pics .asw-shade, .asw-pics .asw-info { pointer-events: none; }
.asw-pics .asw-info a { pointer-events: auto; }
.asw-tile { position: relative; }
.asw-tile__sponsor { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; }

/* Sound (1.2): a silent preview gives way to the full video with sound */
.asw-slide.is-embed .asw-media video, .asw-slide.is-embed .asw-prog { display: none; }
.asw-soundpill { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 999px;
  background: rgba(0, 0, 0, .72); color: #fff; font: 700 15px/1 system-ui, sans-serif; white-space: nowrap; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.asw-soundpill svg { width: 20px; height: 20px; flex: none; }
.asw-soundpill:hover { background: rgba(0, 0, 0, .86); }
.asw-is-page .asw-arrows, .asw-is-page .asw-hint { display: none; }

/* In-place pages (nav.js, 1.2): kept views; a thin bar while a new page loads; the bars stay put during the fade */
.asw-view[hidden] { display: none !important; }
body.asw-going::after { content: ""; position: fixed; z-index: 100; left: 0; top: 0; height: 2px; width: 40%; background: var(--accent); animation: asw-going 1s ease-in-out infinite; }
@keyframes asw-going { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
