/* TapShow SERIES (SPEC tapshow-series v1 5.2 / 6.4): the Tap list of a series. The shell (stage, cover, fullscreen, unlock layer) is the official one in ff-tapshow.css; only the list is new.
   The list is virtual: rows are absolutely placed inside a box as tall as the whole list, and only the ~20 around the window exist in the page. */
.ffSeriesPost .ffSeriesList{background:#0b1828;padding:12px 12px 14px}
.ffSeriesHead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 4px 10px}
.ffSeriesHead h3{margin:0;font-size:15px;font-weight:700;color:#e4f3ff;letter-spacing:.2px}
.ffSeriesHead h3 span{color:#8ca8ba;font-weight:500;font-size:var(--fs-secondary);margin-left:4px}
.ffSeriesContinue{min-height:44px;padding:0 18px;border:0;border-radius:22px;background:#00b9f3;color:#002030;font-weight:700;font-size:var(--fs-secondary);cursor:pointer}
.ffSeriesContinue[hidden]{display:none}
.ffSeriesSearch{display:block;margin:0 0 10px}
.ffSeriesSearch input{box-sizing:border-box;width:100%;min-height:42px;padding:0 14px;border:1px solid #29465d;border-radius:11px;background:#0c1e30;color:#e4f3ff;font-size:14px}
.ffSeriesSearch input::placeholder{color:#7f9bb0}
.ffSeriesSearch input:focus-visible,.ffSeriesViewport:focus-visible{outline:2px solid #6edeff;outline-offset:2px}
.ffSeriesViewport{position:relative;height:auto;max-height:min(62vh,560px);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;border-radius:11px;scrollbar-width:thin;scrollbar-color:#29617b #0b1828}
.ffSeriesViewport[hidden]{display:none}
.ffSeriesInner{position:relative;width:100%}
.ffSeriesRow{position:absolute;left:0;right:0;box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;padding:3px 14px;text-align:left;border:1px solid #29465d;border-radius:10px;background:#0b1b2c;color:#e4f3ff;cursor:pointer;min-width:0}
.ffSeriesRow .ffTapThumb{flex:0 0 48px;width:48px;height:64px;object-fit:cover;object-position:center 25%;border-radius:6px;border:1px solid #ffffff12;background:#102637}
.ffSeriesRow .ffTapThumbEmpty{display:grid;place-items:center;text-align:center;line-height:1.3;color:#9bb2c6;font-size:9px;font-weight:800;letter-spacing:.08em}
.ffSeriesRow .ffTapInfo{display:block;min-width:0;flex:1}
.ffSeriesRow strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.ffSeriesRow small{display:block;margin-top:3px;font-size:var(--fs-secondary);color:#abc0d0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ffSeriesRow[aria-selected=true]{background:#08334b;border-color:#00baf3;box-shadow:inset 3px 0 #37c4ee}
.ffSeriesRow[aria-selected=true] .ffTapThumb{border-color:#40b8df}
.ffSeriesRow.is-locked small{color:#f4c46b}
.ffSeriesRow.is-flash{animation:ffSeriesFlash 1.4s ease-out}
.ffSeriesRow:focus-visible{outline:2px solid #6edeff;outline-offset:2px}
.ffSeriesLock{flex:none;font-size:15px;opacity:.85}
.ffSeriesEmpty{margin:14px 6px;color:#9db4c8;font-size:var(--fs-secondary)}
.ffSeriesEmpty[hidden]{display:none}
.ffSeriesEmpty button{margin-left:8px;min-height:36px;padding:0 14px;border-radius:18px;border:1px solid #32566c;background:#102637;color:#fff;cursor:pointer}
@keyframes ffSeriesFlash{0%,35%{background:#0f5a7d;border-color:#7fe1ff}100%{}}
@media(max-width:600px){
  .ffSeriesPost .ffSeriesList{padding:10px 10px 12px}
  .ffSeriesViewport{height:auto;max-height:min(58vh,520px)}
  .ffSeriesRow{padding:4px 12px;min-height:64px}
  .ffSeriesRow .ffTapThumb{flex-basis:44px;width:44px;height:58px}
  .ffSeriesContinue{padding:0 14px}
}
/* TAP10: the language fallback note is a real row above the player. In
   fullscreen let that row keep its natural height and give the iframe only
   the remaining viewport so its bottom controls stay reachable. */
.ffTapShell.is-full:has(>[data-ff-tap-lang-fallback]){display:grid;grid-template-rows:auto minmax(0,1fr)}
.ffTapShell.is-full:has(>[data-ff-tap-lang-fallback])>.ffTapStage{height:auto;min-height:0}
@media(prefers-reduced-motion:reduce){.ffSeriesRow.is-flash{animation:none;background:#0f5a7d}}
/* @3: the hidden cover remains in the DOM. The shared mobile :has(cover)
   rule otherwise collapses a playing iframe to its intrinsic 150px height. */
@media(max-width:760px){
 /* MA-005: phone viewerTop is 56px; leave a 4px scroll margin. Reserve
    the bottom navigation and safe area. No 540px floor in short/landscape views.
    The shared is-full rule remains the sole owner of fullscreen geometry. */
 .ffSeriesPost[data-run-aware] .ffTapShell:not(.is-full):has(.ffTapStage.playing){height:min(760px,calc(100svh - 60px - var(--bnav-h,56px) - env(safe-area-inset-bottom)));min-height:0;scroll-margin-top:4px}
 .ffSeriesPost[data-run-aware] .ffTapStage.playing{height:100%}
 .ffSeriesPost[data-run-aware] .ffSeriesNext{width:calc(100% - 16px);white-space:normal;flex-wrap:wrap}
 .ffSeriesPost[data-run-aware] .ffSeriesNext span{flex:1 1 100%;min-width:0;line-height:1.5}
}
/* MA-005: rotated touch phones need the same normal-stage budget and Play/exit
   alignment as portrait phones. Keep cover, list and fullscreen sizing unchanged. */
@media(min-width:761px) and (max-width:1024px) and (max-height:520px) and (pointer:coarse){
 .ffSeriesPost[data-run-aware] .ffTapShell:not(.is-full):has(.ffTapStage.playing){height:min(760px,calc(100svh - 72px - env(safe-area-inset-bottom)));min-height:0;scroll-margin-top:4px}
 .ffSeriesPost[data-run-aware] .ffTapShell:not(.is-full) .ffTapStage.playing{height:100%}
}
/* viewing order, progress, the end of a Tap */
.ffSeriesBar{display:flex;align-items:center;gap:10px;margin:0 4px 10px}
.ffSeriesBar[hidden]{display:none}
.ffSeriesBarTrack{flex:1;height:6px;border-radius:3px;background:#17304a;overflow:hidden}
.ffSeriesBarTrack i{display:block;height:100%;width:0;background:#00b9f3;border-radius:3px;transition:width .3s}
.ffSeriesBar small{color:#8ca8ba;font-size:var(--fs-secondary);white-space:nowrap}
.ffSeriesNote{display:block;min-height:1em}
.ffSeriesNote:empty{display:none}
.ffTapCoverText button[disabled]{opacity:.55;cursor:default}
.ffSeriesNext{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:30;display:flex;align-items:center;gap:12px;padding:10px 12px 10px 16px;border-radius:26px;background:#04101df2;border:1px solid #29617b;color:#e4f3ff;font-size:14px;box-shadow:0 6px 24px #0008}
.ffSeriesNext strong{font-weight:700}
.ffSeriesNext span{color:#a5bacb;font-size:var(--fs-secondary)}
.ffSeriesNext button{min-height:44px;padding:0 18px;border:0;border-radius:22px;background:#00b9f3;color:#002030;font-weight:700;cursor:pointer}
.ffSeriesNext .ffSeriesNextClose{min-width:44px;padding:0;background:transparent;color:#a5bacb;font-size:20px}
.ffTapShell.is-full .ffSeriesNext{bottom:max(14px,env(safe-area-inset-bottom))}
/* the owner's Taps (chain by previous Tap): codes, link info, delete / restore */
.ffSeriesOwner{margin:14px 0 4px;padding:12px;border:1px solid #29617b;border-radius:14px;background:#04101d99;color:#e4f3ff}
.ffSeriesOwner header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ffSeriesOwner h3,.ffSeriesOwner h4{margin:0;font-size:15px}
.ffSeriesOwner h4{margin:14px 0 6px;color:#a5bacb;font-size:var(--fs-secondary)}
.ffSeriesOwner button{min-height:44px;padding:0 14px;border-radius:12px;border:1px solid #29617b;background:#0b2233;color:#e4f3ff;font:inherit;font-size:var(--fs-secondary);cursor:pointer}
.ffSeriesOwner button[disabled]{opacity:.5;cursor:default}
.ffOwnerNote{margin:8px 0;color:#a5bacb;font-size:var(--fs-secondary)}
.ffOwnerRow{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 0;border-top:1px solid #29617b55}
.ffOwnerMain{flex:1 1 180px;min-width:0}
.ffOwnerMain strong{display:block;font-size:14px;overflow-wrap:anywhere}
.ffOwnerMain small{display:block;color:#a5bacb;font-size:var(--fs-secondary)}
.ffOwnerCode{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ffOwnerCode code{font-size:var(--fs-secondary);letter-spacing:.04em;padding:6px 8px;border-radius:8px;background:#0b2233}
.ffOwnerDelete{border-color:#7a3340!important;color:#ffd3d9!important}
.ffOwnerConfirm{flex:1 1 100%}
.ffOwnerConfirm p{margin:0 0 10px;font-size:14px;line-height:1.45}
.ffOwnerButtons{display:flex;gap:10px;flex-wrap:wrap}
.ffSeriesOwner .ffOwnerDanger{background:#7a3340;border-color:#a14a59;color:#fff}
@media (max-width:600px){.ffOwnerCode{width:100%}.ffOwnerCode button,.ffOwnerDelete{flex:1 1 auto}}
.ffSeriesNext{width:max-content;max-width:calc(100% - 16px);box-sizing:border-box;white-space:nowrap}
.ffSeriesNext strong{overflow:hidden;text-overflow:ellipsis}
@media (max-width:520px){.ffSeriesNext{gap:8px;padding:8px 6px 8px 12px;font-size:var(--fs-secondary)}.ffSeriesNext button{padding:0 14px}}

/* Uploaded series use the shared mobile cover composition in ff-tapshow.css:
   uncropped artwork, brand column, then the selected Tap and its Play action.
   Keep that action in the normal scroll flow, as with registered TapShows. */

/* Owner659/R93b: retain the native --tap hit target (48 touch / 44 mouse).
   Draw a 36px pill inside it. Actual T1 PREVIEW3 overlaps by a 4px bottom
   strip; move the touch target up 8px, keeping every right slot and frame.
   Post-patch native bounds are required; this is not a geometry PASS. */
.ffSeriesPost[data-ff-series] .ffTapShell .ffTapFullscreen[data-ff-series-full]{
 box-sizing:border-box!important;height:var(--tap,44px)!important;min-height:var(--tap,44px)!important;max-height:var(--tap,44px)!important;
 min-width:var(--tap,44px)!important;max-width:calc(100% - 72px)!important;padding:0 10px!important;
 font-size:var(--fs-secondary)!important;line-height:1.2!important;border:0!important;background:transparent!important;box-shadow:none!important;
 border-radius:24px!important;isolation:isolate
}
.ffSeriesPost[data-ff-series] .ffTapShell .ffTapFullscreen[data-ff-series-full]::before{
 content:"";position:absolute;inset:calc((var(--tap,44px) - 36px)/2) 0;z-index:-1;pointer-events:none;
 background:#071b28;border:1px solid #29617b;border-radius:18px;box-sizing:border-box
}
@media(pointer:coarse),(max-width:700px),(orientation:landscape) and (max-height:520px){
 .ffSeriesPost[data-ff-series] .ffTapShell .ffTapFullscreen[data-ff-series-full]{top:4px!important}
}

/* The inherited portrait hero-centering rule also matches a HIDDEN cover.
   Once playing, align only this host pill to the frame's right chrome inset;
   let its caption choose its width. The b33 title and media frame do not move. */
@media(max-width:700px) and (orientation:portrait){
 .ffSeriesPost[data-ff-series] .ffTapShell:not(.is-full):has(.ffTapStage.playing) .ffTapFullscreen[data-ff-series-full]{
  left:auto!important;right:12px!important;transform:none!important;width:auto!important
 }
}

/* 14px Exit fullscreen wraps inside the existing 36px pill in full portrait.
   Keep the 48px hit, top/right slots, native title and media frame unchanged. */
@media(max-width:700px) and (orientation:portrait){
 .ffSeriesPost[data-ff-series] .ffTapShell.is-full .ffTapFullscreen[data-ff-series-full]{
  width:96px!important;white-space:normal!important
 }
}
/* TAP-LIST-THUMBS: the series poster is a 9:16 frame, 330px wide on a wide screen (DEMO/index.html .player img.pst, BOSS_LIKED_LOOKS.md: >=320px at 1440) */
@media(min-width:761px){
  .ffSeriesPost .ffTapCover{grid-template-columns:330px minmax(0,1fr);column-gap:28px;justify-content:center;align-items:center}
  .ffSeriesPost .ffTapCover>img{width:330px;max-width:100%;height:auto;max-height:100%;aspect-ratio:9/16;padding:0;object-fit:cover;border-radius:6px;justify-self:center;align-self:center}
}


/* Owner #1426/#1427: outside-player caption must fit its border; retain fullscreen-specific slots and hit size. */
.ffSeriesPost[data-ff-series] .ffTapShell:not(.is-full) .ffTapFullscreen[data-ff-series-full]{width:max-content!important}

/* Owner #1256: Tap packages live in the same creator language manager flow. */
.ffTapCreatorDialog::backdrop{background:rgba(1,5,13,.78);backdrop-filter:blur(6px)}
.ffTapCreatorDialog .ffLangPanel{width:min(820px,100%);max-height:calc(100dvh - 32px)}
.ffTapCreatorDialog .ffLangPanelBody{min-height:0;overflow:auto}
.ffTapCreatorDialog .ffLangTop h2{flex:1}
.ffTapCreatorDialog .ffLangTop{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px;border-bottom:1px solid #29415b}
.ffTapCreatorDialog .ffLangTop h2{margin:0;font-size:18px}
.ffTapCreatorDialog .ffTapLangRow{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:16px 0;padding:16px;border:1px solid #29415b;border-radius:12px}
.ffTapCreatorDialog .ffTapLangMetadata,.ffTapCreatorDialog .ffTapLangParts{flex-basis:100%;min-width:0}
.ffTapCreatorDialog .ffTapLangMetadata label{display:grid;gap:6px;margin:12px 0}
.ffTapCreatorDialog input[type=text],.ffTapCreatorDialog textarea,.ffTapCreatorDialog select{box-sizing:border-box;max-width:100%;padding:10px;border:1px solid #38516b;border-radius:8px;background:#091727;color:#eaf0fc;font:inherit}
.ffTapCreatorDialog input[type=text],.ffTapCreatorDialog textarea{width:100%}
.ffTapCreatorDialog input[type=file]{max-width:100%}
.ffTapCreatorDialog button{min-height:44px;padding:9px 12px;border:1px solid #38516b;border-radius:8px;background:#102c47;color:#eaf0fc;font:inherit;cursor:pointer}
.ffTapCreatorDialog button:disabled{opacity:.55;cursor:default}
.ffTapCreatorDialog :is(button,input,textarea,select,summary):focus-visible{outline:2px solid #77c7ff;outline-offset:2px}
.ffTapCreatorDialog .ffTapLangAdd,.ffTapCreatorDialog .ffTapLangSource{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.ffTapCreatorDialog .ffTapLangMetadata summary{min-height:44px;display:flex;align-items:center;cursor:pointer}

/* Owner #1256 A2 (APPROVED_0250), Tap owner panel: one compact row per language, counts line opens the existing details */
.ffTapLangRowCompact{display:grid;gap:8px}
.ffTapLangRowMain{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.ffTapLangName{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.ffTapLangName small{color:#91a4bc;font-size:12px}
.ffTapLangActions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ffTapLangUpload{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;cursor:pointer}.ffTapLangUpload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.ffTapLangCounts{cursor:pointer;color:#8ccfff;font-size:13px}.ffTapLangMore>*:not(summary){margin-top:10px}.ffTapLangIntro{color:#91a4bc;margin:0 0 10px}
.ffTapCreatorDialog .ffLangPanelBody .ffTapLangOwner>h4{display:none}
.ffTapCreatorDialog .ffTapLangAdd label{position:relative;display:inline-flex;min-height:44px;box-sizing:border-box;align-items:center;justify-content:center;overflow:hidden;padding:9px 12px;border:1px solid #38516b;border-radius:8px;background:#102c47;color:#eaf0fc;font:inherit;cursor:pointer}
.ffTapCreatorDialog .ffTapLangAdd label:has(input:focus-visible){outline:2px solid #77c7ff;outline-offset:2px}
.ffTapCreatorDialog .ffTapLangAdd label:has(input:disabled){opacity:.55;cursor:default}
.ffTapCreatorDialog .ffTapLangAdd input[type=file]{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0;opacity:0;cursor:pointer}
