/* The header offset belongs to sticky positioning, not the space after the hero. */
.hero + .explore-main { padding-top:0; }
@media (min-width:768px) {
  .hero { --hero-bottom:20px; }
  .hero-reel { bottom:var(--hero-bottom); }
}
@media (max-width:767px), (max-width:960px) and (max-height:500px) and (display-mode:standalone), (max-width:960px) and (max-height:500px) and (pointer:coarse) {
  html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  .tabbar { box-sizing:border-box; width:auto; grid-template-columns:repeat(5,minmax(0,1fr)); padding-inline:max(4px,env(safe-area-inset-left)) max(4px,env(safe-area-inset-right)); }
  .tabbar a { min-width:0; }
  .tabbar .tb-item span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .hero { height:clamp(380px,70svh,560px); min-height:0; --hero-x:max(14px,env(safe-area-inset-left)); }
  .hero-reel { --tw:clamp(56px,16vw,76px); bottom:8px; max-width:calc(100% - 28px); grid-template-columns:minmax(0,calc(var(--tw) * 3.3)) 38px; }
  .hero-copy { bottom:calc(clamp(56px,16vw,76px) * 1.78 + 32px); }
  .hero-title { font-size:clamp(27px,8vw,44px); }
  .hero-hook-row { width:100%; }
  .hero-actions { position:static; margin-top:10px; }
  .hero-begin { width:auto; height:38px; padding-inline:18px; }
  .hero-hook { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
}
@media (display-mode:standalone) and (max-width:960px) {
  .topbar { padding-top:env(safe-area-inset-top); height:calc(var(--topbar-h,56px) + env(safe-area-inset-top)); }
  .story-history-scroll { scroll-padding-bottom:env(safe-area-inset-bottom); }
}
.phone-feed,.feed-tools,.feed-hint,.phone-recs,.phone-settings,.phone-fan { display:none }
@media(max-width:767px), (max-width:960px) and (max-height:500px) and (display-mode:standalone), (max-width:960px) and (max-height:500px) and (pointer:coarse){
 .tabbar{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));height:60px;max-width:460px;margin-inline:auto;display:flex;gap:9px;align-items:stretch;padding:0;background:none;border:0;backdrop-filter:none;pointer-events:none}
 .tabbar .tb-group,.tabbar .tb-create{pointer-events:auto;background:linear-gradient(165deg,#403e3eda,#181719da 75%);border:1px solid #ffffff57;box-shadow:inset 0 1px #ffffff28,0 5px 18px #0005;backdrop-filter:blur(16px)}
 .tb-group{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:3px;border-radius:40px}
 .tabbar .tb-item{height:100%;border-radius:30px;color:#dfdcde;gap:3px}
 .tabbar .tb-item[aria-current=page]{color:#ff4c87;background:#ffffff1e;box-shadow:inset 0 0 0 1px #ffffff36}
 .tabbar .tb-create{align-self:center;flex:none;width:58px;height:58px;border-radius:50%;color:#ff4c87}
 .tabbar .tb-create svg{width:29px;height:29px}
 body.has-tabbar{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
 .phone-home:has(.phone-feed){overflow:hidden}
 .phone-home:has(.phone-feed) :is(#hero,#main,.topbar,footer),.phone-explore #hero{display:none}
 .phone-feed{display:block;position:fixed;inset:0;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:contain;scrollbar-width:none;background:#090909}
 .feed-slide{position:relative;width:100%;height:100%;scroll-snap-align:start;scroll-snap-stop:always;isolation:isolate;overflow:hidden}
 .feed-slide>.feed-poster,.feed-slide>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 35%}
 .feed-slide>video{z-index:1;opacity:0}.feed-slide>video.playing{opacity:1}
 .feed-slide:after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(0deg,#000 0%,#000c 13%,transparent 58%,#0004 100%)}
 .feed-info{position:absolute;z-index:3;inset-inline:16px;bottom:calc(88px + env(safe-area-inset-bottom));color:#fff;text-align:start}
 .feed-info header,.feed-by{display:flex;align-items:center;gap:8px}.feed-info h1{font-size:22px;line-height:1.12;margin:0;overflow-wrap:anywhere}.feed-info small{color:#ff9a54;font-weight:700}.feed-play{margin-inline-start:auto;flex:none;padding:8px 15px;background:#bb2b60;color:#fff;border-radius:24px;text-decoration:none;font-weight:800;font-size:14px}
 .feed-by{font-size:13px;margin:11px 0;color:#ddd}.feed-by img{width:20px;height:20px;border-radius:50%;object-fit:cover}.feed-by em{background:#681831;padding:2px 7px;font-style:normal;border-radius:4px;color:#fff}
 .feed-blurb{border:0;color:#eee;background:none;font:inherit;font-size:15px;line-height:1.5;text-align:start;padding:0;width:100%;display:flex;align-items:end;gap:6px}.feed-blurb span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.feed-blurb[aria-expanded=true] span{-webkit-line-clamp:unset;max-height:30dvh;overflow:auto}.feed-blurb b{margin-inline-start:auto}
 .feed-tools{position:fixed;z-index:6;top:max(10px,env(safe-area-inset-top));inset-inline:14px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}
 .feed-tools div,.feed-tools button{pointer-events:auto;color:white;background:#18171aca;border:0;border-radius:24px;padding:10px 13px;font:inherit;font-size:13px;backdrop-filter:blur(12px)}.feed-tools a{color:inherit;text-decoration:none}.feed-tools a+a{border-inline-start:1px solid #ffffff44;margin-inline-start:9px;padding-inline-start:9px}.feed-tools button[aria-pressed=true]{color:#ff79a7}
 .feed-hint{display:grid;place-items:center;gap:5px;position:fixed;inset:37% 0 auto;z-index:5;color:white;text-shadow:0 2px 8px #000;font-weight:bold;pointer-events:none}.feed-hint b{font-size:35px}
 .phone-explore .topbar{background:#0b0b0c}.phone-explore .wordmark,.phone-explore .me-avatar{display:none}.phone-explore .search-slot{padding:0}.phone-explore .search-form,.phone-explore .search-form:focus-within{position:static;width:100%;background:#19191b}.phone-explore .search-form input{width:100%;min-width:0}.phone-explore #main{padding:calc(62px + env(safe-area-inset-top)) 7px 88px}.phone-explore .explore-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .phone-recs{display:block;padding:4px 5px 12px}.phone-recs>strong{font-size:12px}.phone-recs>div{display:flex;gap:16px;overflow:auto;scrollbar-width:none;padding:8px 0}.phone-recs a{flex:0 0 56px;min-width:0;color:inherit;text-decoration:none;text-align:center;font-size:12px}.phone-recs img{width:56px;height:56px;border-radius:50%;object-fit:cover;object-position:center 24%}.phone-recs span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .phone-explore .discover-head{height:46px}.phone-explore .card{border-radius:8px}
 body:has(#sort)>.topbar,body:has(.phone-settings)>.topbar{display:none}body:has(#sort) .pg{padding:calc(20px + env(safe-area-inset-top)) 16px 82px}.hist-grid{display:block}.hist-grid li:not(.pg-empty){border-bottom:1px solid #ffffff12;padding:9px 0}.hist-grid li>a{display:grid;grid-template-columns:58px 1fr;align-items:center;gap:2px 12px}.hist-grid li .ph{grid-row:span 3;width:58px;height:80px;margin:0;border-radius:8px}.hist-grid li>a>b,.hist-grid li>a>small,.hist-grid li>a>.rd{margin:0}
 .phone-settings{display:grid;place-items:center;position:absolute;top:max(14px,env(safe-area-inset-top));right:14px;z-index:4;width:40px;height:40px;border-radius:12px;background:#151416bd;color:white;text-decoration:none;font-size:20px}
 body:has(.phone-settings) #app{padding:0 14px 84px}.pf-hero{margin-inline:-14px;padding:130px 14px 12px;height:auto;min-height:250px}.pf-id{position:relative;inset:auto;background:#171617ee;border:1px solid #ffffff22;border-radius:15px;padding:14px;display:flex;gap:8px}.pf-id h1{font-size:clamp(18px,5vw,26px);overflow-wrap:anywhere}.pf-id .pf-btn{font-size:12px}.pf-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.pf-stat{min-height:0;padding:10px 4px;background:none;border:0}.pf-stat b{font-size:24px}.pf-bells{grid-column:1/-1;background:#181719;padding:16px;border-radius:15px}.pf-bonds{display:flex;overflow:auto}.pf-bond{flex:0 0 112px}
 .cr-wall,.cr-top .cr-wm,.cr-top .cr-sep{display:none}.cr-top .cr-crumb{position:absolute;left:50%;transform:translateX(-50%)}.cr-start{display:block}.cr-start-main{margin:0 auto;padding:26px 16px}.cr-start-main h1,.cr-start-main>.cr-sub{text-align:center}.cr-start-main h1{font-size:26px}.phone-fan{display:block;position:relative;height:105px;margin:24px 0 0;overflow:hidden}.phone-fan img{position:absolute;width:23%;height:135px;object-fit:cover;object-position:center 25%;top:8px;left:calc(38.5% + var(--i)*18%);transform:rotate(calc(var(--i)*6deg));border:1px solid #fff3;border-radius:10px}.cr-spark{position:relative;margin-top:-4px}
 .page-skeleton .sk-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.page-skeleton .sk-card{aspect-ratio:1/1.85}
}
@media(max-width:767px), (max-width:960px) and (max-height:500px) and (display-mode:standalone), (max-width:960px) and (max-height:500px) and (pointer:coarse){
 .page-skeleton.sk-explore{padding:12px 7px 0}.sk-search{height:39px;border-radius:24px;background:#202022;margin:0 5px 25px}.sk-profiles{display:flex;gap:14px;margin:0 6px 32px}.sk-profiles i{width:56px;aspect-ratio:1;border-radius:50%;background:#1c1b1d}.sk-explore .sk-tabs{padding:0 5px}.sk-explore .sk-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 body:has(.sk-explore) .tabbar{z-index:2147483601}
}
@media(max-width:767px), (max-width:960px) and (max-height:500px) and (display-mode:standalone), (max-width:960px) and (max-height:500px) and (pointer:coarse){
 .feed-tools select{font:inherit;color:inherit;max-width:9em;border:0;border-inline-start:1px solid #fff4;background:transparent;margin-inline-start:9px;padding-inline:8px 0}.feed-tools option{color:white;background:#202022}
}

:root {
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-safe-left: env(safe-area-inset-left, 0px);
  --app-safe-right: env(safe-area-inset-right, 0px);
}
@media (max-width:767px), (max-width:960px) and (max-height:500px) and (display-mode:standalone), (max-width:960px) and (max-height:500px) and (pointer:coarse) {
  body.has-tabbar {
    --dock-bottom: calc(10px + var(--app-safe-bottom));
    --dock-height: 60px;
    --dock-clearance: calc(var(--dock-bottom) + var(--dock-height) + 14px);
    padding-bottom: var(--dock-clearance);
  }
  .tabbar {
    position: fixed;
    z-index: 60;
    left: calc(12px + var(--app-safe-left));
    right: calc(12px + var(--app-safe-right));
    bottom: var(--dock-bottom);
    height: var(--dock-height);
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  .tabbar svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tabbar .tb-item span {
    font-size: 10px;
    font-weight: 700;
  }
  .feed-info {
    left: calc(16px + var(--app-safe-left));
    right: calc(16px + var(--app-safe-right));
    bottom: var(--dock-clearance, 84px);
  }
  .feed-info header h1 { min-width: 0; }
  .feed-info small { flex-shrink: 0; }
  .feed-tools {
    top: calc(10px + var(--app-safe-top));
    left: calc(14px + var(--app-safe-left));
    right: calc(14px + var(--app-safe-right));
  }
  .phone-explore .topbar, .cr-top {
    padding-left: calc(12px + var(--app-safe-left));
    padding-right: calc(12px + var(--app-safe-right));
  }
  .phone-explore #main {
    padding-left: calc(7px + var(--app-safe-left));
    padding-right: calc(7px + var(--app-safe-right));
    padding-bottom: 12px;
  }
  body:has(#sort) .pg, body:has(.phone-settings) #app {
    padding-left: calc(16px + var(--app-safe-left));
    padding-right: calc(16px + var(--app-safe-right));
    padding-bottom: 12px;
  }
  .phone-settings {
    top: calc(14px + var(--app-safe-top));
    right: calc(14px + var(--app-safe-right));
  }
  .phone-explore #headerSearchInput,
  .cr-start-main textarea,
  .cr-form :is(input,textarea),
  .room :is(input,textarea) {
    font-size: max(16px, 1rem);
  }
  html[data-soft-keyboard] .tabbar { visibility: hidden; }
  html[data-soft-keyboard] .room { height: var(--app-visible-height, 100dvh); }
}
@media (max-width:960px) and (max-height:500px) and (display-mode:standalone), (max-width:960px) and (max-height:500px) and (pointer:coarse) {
  body.has-tabbar { --dock-height: 46px; }
  .tabbar .tb-create { width: 46px; height: 46px; }
  .tabbar svg { width: 19px; height: 19px; }
  .feed-by { margin-block: 5px; }
  .feed-info h1 { font-size: 18px; }
  .feed-blurb { font-size: 13px; }
}

/* Public app information renders without JavaScript or an account. */
.app-intro {
  position: absolute;
  z-index: 6;
  top: calc(76px + env(safe-area-inset-top, 0px));
  inset-inline-start: var(--gutter, 24px);
  max-inline-size: min(420px, calc(100% - 32px));
  padding: 10px 14px;
  border-radius: 12px;
  background: #101014e8;
  color: #eee;
  line-height: 1.35;
  font-size: .8rem;
}
.app-intro h1 { margin: 0; font-size: 1rem; }
.app-intro p { margin: .3rem 0; }
.app-intro nav { display: flex; flex-wrap: wrap; gap: .35rem .8rem; }
.app-intro a { color: #ffd2e1; text-decoration: underline; }
@media (max-width:767px), (max-width:960px) and (max-height:500px) and (pointer:coarse), (max-width:960px) and (max-height:500px) and (display-mode:standalone) {
  .phone-home .app-intro { position: fixed; top: calc(59px + env(safe-area-inset-top, 0px)); inset-inline-start: max(14px, env(safe-area-inset-left, 0px)); }
  .phone-explore .app-intro { position: relative; inset: auto; margin: calc(64px + env(safe-area-inset-top, 0px)) 12px 0; }
  .phone-explore .app-intro ~ #main { padding-top: 8px; }
}
