/* L4 (SIMPLIFY audit, R-93b): the creator tools. Every control in the Create dialogs is at least 44 px (48 on a phone), what is written is at least 16 px, "More" folds the introduction and the tags. Loaded last. */
.ffCreator button,.ffCreator select,.ffCreator summary,.ffCreator [role=button],.ffCreator input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]){min-height:var(--tap,44px)!important;box-sizing:border-box}
.ffCreator button,.ffCreator [role=button]{min-width:var(--tap,44px)!important}
.ffCreator input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),.ffCreator textarea,.ffCreator select,.ffCreator [contenteditable=true]{font-size:var(--fs-main,16px)!important;line-height:1.5}
.ffCreator details.ffMore{margin:10px 0;padding:0 14px;border:1px solid #1d3452;border-radius:12px;background:rgba(15,27,46,.5)}
.ffCreator details.ffMore>summary{display:flex;align-items:center;cursor:pointer;min-height:44px;margin:0 -14px;padding:10px 14px;font-size:var(--fs-main,16px);font-weight:700;color:var(--text-main,#f5f8fc);list-style:none}
.ffCreator details.ffMore>summary::-webkit-details-marker{display:none}
.ffCreator details.ffMore>summary::after{content:"+";margin-left:auto;font-size:20px;color:var(--text-muted,#a9b9ce)}
.ffCreator details.ffMore[open]>summary::after{content:"–"}
.ffCreator details.ffMore>*:not(summary){margin:0 0 14px}
/* Create (Story / Comic editors): small grey text readable on the dark frame (>= 4.5:1) and the primary buttons use the one accessible blue pair */
.ffCreator .ffStoryBreadcrumb,.ffCreator .ffStoryOverviewHelper,.ffCreator .ffStoryCoverHint,.ffCreator .ffStoryCoverMeta,.ffCreator .ffStoryImportHint,.ffCreator .ffStoryFieldCount,.ffCreator .ffStoryFieldHint,
.ffCreator .ffStoryChCount,.ffCreator .ffStoryChHeadHint,.ffCreator .ffStoryFooterNote,.ffCreator .ffStoryBreadcrumb span,.ffCreator .ffStoryFooterNote span{color:var(--text-muted)!important}
.ffCreator .ffStoryPrimaryBtn,.ffCreator .ffComicPrimary,.ffCreator button.ffStoryPrimaryBtn:not(:disabled){background:var(--btn-primary-bg)!important;color:var(--btn-primary-fg)!important}
.ffCreator .gpLive a{display:inline-flex;align-items:center;min-height:var(--tap-min);padding:0 8px;color:#8fd0ff;text-decoration:underline;font-weight:700}
@media(max-width:760px){.ffCreator .gpLive a{min-height:var(--tap-min-mobile)}}
.ffCreator .gpStateHint{color:var(--text-muted);font-size:var(--fs-secondary)}
.ffCreator .gpAuto{margin:4px 0 8px;color:var(--text-muted);font-size:var(--fs-secondary)}
.ffCreator .gpCoverHint{margin:8px 0 0;color:var(--text-muted);font-size:var(--fs-secondary)}


/* B-NEW4: measured detail-page parity and fullscreen toolbar type/hit areas.
   Inline single-post comic reader classes intentionally do not appear in these rules. */
#viewer .viewerTop .backHome{
  position:relative!important;isolation:isolate!important;
  height:var(--tap,44px)!important;min-height:var(--tap,44px)!important;min-width:var(--tap,44px)!important;
  padding:0 13px!important;border:0!important;background:transparent!important;
  font-size:13px!important;line-height:1!important;
}
#viewer .viewerTop .backHome::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  left:0;right:0;top:50%;height:37px;transform:translateY(-50%);
  border:1px solid rgba(40,62,100,.48);border-radius:11px;background:#0a1734;
}
#viewer .viewerTop .closeViewer{
  position:relative!important;isolation:isolate!important;
  width:var(--tap,44px)!important;height:var(--tap,44px)!important;
  min-width:var(--tap,44px)!important;min-height:var(--tap,44px)!important;
  border:0!important;background:transparent!important;
}
#viewer .viewerTop .closeViewer::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  width:40px;height:38px;left:50%;top:50%;transform:translate(-50%,-50%);
  border:1px solid rgba(40,62,100,.48);border-radius:50%;background:#0a1734;
}
/* Home button looked veiled (Boss #374): a brighter ring than the Back box so the circle reads on the dark bar. Same selector + later = wins over the line above. */
#viewer .viewerTop .closeViewer.ffGoHome::before{border-color:rgba(140,175,230,.5);background:#0d2441}
#viewer .detailTagsV18 .tagChipV18{font-size:12px!important}
#viewer .ffV100Cue{font-size:12px!important}
#readerViewer .readerIdentity b,#readerViewer .readerControls button,#readerViewer .readerControls span{font-size:12px!important}
/* Fullscreen-reader controls have distinct, rectangular hit regions. Keep enough space
   between adjacent expanded controls so their edge/corner samples cannot be stolen. */
#readerViewer .readerTop .readerControls{gap:30px}
#readerViewer .readerBottom [data-nav-part]{
  position:relative;box-sizing:border-box;width:44px;min-width:44px;height:44px;min-height:44px;
  padding:0;flex:0 0 44px
}
#readerViewer .readerBottom [data-nav-part]::after{
  content:"";position:absolute;inset:-1px;border-radius:0;pointer-events:auto
}
@media(max-width:560px){
  #readerViewer .readerTop .readerControls{gap:30px}
  #readerViewer .readerBottom [data-nav-part]{width:48px;min-width:48px;height:48px;min-height:48px;flex:0 0 48px}
}
/* A scroll/layout change can leave the JS expansion marked clipped until its
   next animation frame. Fullscreen toolbar touch targets must exist throughout
   that transition; the drawn buttons and scroll strip geometry stay unchanged. */
@media(pointer:coarse){
  #readerViewer .readerTop .readerControls button{position:relative}
  #readerViewer .readerTop .readerControls button::after{
    content:"";position:absolute;inset:auto;left:50%;top:50%;
    width:max(100%,48px);height:48px;transform:translate(-50%,-50%);pointer-events:auto
  }
}
@media(pointer:fine){
  #readerViewer .readerTop .readerRound,#readerViewer .readerControls button{position:relative}
  #readerViewer .readerTop .readerRound::after,#readerViewer .readerControls button::after{
    content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:44px;
    transform:translate(-50%,-50%);pointer-events:auto
  }
}

/* B-NEW6: fullscreen comic only. The 390px toolbar gets a stable title row and
   a full-width controls row; real 48px boxes need no overlapping hit expansion.
   Story and the single-post inline comic keep their existing selectors. */
@media(max-width:560px){
 #readerViewer[data-reader-kind="comic"] .readerShell{grid-template-rows:106px minmax(0,1fr) 52px}
 #readerViewer[data-reader-kind="comic"] .readerTop{display:grid!important;grid-template-columns:48px minmax(0,1fr);grid-template-rows:48px 48px;gap:4px 6px;padding:3px 8px;height:106px;min-height:106px;box-sizing:border-box}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerRound{width:48px;height:48px;min-width:48px;min-height:48px}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerIdentity{min-width:0;overflow:hidden}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerControls{grid-column:1/-1;width:100%;max-width:none;height:48px;min-height:48px;gap:4px!important;padding:0;scroll-padding-inline:0;box-sizing:border-box}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerControls button{width:48px;min-width:48px;height:48px;min-height:48px;box-sizing:border-box;flex:0 0 48px;padding:0 4px}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerControls [data-reader-mode]{flex:1 0 48px;width:auto;overflow:hidden;text-overflow:ellipsis}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerControls span{flex:1 1 46px;min-width:46px;max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* COMIC-MOBILE-GRIDRANDOM: compact header, real targets, tools outside the reading row. */
#viewer .viewerTop #closeViewer.ffGoHome{padding:0!important;gap:0!important;display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 var(--tap,44px)}
#readerViewer .readerComicTools{display:none}
@media(max-width:560px){
 #readerViewer[data-reader-kind="comic"] .readerShell{grid-template-rows:58px minmax(0,1fr) 52px}
 #readerViewer[data-reader-kind="comic"] .readerTop{display:grid!important;grid-template-columns:48px minmax(0,1fr) auto;grid-template-rows:48px;gap:6px;padding:5px 8px;height:58px;min-height:58px;box-sizing:border-box;overflow:visible;z-index:5}
 #readerViewer[data-reader-kind="comic"] .readerIdentity b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerControls{grid-column:auto;width:auto;max-width:none;overflow:visible!important;gap:4px!important;flex-wrap:nowrap!important}
 #readerViewer[data-reader-kind="comic"] .readerControls>button:not([data-reader-mode]),#readerViewer[data-reader-kind="comic"] .readerControls>i{display:none!important}
 #readerViewer[data-reader-kind="comic"] .readerControls>span{flex:0 0 auto;min-width:46px;max-width:64px}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerControls>[data-reader-mode]{width:max-content;min-width:48px;max-width:none;flex:0 0 auto;padding:0 6px;white-space:nowrap;overflow:visible;text-overflow:clip}
 #readerViewer[data-reader-kind="comic"] .readerComicTools{display:block;position:relative;flex:0 0 48px}
 #readerViewer[data-reader-kind="comic"] .readerComicTools>summary{display:grid;place-items:center;width:48px;min-width:48px;height:48px;min-height:48px;box-sizing:border-box;list-style:none;cursor:pointer;border:1px solid #273c58;border-radius:10px;background:#0a1d34;color:#dce8f8;font-size:22px}
 #readerViewer[data-reader-kind="comic"] .readerComicTools>summary::-webkit-details-marker{display:none}
 /* Compact visible frames inside the existing 48px controls. Menu, focus,
    toolbar rows and real hit boxes keep their existing owners. */
 #readerViewer[data-reader-kind="comic"] .readerTop>.readerRound,
 #readerViewer[data-reader-kind="comic"] .readerControls>[data-reader-mode],
 #readerViewer[data-reader-kind="comic"] .readerComicTools>summary{position:relative;isolation:isolate;background:transparent;border-color:transparent}
 #readerViewer[data-reader-kind="comic"] .readerTop>.readerRound::before{content:"";position:absolute;inset:6px;border-radius:50%;background:#0d2642;z-index:-1;pointer-events:none}
 #readerViewer[data-reader-kind="comic"] .readerControls>[data-reader-mode]::before,
 #readerViewer[data-reader-kind="comic"] .readerComicTools>summary::before{content:"";position:absolute;top:6px;bottom:6px;left:0;right:0;border:1px solid #273c58;border-radius:8px;background:#0a1d34;z-index:-1;pointer-events:none}
 #readerViewer[data-reader-kind="comic"] .readerComicTools>summary::before{left:6px;right:6px}
 #readerViewer[data-reader-kind="comic"] .readerComicToolPanel{position:absolute;z-index:10;right:0;top:calc(100% + 8px);width:280px;max-width:calc(100vw - 16px);height:124px;box-sizing:border-box;padding:8px;display:grid;grid-template-rows:48px 48px;gap:8px;border:1px solid #334968;border-radius:12px;background:#071429;box-shadow:0 10px 28px #0008}
 #readerViewer[data-reader-kind="comic"] .readerComicToolPanel>div{display:flex;gap:8px}
 #readerViewer[data-reader-kind="comic"] .readerComicToolPanel button{flex:1 1 48px!important;width:auto!important;min-width:48px;height:48px;min-height:48px}
 #readerViewer[data-reader-kind="comic"] .readerControls button::after{content:none!important;display:none!important}
 #readerViewer[data-reader-kind="comic"] .comicScroll{padding:12px;gap:12px}
 #readerViewer[data-reader-kind="comic"] .comicPageStage img{max-height:100%!important}
}

/* F3 semantic feed surfaces: this layer owns wrapper layout, never card masonry.
   Search status and the Explore hub are whole surfaces even if the prior render
   left ffSparse / ffBlockColumns / mFeedRoot on #feed. The inner Explore grid
   still lays out its categories; do not copy the reference's column fragmentation.
   Compose together with INDEX_OWNER_PROPOSAL.patch to retire dedicated inline owners. */
#feed:has(>.exploreHubV42),
#feed:has(>.searchEmptyState):not(:has([data-card])){
 display:block!important;column-count:1!important;grid-template-columns:none!important;
}
#feed>.exploreHubV42,#feed>.searchEmptyState{
 column-span:all;break-inside:avoid;grid-column:1/-1;min-width:0;
 max-width:100%;box-sizing:border-box;overflow-wrap:anywhere;
}

/* HOME-HARMONY #759–762: Grid rhythm; keep current nav, guest search and UI-1 foot.
   Horizontal scroll clips pseudo hit areas: reserve their vertical space INSIDE the rail.
   Reuse the header's bottom spacing so desktop cards retain the reference top position. */
#feed,#feed *,#filters,#filters *, .left .nav .ffNavLabel{
 font-family:var(--ff-feed-font)!important;
}
.header #filters{
 padding-bottom:calc((var(--tap) - var(--ff-filter-height)) / 2)!important;
}
.header #filters .filter{
 position:relative;box-sizing:border-box;
 min-height:var(--ff-filter-height)!important;height:var(--ff-filter-height)!important;
 min-width:var(--tap)!important;padding:0 14px!important;
 font-size:var(--ff-filter-font)!important;line-height:1.48!important;
}
.header #filters .filter::after{
 content:"";position:absolute;left:0;right:0;top:50%;bottom:auto;
 height:var(--tap);width:auto;transform:translateY(-50%);
}
.center>.header{
 padding-bottom:calc(var(--ff-header-bottom) - (var(--tap) - var(--ff-filter-height)) / 2)!important;
}
@media(max-width:760px){
 .header #filters{padding-top:8px!important}
 .center>.header{padding-bottom:8px!important}
 .header .ffTapMobileNav{
  position:relative;box-sizing:border-box;height:40px;min-height:40px!important;
  margin:6px 0 2px;
 }
 .header .ffTapMobileNav::after{
  content:"";position:absolute;left:0;right:0;top:50%;bottom:auto;
  height:var(--tap);width:auto;transform:translateY(-50%);
 }
}

/* READER-REFERENCE-PARITY: Grid's 5px rhythm without overlapping 44/48px targets.
   The compact boxes grow only enough to host the required target width; the old
   blanket 30px gap is unnecessary once adjacent hit areas have real layout space.
   Mobile <=560 keeps its tested compact tools disclosure. Story is unchanged. */
@media(min-width:561px){
 #readerViewer[data-reader-kind="comic"] .readerTop .readerIdentity{min-width:0;flex:1 1 auto;overflow:hidden}
 #readerViewer[data-reader-kind="comic"] .readerIdentity b,#readerViewer[data-reader-kind="comic"] .readerIdentity small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #readerViewer[data-reader-kind="comic"] .readerTop .readerControls{
  flex:0 0 auto;gap:5px;max-width:none;height:var(--tap);min-height:var(--tap);padding:0;overflow:visible;
 }
 #readerViewer[data-reader-kind="comic"] .readerControls>button{
  box-sizing:border-box;min-width:var(--tap);flex:0 0 auto;
 }
 #readerViewer[data-reader-kind="comic"] .readerControls>i{display:none}
}

/* Story phone controls keep four inline commands and the scroll fallback.
   Real target widths remove the need for a 30px inter-control safety gap. */
@media(max-width:560px){
 #readerViewer[data-reader-kind="story"] .readerTop .readerControls{gap:5px;padding-inline:4px;scroll-padding-inline:4px}
 #readerViewer[data-reader-kind="story"] .readerControls>button{min-width:var(--tap)}
 #readerViewer[data-reader-kind="story"] .readerControls>button::after{height:var(--tap)}
}

/* DETAIL-OWNER-ACTIONS #764: public actions stay available; owner controls use a
   native disclosure in document flow, never an overlay clipped by the card. */
#viewer .detailUtilityRow{flex-wrap:wrap}
#viewer .detailOwnerTools{margin-top:6px;min-width:0}
#viewer .detailOwnerTools>summary{
 display:flex;align-items:center;gap:8px;min-height:var(--tap);min-width:var(--tap);
 width:fit-content;max-width:100%;padding:0 10px;box-sizing:border-box;
 color:var(--text-muted);font-size:var(--fs-secondary);cursor:pointer;list-style:none;
}
#viewer .detailOwnerTools>summary::-webkit-details-marker{display:none}
#viewer .detailOwnerTools>summary:focus-visible{outline:2px solid var(--btn-primary-ring);outline-offset:2px}
#viewer .detailOwnerPanel{
 width:min(320px,100%);height:264px;box-sizing:border-box;overflow:auto;
 display:flex;flex-direction:column;gap:6px;padding:8px;
 border:1px solid rgba(69,157,214,.27);border-radius:12px;background:#081d35;
}
#viewer .detailOwnerPanel .utilityAction{
 width:100%;height:auto;min-height:var(--tap)!important;flex:0 0 auto;
 justify-content:flex-start;text-align:left;white-space:normal;overflow-wrap:anywhere;
}
#viewer .detailOwnerPanel .utilityNote,#viewer .ffAcquiredNote{
 margin:0;padding:8px;color:var(--text-muted);font-size:var(--fs-secondary);line-height:1.5;
}

#viewer .detailOwnerTools:not([open])>.detailOwnerPanel{display:none}

/* SITE-765 Profile: measured reference cover/card/type rhythm, retaining the new
   Follow/Donate/Share/About/owner controls and the late ffProfile2 renderer. */
#profile .profileV18.ffProfile2 .ffpLayout{padding:0}
#profile .ffProfile2 .ffpCover{height:190px;border-radius:18px}
#profile .ffProfile2 .ffpAvatar{margin-left:22px!important}
#profile .ffProfile2 .ffpName{font-size:25px;line-height:1.28;margin-left:22px;margin-right:22px}
#profile .ffProfile2 .ffpHandle{font-size:12px;margin-left:22px;margin-right:22px}
#profile .ffProfile2 .ffpBio{font-size:13px;margin-left:22px;margin-right:22px}
#profile .ffProfile2 .ffpStats{font-size:12px;margin-left:22px;margin-right:22px}
#profile .ffProfile2 .ffpStats b{font-size:13px}
#profile .ffProfile2 .ffpStage{padding:0 22px}
#profile .ffProfile2 .ffpTab{font-size:15px}
#profile .ffProfile2 .ffpActions .ffpActionBtn{font-size:12px}
#profile .ffProfile2 .ffpCards{gap:10px}
#profile .ffProfile2 .ffpCard{min-height:0;border-radius:12px}
#profile .ffProfile2 .ffpCard:has(.ffpCardMedia>img){padding:2px 6px 6px}
#profile .ffProfile2 .ffpCardMedia:has(>img){aspect-ratio:16/10}
#profile .ffProfile2 .ffpCard:has(.ffpCardMedia>img) .ffpCardBody{padding:9px;margin-top:5px}
#profile .ffProfile2 .ffpCardBody b{font-size:12px;line-height:1.48}
#profile .ffProfile2 .ffpCardBody small{font-size:12px}
#profile .ffProfile2 .ffpCardKind{font-size:12px;line-height:1.25;padding:3px 6px}
@media(max-width:760px){
 #profile .ffProfile2 .ffpRail{grid-template-columns:minmax(0,1fr);column-gap:0}
 #profile .ffProfile2 .ffpAvatar{margin-left:14px!important}
 #profile .ffProfile2 .ffpName,#profile .ffProfile2 .ffpHandle,#profile .ffProfile2 .ffpBio,#profile .ffProfile2 .ffpStats{margin-left:14px;margin-right:14px}
 #profile .ffProfile2 .ffpActions{margin-left:14px;margin-right:14px}
 #profile .ffProfile2 .ffpStage{padding:0 14px}
}

#profile .ffProfile2 [data-profile-action="follow"]:not(.active):not([aria-pressed="true"]){background:#0b2f4e;background-image:none;color:#d7f2ff;border:1px solid rgba(70,161,215,.52);border-radius:9px}

/* MANAGE-MENU (prototype v6-manage-menu, Boss #1040): the owner disclosure is an outlined trigger in the Share row; the panel is a 248px popover (desktop) or a bottom sheet (phone) */
#viewer .detailUtilityRow{position:relative}
#viewer .detailOwnerTools{margin-top:0;position:static}
#viewer .detailOwnerTools>summary{min-height:44px;padding:0 12px;gap:8px;border:1px solid #1c2b45;border-radius:12px;background:#0b1d31;color:#f5f8fc;font-size:15px;box-sizing:border-box}
#viewer .detailOwnerTools>summary svg{color:#c0cad8;flex:none}
#viewer .detailOwnerTools>summary:hover{background:#0e2239}
#viewer .detailOwnerTools[open]>summary{background:#12263f;border-color:#2b4a74}
#viewer .detailOwnerTools>summary:focus-visible{outline:2px solid #5fb2ff;outline-offset:2px}
#viewer .detailOwnerScrim,#viewer .detailOwnerGrab,#viewer .detailOwnerLabel{display:none}
#viewer .detailOwnerPanel{position:absolute;z-index:20;top:100%;left:0;margin-top:6px;width:248px;height:auto;max-height:none;overflow:visible;gap:0;padding:6px;border:1px solid #23395a;border-radius:14px;background:#0b1a2e;box-shadow:0 18px 48px rgba(0,0,0,.55)}
#viewer .detailOwnerPanel .utilityAction{display:flex;align-items:center;gap:12px;min-height:44px!important;padding:0 12px;border-radius:10px;color:#e6eef8;font-size:15px}
#viewer .detailOwnerPanel .utilityAction .i{width:20px;height:20px;flex:none;color:#9fb4cf}
#viewer .detailOwnerPanel .utilityAction:hover{background:#12263f;color:#e6eef8}
#viewer .detailOwnerPanel .utilityAction:focus-visible{outline:2px solid #5fb2ff;outline-offset:-2px}
#viewer .detailOwnerPanel [data-post-delete]{margin-top:7px;position:relative;color:#ff7f98}
#viewer .detailOwnerPanel [data-post-delete]::before{content:"";position:absolute;left:8px;right:8px;top:-4px;height:1px;background:#142035}
#viewer .detailOwnerPanel [data-post-delete] .i{color:#ff7f98}
#viewer .detailOwnerPanel [data-post-delete]:hover{background:#2a1620;color:#ff7f98}
@media(max-width:600px){
 #viewer .detailOwnerScrim{display:block;position:fixed;inset:0;z-index:30;background:rgba(1,5,14,.6)}
 #viewer .detailOwnerTools:not([open])>.detailOwnerScrim{display:none}
 #viewer .detailOwnerPanel{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:31;margin:0;width:auto;border-width:1px 0 0;border-radius:18px 18px 0 0;padding:6px 8px calc(16px + env(safe-area-inset-bottom,0px))}
 #viewer .detailOwnerGrab{display:block;width:40px;height:4px;border-radius:2px;background:#33496a;margin:6px auto}
 #viewer .detailOwnerLabel{display:block;padding:6px 12px 8px;font-size:13px;font-weight:600;color:#a9b9ce;letter-spacing:.04em;text-transform:uppercase}
 #viewer .detailOwnerPanel .utilityAction{min-height:52px!important}
 body:has(#viewer details.detailOwnerTools[open]) .bottomNav{visibility:hidden}   /* the sheet sits over the tab bar */
}

#viewer .detailOwnerPanel .sellic{position:relative;width:20px;height:20px;flex:none;display:inline-block}
#viewer .detailOwnerPanel .sellic img{position:absolute;left:-1px;top:0;width:20px;height:20px}
#viewer .detailOwnerPanel .sellic .coin{position:absolute;right:-5px;bottom:-4px;width:15px;height:15px;stroke:none}
