/* ============================================================
   SnapFap — snapfap.to  (fresh build, Snapchat-style shell)
   Yellow #fffc00 accent · dark #121314 / #1e1e1e surfaces.
   ============================================================ */
:root {
  --snap:    #fffc00;
  --snap-dk: #e6e300;
  --bg:      #121314;
  --panel:   #1e1e1e;
  --panel2:  #262728;
  --line:    #303133;
  --txt:     #ffffff;
  --mut:     #9a9da1;
  --mut-dim: #6d7074;
  --ink:     #0b0b0c;   /* text on yellow */
  --hot:     #ff2d6f;   /* hookup accent */
  --nav-h:   58px;
  --dock-h:  60px;
  --maxw:    380px;     /* story column width */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Top nav bar ---------- */
.snapnav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  background: #16171a;   /* solid (no backdrop-filter): reliable on mobile GPUs */
  border-bottom: 1px solid var(--line);
}
.snapnav__left { display: flex; align-items: center; gap: 10px; }
.snapnav__menu { display: none; color: var(--txt); padding: 6px; margin: -6px 0 -6px -6px; border-radius: 10px; }
.snapnav__menu:hover { background: var(--panel); }

.ghost { display: inline-flex; align-items: center; gap: 9px; }
.ghost__ico {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; overflow: hidden;
}
.ghost__ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* transparent ghost logo (top bar) — show clean, not boxed like the app icon */
.ghost__ico--logo { border-radius: 0; overflow: visible; }
.ghost__ico--logo img { object-fit: contain; }
.ghost__name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.ghost__accent { color: var(--snap); }

.snapnav__links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.snapnav__link {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  color: var(--mut);
}
.snapnav__link:hover { color: var(--txt); background: var(--panel); }
.snapnav__link.on { color: var(--txt); }
.snapnav__link--hot { color: var(--hot); }
.snapnav__link--hot:hover { color: #fff; background: var(--hot); }

.snapnav__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.snapnav__search { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--txt); }
.snapnav__search:hover { background: var(--panel); }
.snapnav__cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--snap); color: var(--ink);
  font-weight: 800; font-size: 14.5px;
  padding: 9px 18px; border-radius: 999px;
}
.snapnav__cta:hover { background: var(--snap-dk); }

/* ---------- Main column ---------- */
.feedwrap {
  max-width: 620px; margin: 0 auto; padding: 22px 16px calc(var(--dock-h) + 40px);
}

/* Hero */
.explore { margin: 6px 0 22px; text-align: center; }
.explore__txt h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.explore__txt p { color: var(--mut); font-size: 15px; margin-top: 4px; }

/* Story feed — a single centered column of tall 9:16 cards */
.storyfeed { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.storycard {
  display: block;
  position: relative; width: min(100%, var(--maxw)); aspect-ratio: 9 / 16;
  background: var(--panel); border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.storycard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.storycard__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 60%, rgba(0,0,0,.6) 100%);
}
.storycard__head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 12px;
}
.storycard__av {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  color: var(--ink); background: var(--snap); border: 2px solid rgba(255,255,255,.85);
}
.storycard__by { min-width: 0; }
.storycard__name { font-weight: 700; font-size: 14px; line-height: 1.1; }
.storycard__more { font-size: 11.5px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 3px; }
.storycard__play {
  position: absolute; inset: 0; z-index: 2; margin: auto; width: 62px; height: 62px;
  display: grid; place-items: center; color: #fff;
  background: rgba(0,0,0,.32); border-radius: 50%; backdrop-filter: blur(2px);
  opacity: .92; transition: transform .15s ease;
}
.storycard:hover .storycard__play { transform: scale(1.08); }
.storycard__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 14px 14px;
  font-size: 13.5px; color: rgba(255,255,255,.92);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.storycard__badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  background: rgba(0,0,0,.5); color: #fff; padding: 3px 7px; border-radius: 6px;
}
.storycard--skel { background: linear-gradient(100deg, #1c1d1e 30%, #242526 50%, #1c1d1e 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.morebtn {
  display: inline-flex; align-items: center; gap: 8px; margin: 20px auto 6px; padding: 12px 22px;
  background: var(--snap); color: var(--ink); font-weight: 800; border-radius: 999px;
}
.morebtn:hover { background: var(--snap-dk); }
.feedwrap > .morebtn { display: flex; width: fit-content; }

/* Feature cells */
.promos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 34px 0 8px; }
.promos__cell { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.promos__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--panel2); color: var(--snap); margin-bottom: 8px; }
.promos__cell h3 { font-size: 15px; }
.promos__cell p { color: var(--mut); font-size: 13px; margin-top: 2px; }

.feedwrap__h2 { font-size: 19px; margin: 34px 0 14px; letter-spacing: -.01em; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-weight: 600; font-size: 14.5px;
}
.cat:hover { border-color: var(--snap); }
.cat em { color: var(--mut-dim); font-style: normal; font-size: 12.5px; }
.browse-all { display: inline-block; margin: 14px 0 0; color: var(--snap); font-weight: 700; font-size: 14px; }

/* ---------- Tag pages ---------- */
.crumbs { font-size: 13px; color: var(--mut-dim); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--mut); }
.crumbs a:hover { color: var(--txt); }
.taghead { margin-bottom: 20px; }
.taghead h1 { font-size: 26px; letter-spacing: -.02em; }
.taghead__sub { color: var(--mut); font-size: 15px; margin: 6px 0 14px; max-width: 640px; }
.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: block; cursor: pointer; }
.tile__thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--panel); }
.tile__img { width: 100%; height: 100%; object-fit: cover; }
.tile__badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 5px; }
.tile__badge b { color: var(--snap); }
.tile__play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.32); border-radius: 50%; }
.tile:hover .tile__play { background: rgba(0,0,0,.5); }
.tile__meta { padding: 7px 2px 0; }
.tile__cap { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__by { display: block; font-size: 12px; color: var(--mut); }
.morebtn--ghost { background: var(--panel); color: var(--txt); border: 1px solid var(--line); }
.morebtn--ghost:hover { border-color: var(--snap); background: var(--panel2); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 46px 0 24px; }
.notfound h1 { font-size: 74px; line-height: 1; color: var(--snap); letter-spacing: -.03em; }
.notfound p { color: var(--mut); font-size: 16px; margin: 10px 0 22px; }
.notfound .morebtn { margin: 6px; }

/* ---------- Legal / doc pages ---------- */
.legal { padding-top: 6px; }
.legal h1 { font-size: 28px; letter-spacing: -.02em; margin-bottom: 6px; }
.legal__meta { color: var(--mut-dim); font-size: 13px; margin-bottom: 22px; }
.legal__lede { color: var(--txt); font-size: 15.5px; margin-bottom: 10px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--mut); font-size: 14.5px; line-height: 1.65; }
.legal p { margin-bottom: 12px; }
.legal ul, .legal ol { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--snap); }
.legal strong { color: var(--txt); }

.pagecopy { margin: 34px 0 10px; color: var(--mut); }
.pagecopy h2 { color: var(--txt); font-size: 19px; margin-bottom: 10px; }
.pagecopy p { margin-bottom: 12px; font-size: 14.5px; }
.pagecopy a { color: var(--snap); }

.foot { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.foot__links a { color: var(--mut); font-size: 13.5px; }
.foot__links a:hover { color: var(--txt); }
.foot__copy { color: var(--mut-dim); font-size: 12.5px; }

/* ---------- Mobile bottom tab dock ---------- */
.tabdock { display: none; }
.tabdock__btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--mut); font-size: 10.5px; font-weight: 600; padding: 6px 0; min-width: 0;
}
.tabdock__btn.on { color: var(--txt); }
.tabdock__btn--hot { color: var(--hot); }
.tabdock__ghost { display: grid; place-items: center; width: 46px; height: 46px; margin-top: -18px; border-radius: 50%; background: var(--snap); color: var(--ink); border: 3px solid var(--bg); }

/* While a reel is open the bottom dock stays visible, so lift the reel's caption,
   action rail and ad copy above it. */
body.viewing .snap__info { bottom: var(--dock-h); padding-bottom: 10px; }
body.viewing .actions { bottom: calc(var(--dock-h) + 30px); }
body.viewing .promo { padding-bottom: calc(var(--dock-h) + 34px); }

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: 280px; max-width: 84vw;
  background: var(--panel); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .22s ease;
  display: flex; flex-direction: column; padding: 14px; overflow-y: auto;
}
body.drawer-open .drawer { transform: none; }
.drawer__brand { padding: 6px 8px 14px; }
.drawer__nav { display: flex; flex-direction: column; gap: 2px; }
.drawer__link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; color: var(--mut); }
.drawer__link.on, .drawer__link:hover { color: var(--txt); background: var(--panel2); }
.drawer__link--hot { color: var(--hot); }
.drawer__sec { margin-top: 16px; }
.drawer__label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut-dim); padding: 0 12px 8px; }
.drawer__pills { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 8px; }
.drawer__pill { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.drawer__pill:hover { border-color: var(--snap); }
.drawer__sec .browse-all { padding: 10px 12px 0; }

.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.55); }

/* ============================================================
   Reel viewer — full-screen vertical player (opens on card tap)
   ============================================================ */
.viewer { position: fixed; inset: 0; z-index: 80; background: #000; }
.viewer[hidden] { display: none; }
.viewer__bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6; height: var(--nav-h);
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,0));
  pointer-events: none;
}
.viewer__bar .ghost { pointer-events: auto; }
.viewer__backbtn { pointer-events: auto; }
.viewer__bar .viewer__backbtn { color: #fff; display: grid; place-items: center; width: 36px; height: 36px; margin-left: -6px; }
.viewer__back {
  position: absolute; top: 12px; left: 12px; z-index: 7; display: none;
  width: 40px; height: 40px; place-items: center; color: #fff;
  background: rgba(0,0,0,.4); border-radius: 50%;
}
.viewer__track {
  height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory;
  -ms-overflow-style: none; scrollbar-width: none;
}
.viewer__track::-webkit-scrollbar { display: none; }

/* Reel card (one clip / one ad) */
.snap {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden; background: #000;
}
.snap__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.snap__shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 55%, rgba(0,0,0,.72) 100%); }
.snap__badge { position: absolute; top: calc(var(--nav-h) + 6px); left: 14px; z-index: 3;
  font-size: 11px; font-weight: 800; background: rgba(0,0,0,.5); padding: 4px 8px; border-radius: 7px; }
.snap__badge b { color: var(--snap); }

.snap__info { position: absolute; left: 0; right: 74px; bottom: 0; z-index: 4; padding: 0 16px 22px; }
.snap__user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.snap__av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: var(--ink); background: var(--snap); border: 2px solid rgba(255,255,255,.8); }
.snap__handle { font-weight: 800; font-size: 15px; }
.snap__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip { font-size: 12.5px; color: var(--snap); }
.snap__cap { font-size: 14px; color: rgba(255,255,255,.94); }

/* Right action rail */
.actions { position: absolute; right: 8px; bottom: 22px; z-index: 5; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.actions__btn { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-size: 11.5px; font-weight: 600; }
.actions__btn svg path { transition: fill .15s ease; }
.actions__btn.liked svg path { fill: var(--hot); }

/* Double-tap heart burst */
.love { position: absolute; z-index: 6; transform: translate(-50%, -50%) scale(0); color: var(--hot); pointer-events: none; animation: lovepop .8s ease forwards; }
@keyframes lovepop {
  0% { transform: translate(-50%,-50%) scale(0) rotate(-12deg); opacity: 0; }
  15% { transform: translate(-50%,-50%) scale(1.15) rotate(-12deg); opacity: 1; }
  70% { transform: translate(-50%,-50%) scale(1) rotate(-12deg); opacity: 1; }
  100% { transform: translate(-50%,-55%) scale(1.05) rotate(-12deg); opacity: 0; }
}

/* ---------- In-feed ad card ---------- */
.snap--ad .promo__dim { position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 1; }
.promo { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 20px 18px 26px; text-align: left; }
.promo__tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); background: var(--snap); padding: 3px 8px; border-radius: 6px; margin-bottom: 10px; }
.promo__title { font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.promo__sub { color: rgba(255,255,255,.85); font-size: 14.5px; margin-top: 6px; }
.promo__btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 11px 20px;
  background: var(--snap); color: var(--ink); font-weight: 800; border-radius: 999px; }
.promo__btn:hover { background: var(--snap-dk); }

/* Live cam badge */
.promo__live { position: absolute; top: calc(var(--nav-h) + 6px); left: 14px; z-index: 5;
  display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800;
  background: rgba(0,0,0,.55); padding: 5px 10px; border-radius: 999px; }
.promo__live-dot { width: 8px; height: 8px; border-radius: 50%; background: #21d07a; box-shadow: 0 0 0 0 rgba(33,208,122,.7); animation: dotbeat 1.4s infinite; }
@keyframes dotbeat { 0% { box-shadow: 0 0 0 0 rgba(33,208,122,.7); } 70% { box-shadow: 0 0 0 7px rgba(33,208,122,0); } 100% { box-shadow: 0 0 0 0 rgba(33,208,122,0); } }
.promo__live-count { color: rgba(255,255,255,.8); font-weight: 600; }

/* Fake DM banner */
.promo__dm { position: absolute; top: calc(var(--nav-h) + 4px); left: 12px; right: 12px; z-index: 6;
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  background: rgba(30,31,32,.96); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0,0,0,.5); animation: dmin .45s ease; }
@keyframes dmin { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.promo__dm-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--snap); color: var(--ink); }
.promo__dm-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.promo__dm-txt b { font-size: 14px; }
.promo__dm-txt span { font-size: 12.5px; color: var(--mut); }
.promo__dm-go { margin-left: auto; font-size: 22px; color: var(--mut); }

/* ---------- Sound / unmute pill ---------- */
.mutepill {
  position: fixed; right: 14px; bottom: calc(var(--dock-h) + 16px); z-index: 85;
  display: none; align-items: center; gap: 7px; padding: 9px 12px;
  background: rgba(30,31,32,.94); border: 1px solid var(--line); border-radius: 999px; color: #fff; font-size: 13px; font-weight: 600;
}
.mutepill.up { display: inline-flex; }
.mutepill__x { margin-left: 3px; font-size: 16px; color: var(--mut); }

/* ---------- Toasts ---------- */
.snacks { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 82px); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.snack { pointer-events: auto; background: rgba(30,31,32,.96); border: 1px solid var(--line); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; opacity: 0; transform: translateY(10px); transition: .24s ease; box-shadow: 0 8px 26px rgba(0,0,0,.5); }
.snack.in { opacity: 1; transform: none; }
.snack kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 12px; }
.snack__x { margin-left: 8px; color: var(--mut); }

/* ---------- Share sheet ---------- */
.sendwrap { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s ease; }
.sendwrap.in { opacity: 1; }
.sendsheet { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 18px; transform: translateY(12px); transition: transform .2s ease; }
.sendwrap.in .sendsheet { transform: none; }
.sendsheet__title { font-weight: 800; font-size: 16px; margin-bottom: 14px; }
.sendsheet__row { display: flex; gap: 14px; margin-bottom: 14px; }
.senditem { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); }
.senditem__ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; }
.sendsheet__copy { display: flex; align-items: center; gap: 8px; width: 100%; justify-content: center; background: var(--panel2); border-radius: 12px; padding: 12px; font-weight: 700; margin-bottom: 8px; }
.sendsheet__cancel { width: 100%; padding: 12px; color: var(--mut); font-weight: 700; }

/* ============================================================
   Search overlay
   ============================================================ */
.seek { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; }
.seek[hidden] { display: none; }
.seek__bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.seek__ico { color: var(--mut); display: grid; place-items: center; }
.seek__in { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: #fff; padding: 11px 16px; font-size: 15px; outline: none; }
.seek__in:focus { border-color: var(--snap); }
.seek__x { color: var(--mut); font-weight: 700; padding: 6px 4px; }
.seek__tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 0; }
.seek__tag { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; }
.seek__tag:hover { border-color: var(--snap); }
.seek__body { flex: 1; overflow-y: auto; padding: 14px; }
.seek__hint { color: var(--mut); font-size: 14px; text-align: center; padding: 30px 0; }
.seek__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto; }
.result { display: block; }
.result__thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--panel); }
.result__img { width: 100%; height: 100%; object-fit: cover; }
.result__badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 5px; }
.result__badge b { color: var(--snap); }
.result__play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.32); border-radius: 50%; }
.result__meta { padding: 7px 2px 0; }
.result__title { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__stats { display: block; font-size: 12px; color: var(--mut); }

/* ============================================================
   Responsive — top bar collapses to hamburger + bottom dock < 900px
   ============================================================ */
@media (max-width: 900px) {
  .snapnav__menu { display: grid; place-items: center; }
  .snapnav__links { display: none; }
  .snapnav__cta span { display: none; }
  .snapnav__cta { padding: 9px; border-radius: 50%; }
  .tabdock {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 84;
    height: var(--dock-h);   /* plain fixed height — NO env(safe-area): unreliable on Android
                                (it caused both the squish and the double-height). The web viewport
                                already sits above the system nav, so bottom:0 is clean everywhere. */
    background: #16171a; border-top: 1px solid var(--line);
    transform: translateZ(0);   /* own compositor layer -> stable fixed bar on mobile */
  }
  /* dock stays visible over the reel; only search (its own full-screen UI) hides it */
  /* hide the bottom bar when search or the burger menu is open (they cover the screen) */
  body.seeking .tabdock, body.drawer-open .tabdock { display: none; }
}
@media (min-width: 901px) {
  .drawer, .scrim { display: none !important; }
  /* Center the reel in a phone-width 9:16 column so the overlays (info, badge,
     rail, ads) sit ON the video instead of at the screen edges. Keep the track a
     normal block (NOT flex) — every .snap child is absolutely positioned, so a
     flex column would shrink each slide to ~0 and stack them. margin auto centers
     the fixed-width column while height:100% + scroll-snap stay intact. */
  .snap { width: calc(100vh * 9 / 16); max-width: 100%; margin-inline: auto; }
  /* Show the bottom dock as a floating bar under the reel column while watching,
     so nav stays reachable even though the full-screen viewer covers the top bar. */
  body.viewing .tabdock {
    display: flex; position: fixed; left: 50%; transform: translateX(-50%) translateZ(0); bottom: 0;
    z-index: 84; height: var(--dock-h); width: min(440px, calc(100vh * 9 / 16));
    background: #1e1f22;
    border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0;
  }
}
