/* FansFlex v9.5 — Story tray, viewer and profile highlights.
   Route-scoped visual refinement for the existing production Stories flow.
   Story media, text presets, progress timing, tap zones, sharing, replies,
   report/delete/pin controls and access rules remain owned by StoriesSwiper. */

body.fansflex-app:is(.ff-route-feed,.ff-route-profile) {
  --ff95-ink:#173a59;
  --ff95-muted:#627f99;
  --ff95-edge:rgba(87,132,174,.38);
  --ff95-edge-strong:rgba(55,115,165,.62);
  --ff95-highlight:rgba(255,255,255,.96);
  --ff95-metal:linear-gradient(136deg,#ffffff 0%,#edf5fc 24%,#d6e6f5 46%,#fbfdff 64%,#e0edf8 100%);
  --ff95-metal-soft:linear-gradient(145deg,#fbfdff 0%,#e8f2fb 54%,#f8fbff 100%);
  --ff95-shadow:0 3px 8px rgba(20,59,98,.075),0 13px 28px rgba(25,76,124,.11),inset 0 1px 0 rgba(255,255,255,.98);
  --ff95-shadow-raised:0 7px 16px rgba(17,55,94,.12),0 22px 42px rgba(25,74,122,.16),inset 0 1px 0 rgba(255,255,255,.98);
  --ff95-blue:#17639e;
  --ff95-gold:#c89a4d;
  --ff95-avatar-border:#f8fbff;
}

html[data-bs-theme="dark"] body.fansflex-app:is(.ff-route-feed,.ff-route-profile),
html[data-theme="dark"] body.fansflex-app:is(.ff-route-feed,.ff-route-profile) {
  --ff95-ink:#edf6ff;
  --ff95-muted:#a8c1d6;
  --ff95-edge:rgba(137,185,220,.42);
  --ff95-edge-strong:rgba(151,207,244,.68);
  --ff95-highlight:rgba(230,246,255,.18);
  --ff95-metal:linear-gradient(137deg,#29475f 0%,#10283d 25%,#1b3b55 47%,#0d2337 70%,#18364e 100%);
  --ff95-metal-soft:linear-gradient(145deg,#18364e 0%,#0d2438 54%,#17354d 100%);
  --ff95-shadow:0 3px 8px rgba(0,5,15,.38),0 15px 32px rgba(0,6,17,.32),inset 0 1px 0 rgba(233,247,255,.14);
  --ff95-shadow-raised:0 8px 18px rgba(0,5,15,.45),0 24px 46px rgba(0,5,16,.39),inset 0 1px 0 rgba(233,247,255,.19);
  --ff95-blue:#82c8f4;
  --ff95-gold:#e0b96f;
  --ff95-avatar-border:#10283d;
}

/* ================================================================
   FEED STORY TRAY — satin steel rail with clear seen/unseen states
   ================================================================ */
body.fansflex-app.ff-route-feed #stories-swiper {
  position:relative;
  min-width:0;
  margin:3px 0 12px;
  padding:13px 13px 9px;
  border:1px solid var(--ff95-edge)!important;
  border-radius:17px!important;
  background:var(--ff95-metal)!important;
  box-shadow:var(--ff95-shadow)!important;
  overflow:hidden!important;
  isolation:isolate;
}
body.fansflex-app.ff-route-feed #stories-swiper::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0 0 auto;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--ff95-highlight),transparent);
  pointer-events:none;
}
body.fansflex-app.ff-route-feed #stories-swiper .swiper-wrapper {
  align-items:flex-start;
  padding:2px 1px 5px;
}
body.fansflex-app.ff-route-feed #stories-swiper .swiper-slide.story-thumb {
  width:82px!important;
  min-width:82px;
  flex:0 0 82px;
  height:auto;
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-inner {
  width:100%;
  min-height:100px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1px;
  padding:1px 2px 3px;
  border-radius:13px;
  color:var(--ff95-ink);
  transition:transform .18s ease,filter .18s ease;
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb:not(.story-thumb-add) .story-thumb-inner:hover {
  transform:translateY(-2px);
  filter:drop-shadow(0 5px 8px rgba(24,74,119,.12));
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-avatar-wrap {
  position:relative;
  width:70px!important;
  height:70px!important;
  flex:0 0 70px;
  padding:3px!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:50%;
  background:linear-gradient(135deg,#f8e7bd 0%,#b78339 15%,#83c8f1 38%,#236b9e 72%,#f2d18d 100%)!important;
  box-shadow:0 4px 11px rgba(17,61,100,.18),inset 0 1px 1px rgba(255,255,255,.72);
  overflow:visible;
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-avatar {
  display:block;
  width:100%;
  height:100%;
  border:2px solid var(--ff95-avatar-border)!important;
  border-radius:50%;
  background:#9bb4c9;
  object-fit:cover;
  box-shadow:0 1px 3px rgba(0,0,0,.16);
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb.story-thumb-unseen .story-thumb-avatar-wrap {
  background:conic-gradient(from 18deg,#f5d99a 0deg,#2e83bd 72deg,#79c6ef 158deg,#235d91 244deg,#e9c77e 330deg,#f5d99a 360deg)!important;
  box-shadow:0 0 0 1px rgba(35,112,168,.12),0 5px 14px rgba(29,100,155,.19),inset 0 1px rgba(255,255,255,.7);
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb.story-thumb-seen .story-thumb-avatar-wrap {
  background:linear-gradient(145deg,#dce5ed,#aebdca 52%,#e9eff4)!important;
  border-color:rgba(255,255,255,.85)!important;
  box-shadow:0 2px 7px rgba(34,61,83,.10),inset 0 1px rgba(255,255,255,.9);
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb.story-thumb-seen .story-thumb-name {
  opacity:.76;
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-name {
  width:100%;
  max-width:78px!important;
  margin-top:6px!important;
  color:var(--ff95-ink)!important;
  font-size:.72rem!important;
  font-weight:700;
  line-height:1.25;
  letter-spacing:-.01em;
  text-align:center;
  text-shadow:0 1px rgba(255,255,255,.35);
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-add .story-thumb-avatar-wrap {
  border:1px solid var(--ff95-edge-strong)!important;
  background:linear-gradient(145deg,#ffffff 0%,#e4edf6 48%,#cbd9e6 100%)!important;
  box-shadow:0 4px 12px rgba(22,67,105,.16),inset 0 1px rgba(255,255,255,.98);
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-add .story-thumb-avatar {
  border-color:#f9fcff!important;
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-add-badge {
  right:-3px!important;
  bottom:-2px!important;
  width:25px!important;
  height:25px!important;
  border:2px solid #f7fbff!important;
  border-radius:50%;
  background:linear-gradient(180deg,#fff0bd 0%,#e8c477 48%,#b98234 100%)!important;
  color:#253c50!important;
  font-size:19px!important;
  font-weight:800;
  line-height:1;
  box-shadow:0 3px 9px rgba(119,81,28,.26),inset 0 1px rgba(255,255,255,.85)!important;
}
body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-add .story-thumb-name {
  font-weight:800;
}
body.fansflex-app.ff-route-feed #stories-swiper .stories-swiper-skeleton {
  gap:9px;
  padding:1px 2px 5px;
}
body.fansflex-app.ff-route-feed #stories-swiper .stories-swiper-skeleton__item {
  width:82px;
  min-width:82px;
}
body.fansflex-app.ff-route-feed #stories-swiper .stories-swiper-skeleton__ring {
  width:70px;
  height:70px;
  padding:3px;
  background:linear-gradient(135deg,#f4dfb4,#4b9bc9 48%,#d7b56d)!important;
  box-shadow:0 4px 10px rgba(19,63,101,.11);
}
body.fansflex-app.ff-route-feed #stories-swiper .stories-swiper-skeleton__avatar {
  border-color:var(--ff95-avatar-border);
  background:linear-gradient(110deg,rgba(136,164,187,.18) 8%,rgba(174,198,217,.34) 18%,rgba(136,164,187,.18) 33%);
  background-size:220% 100%;
}
body.fansflex-app.ff-route-feed #stories-swiper .stories-swiper-skeleton__line {
  height:8px;
  border-radius:99px;
  background:linear-gradient(90deg,rgba(117,151,179,.15),rgba(117,151,179,.34),rgba(117,151,179,.15));
  background-size:220% 100%;
}

/* ================================================================
   PROFILE HIGHLIGHTS — pinned story shelf and profile story ring
   ================================================================ */
body.fansflex-app.ff-route-profile .profile-avatar-wrap.profile-has-stories::before {
  inset:-5px!important;
  background:conic-gradient(from 18deg,#f5d99a 0deg,#2e83bd 72deg,#79c6ef 158deg,#235d91 244deg,#e9c77e 330deg,#f5d99a 360deg)!important;
  box-shadow:0 3px 11px rgba(23,87,139,.22);
}
body.fansflex-app.ff-route-profile .profile-avatar-wrap.profile-has-stories.profile-stories-seen::before {
  background:linear-gradient(145deg,#dce5ed,#aebdca 52%,#e9eff4)!important;
  box-shadow:0 2px 7px rgba(34,61,83,.12);
}
body.fansflex-app.ff-route-profile .profile-avatar-wrap .profile-avatar-img {
  border-color:var(--ff95-avatar-border)!important;
  box-shadow:0 1px 4px rgba(4,20,35,.18);
}
body.fansflex-app.ff-route-profile #profile-highlights {
  position:relative;
  margin:12px 14px 16px!important;
  padding:11px 0 12px;
  border:1px solid var(--ff95-edge)!important;
  border-radius:16px!important;
  background:var(--ff95-metal)!important;
  color:var(--ff95-ink)!important;
  box-shadow:var(--ff95-shadow)!important;
  overflow:hidden;
}
body.fansflex-app.ff-route-profile #profile-highlights::before {
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--ff95-highlight),transparent);
  pointer-events:none;
}
body.fansflex-app.ff-route-profile #profile-highlights > .d-flex {
  padding:2px 16px 8px!important;
}
body.fansflex-app.ff-route-profile #profile-highlights > .d-flex > div {
  color:var(--ff95-muted)!important;
  font-size:.66rem!important;
  font-weight:850!important;
  letter-spacing:.17em;
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlights-swiper {
  min-width:0;
  padding:1px 15px 3px;
  overflow:hidden;
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlights-swiper .swiper-wrapper {
  align-items:flex-start;
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlights-swiper .swiper-slide {
  width:78px!important;
  min-width:78px;
}
/* v9.1 profile surfaces styled every Swiper slide as a card; highlights are
   intentionally a clean circular shelf inside the single parent panel. */
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlights-swiper .swiper-slide {
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlight-item {
  width:76px!important;
  min-height:88px;
  padding:2px 3px 3px;
  border-radius:13px;
  transition:transform .18s ease,filter .18s ease;
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlight-item:hover {
  transform:translateY(-2px);
  filter:drop-shadow(0 5px 8px rgba(22,73,116,.13));
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlight-circle {
  width:66px!important;
  height:66px!important;
  padding:3px;
  border:1px solid rgba(255,255,255,.84)!important;
  background:linear-gradient(135deg,#f4dfb4 0%,#4d9cc8 44%,#1e5e91 72%,#d7b56d 100%)!important;
  box-shadow:0 4px 12px rgba(20,65,105,.16),inset 0 1px rgba(255,255,255,.9);
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlight-circle img {
  border:2px solid var(--ff95-avatar-border);
  border-radius:50%;
  background:#9bb4c9;
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlight-label {
  max-width:70px!important;
  margin-top:7px!important;
  color:var(--ff95-muted)!important;
  font-size:.62rem!important;
  font-weight:800;
  letter-spacing:.08em;
  line-height:1.2;
  text-transform:uppercase;
}
body.fansflex-app.ff-route-profile #profile-highlights .profile-highlights-skeleton {
  padding-inline:15px;
}
body.fansflex-app.ff-route-profile #profile-highlights .stories-swiper-skeleton__item {
  width:78px;
  min-width:78px;
}
body.fansflex-app.ff-route-profile #profile-highlights .stories-swiper-skeleton__ring {
  width:66px;
  height:66px;
  padding:3px;
  background:linear-gradient(135deg,#f4dfb4,#4d9cc8 52%,#d7b56d)!important;
}
body.fansflex-app.ff-route-profile #profile-highlights .stories-swiper-skeleton__avatar {
  border-color:var(--ff95-avatar-border);
}
body.fansflex-app.ff-route-profile #profile-highlights .stories-swiper-skeleton__name {
  width:56px;
}

/* ================================================================
   STORY VIEWER — cinematic stage, polished controls, unchanged media
   ================================================================ */
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay {
  z-index:1065;
  color:#fff;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-backdrop {
  background:radial-gradient(ellipse at 50% 44%,rgba(22,57,83,.42),rgba(1,8,15,.92) 68%),rgba(1,8,15,.90);
  backdrop-filter:blur(9px) saturate(1.12);
  -webkit-backdrop-filter:blur(9px) saturate(1.12);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer {
  padding:24px;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-inner {
  width:min(468px,calc(100vw - 72px))!important;
  height:min(840px,calc(100dvh - 48px))!important;
  max-height:calc(100dvh - 48px)!important;
  border:1px solid rgba(157,204,235,.62);
  border-radius:25px!important;
  background:linear-gradient(145deg,#284961,#071a2a 42%,#16364f);
  box-shadow:0 30px 90px rgba(0,0,0,.58),0 0 0 1px rgba(236,248,255,.08),inset 0 1px rgba(239,249,255,.23);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-swiper {
  border:1px solid rgba(210,233,248,.12);
  border-radius:24px!important;
  background:#071725;
  box-shadow:inset 0 1px rgba(255,255,255,.08);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-progress-wrap {
  gap:5px;
  padding:3px 1px 12px;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .story-progress-bar {
  height:3px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.27);
  box-shadow:0 1px 2px rgba(0,0,0,.18);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .story-progress-fill {
  background:linear-gradient(90deg,#f0d28e 0%,#fff2ca 24%,#8bd1fa 100%)!important;
  box-shadow:0 0 7px rgba(125,199,241,.38);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-header {
  align-items:center;
  gap:12px;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-user {
  align-items:center;
  gap:10px;
  min-height:43px;
  padding:3px 10px 3px 3px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  background:linear-gradient(120deg,rgba(7,24,39,.52),rgba(19,49,70,.28));
  box-shadow:inset 0 1px rgba(255,255,255,.08),0 4px 12px rgba(0,0,0,.12);
  backdrop-filter:blur(8px);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-avatar {
  width:38px;
  height:38px;
  border:2px solid #e4c47f;
  box-shadow:0 0 0 2px rgba(255,255,255,.18),0 2px 8px rgba(0,0,0,.22);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-username {
  font-size:.84rem;
  font-weight:850;
  letter-spacing:-.015em;
  text-shadow:0 1px 4px rgba(0,0,0,.36);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-meta {
  gap:7px;
  font-size:.69rem;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-time {
  color:rgba(255,255,255,.78);
  font-size:.68rem;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls {
  gap:7px;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls button,
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-btn {
  width:38px;
  height:38px;
  border:1px solid rgba(229,243,252,.28)!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,rgba(32,69,94,.78),rgba(4,19,32,.72))!important;
  color:#f7fbff!important;
  box-shadow:inset 0 1px rgba(255,255,255,.14),0 4px 11px rgba(0,0,0,.20);
  backdrop-filter:blur(8px);
  transition:border-color .16s,background .16s,transform .16s,box-shadow .16s;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls button:hover,
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-btn:hover {
  border-color:rgba(236,204,137,.82)!important;
  background:linear-gradient(145deg,rgba(70,106,130,.88),rgba(11,35,53,.86))!important;
  transform:translateY(-1px);
  box-shadow:inset 0 1px rgba(255,255,255,.19),0 6px 14px rgba(0,0,0,.24);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls ion-icon {
  font-size:19px;
  color:#f5f9fd;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-close {
  border-color:rgba(232,196,128,.62)!important;
  background:linear-gradient(180deg,#f5dfad 0%,#dfb96d 50%,#a97831 100%)!important;
  color:#1d3447!important;
  box-shadow:inset 0 1px rgba(255,255,255,.78),0 4px 12px rgba(0,0,0,.28);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-close ion-icon {
  color:#1d3447!important;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-dropdown {
  min-width:180px;
  padding:7px;
  border:1px solid rgba(151,198,228,.48)!important;
  border-radius:13px!important;
  background:linear-gradient(145deg,#183950,#0a2032)!important;
  box-shadow:0 15px 34px rgba(0,0,0,.42),inset 0 1px rgba(255,255,255,.12)!important;
  backdrop-filter:blur(14px);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-dropdown .dropdown-item {
  min-height:38px;
  display:flex;
  align-items:center;
  border-radius:8px;
  color:#edf6ff!important;
  font-size:.82rem;
  font-weight:650;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-dropdown .dropdown-item:hover,
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-dropdown .dropdown-item:focus {
  background:rgba(121,188,230,.15)!important;
  color:#fff!important;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-chrome--top {
  padding:14px 13px 0;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-chrome--bottom {
  padding:0 14px 15px;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-reply {
  gap:9px;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-reply-pill {
  height:43px;
  padding:0 16px;
  border:1px solid rgba(230,243,251,.42)!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,rgba(8,27,43,.76),rgba(14,44,65,.58))!important;
  color:rgba(255,255,255,.86)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.13),0 4px 12px rgba(0,0,0,.17);
  backdrop-filter:blur(10px);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-reply-btn {
  width:43px;
  height:43px;
  flex:0 0 43px;
  border:1px solid rgba(255,255,255,.7)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#fff0bd 0%,#e8c477 48%,#b98234 100%)!important;
  color:#20394d!important;
  box-shadow:inset 0 1px rgba(255,255,255,.86),0 5px 13px rgba(0,0,0,.26);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-reply-btn ion-icon {
  color:#20394d!important;
  font-size:18px;
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-link-btn {
  min-height:41px;
  margin-bottom:11px;
  padding:9px 16px;
  border:1px solid rgba(255,244,211,.82)!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#fff0bd 0%,#e8c477 48%,#b98234 100%)!important;
  color:#24384a!important;
  font-size:.81rem;
  font-weight:850;
  box-shadow:inset 0 1px rgba(255,255,255,.88),0 6px 16px rgba(0,0,0,.26);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-link-btn:is(:hover,:focus-visible) {
  color:#172d40!important;
  border-color:#fff!important;
  filter:brightness(1.04);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-text-layer {
  max-width:calc(100% - 48px);
  text-wrap:pretty;
  text-shadow:0 3px 8px rgba(0,0,0,.52),0 12px 30px rgba(0,0,0,.44);
}
body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay :is(button,a):focus-visible {
  outline:2px solid #f0cf88!important;
  outline-offset:3px;
  box-shadow:0 0 0 4px rgba(10,28,43,.72),0 0 0 6px rgba(240,207,136,.24)!important;
}

/* Light/Night profile and feed palettes never recolor story media itself. */
html[data-bs-theme="light"] body.fansflex-app.ff-route-feed #stories-swiper,
html[data-theme="light"] body.fansflex-app.ff-route-feed #stories-swiper,
html[data-bs-theme="light"] body.fansflex-app.ff-route-profile #profile-highlights,
html[data-theme="light"] body.fansflex-app.ff-route-profile #profile-highlights {
  color:#173a59;
}
html[data-bs-theme="dark"] body.fansflex-app.ff-route-feed #stories-swiper,
html[data-theme="dark"] body.fansflex-app.ff-route-feed #stories-swiper,
html[data-bs-theme="dark"] body.fansflex-app.ff-route-profile #profile-highlights,
html[data-theme="dark"] body.fansflex-app.ff-route-profile #profile-highlights {
  color:#edf6ff;
}

@media (max-width:991.98px) and (min-width:768px) {
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-inner {
    width:min(430px,calc(100vw - 40px))!important;
    height:min(790px,calc(100dvh - 40px))!important;
    max-height:calc(100dvh - 40px)!important;
  }
}

@media (max-width:767.98px) {
  body.fansflex-app.ff-route-feed #stories-swiper {
    margin:2px 0 10px;
    padding:11px 10px 8px;
    border-radius:15px!important;
  }
  body.fansflex-app.ff-route-feed #stories-swiper .swiper-slide.story-thumb {
    width:78px!important;
    min-width:78px;
    flex-basis:78px;
  }
  body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-avatar-wrap {
    width:66px!important;
    height:66px!important;
    flex-basis:66px;
  }
  body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-name {
    max-width:74px!important;
    font-size:.69rem!important;
  }
  body.fansflex-app.ff-route-feed #stories-swiper .stories-swiper-skeleton__item {
    width:78px;
    min-width:78px;
  }
  body.fansflex-app.ff-route-feed #stories-swiper .stories-swiper-skeleton__ring {
    width:66px;
    height:66px;
  }
  body.fansflex-app.ff-route-profile #profile-highlights {
    margin:10px 10px 14px!important;
    border-radius:14px!important;
  }
  body.fansflex-app.ff-route-profile #profile-highlights .profile-highlights-swiper {
    padding-inline:11px;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer {
    padding:0;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-inner {
    width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border:0;
    border-radius:0!important;
    box-shadow:none;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-swiper {
    border:0;
    border-radius:0!important;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-chrome--top {
    padding-top:max(12px,env(safe-area-inset-top));
    padding-inline:12px;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-chrome--bottom {
    padding-bottom:max(14px,env(safe-area-inset-bottom));
    padding-inline:12px;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls {
    gap:5px;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls button,
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-btn {
    width:35px;
    height:35px;
    border-radius:11px!important;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-user {
    max-width:calc(100vw - 190px);
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-meta {
    flex-wrap:wrap;
  }
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-reply-pill,
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-reply-btn {
    height:42px;
  }
}

@media (max-width:380px) {
  body.fansflex-app.ff-route-feed #stories-swiper .swiper-slide.story-thumb {width:74px!important;min-width:74px;flex-basis:74px;}
  body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-avatar-wrap {width:62px!important;height:62px!important;flex-basis:62px;}
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-user {max-width:calc(100vw - 174px);}
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls {gap:4px;}
}

@media (prefers-reduced-motion:reduce) {
  body.fansflex-app.ff-route-feed #stories-swiper .story-thumb-inner,
  body.fansflex-app.ff-route-profile #profile-highlights .profile-highlight-item,
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-viewer-controls button,
  body.fansflex-app:is(.ff-route-feed,.ff-route-profile) #stories-viewer-overlay .stories-owner-menu-btn {
    transition:none!important;
  }
}
