/* Owner1436/1437/1438/1439 + #1486 (SYS-09 chip): ONE compact language chip per surface, placed AFTER the title/intro (never above the title). The button IS the chip: translate icon + the action
   in the page language (See original / See translation), a small Author tag when the shown text is the author's version, the language code, a spinner (Translating...) or a warning glyph (Try again).
   The long status text is NOT drawn: it is the chip's title/aria-label and the single visually-hidden live region (.ffPostTranslationLabel).
   The row is 44px tall and owns its hit area (button ::after, -8px from the padding edge = -7px from the 1px border of the 30px chip in the 44px row, fills the row exactly), so a tap never reaches the title above or the media below. */
.ffPostTranslation{position:relative;display:flex;align-items:center;width:100%;box-sizing:border-box;min-height:44px;margin:0;padding:0;min-width:0;color:#9db3c9;font-size:12px;line-height:1.2}
.ffPostTranslationLabel,.ffPostTranslationNote,.ffPostTranslationNoteLong,.ffPostTranslationSource{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.ffPostTranslationSwap{position:relative;font:inherit;font-size:12px;line-height:1.2;font-weight:600;min-width:0;max-width:100%;height:30px;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;padding:0 10px;border:1px solid rgba(123,216,255,.3);border-radius:15px;background:rgba(123,216,255,.08);color:#7bd8ff;cursor:pointer;white-space:nowrap}
.ffPostTranslationSwap::after{content:"";position:absolute;inset:-8px 0}
.ffPostTranslationSwap[hidden]{display:none}
.ffPostTranslationSwap:hover{background:rgba(123,216,255,.15)}
.ffPostTranslationSwap:focus-visible{outline:2px solid #79d6ff;outline-offset:2px}
.ffPtIcon{flex:none;display:block;width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z'/%3E%3C/svg%3E") center/contain no-repeat}
.ffPostTranslation{container-type:inline-size}
.ffPtText{display:flex;flex-direction:column;align-items:flex-start;min-width:0;text-align:left}
.ffPtLine{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25}
.ffPtL1{font-size:12px;font-weight:600;opacity:.8}
.ffPtL2{font-size:12px;font-weight:700}
.ffPtShort{display:none}
.ffPostTranslationSwap[data-ff-lines="2"]{height:auto;min-height:40px;padding:3px 10px;align-items:center}
.ffPostTranslationSwap[data-ff-lines="2"]::after{inset:-1px 0}
/* narrow rows (2-column Home cards, container <= 200px): language names become their short form (EN / Viet), the label words stay */
@container (max-width:200px){.ffPtFull{display:none}.ffPtShort{display:inline}.ffPostTranslationSwap[data-ff-lines="2"]{padding:3px 8px}.ffPostTranslationSwap[data-ff-lines="2"] .ffPtIcon{display:none}}
.ffPtSpin{flex:none;width:9px;height:9px;border:2px solid #7bd8ff;border-right-color:transparent;border-radius:50%;animation:ffPtSpin .9s linear infinite}
.ffPtWarn{flex:none;width:13px;height:13px;border-radius:50%;background:#ffcf9a;color:#101c2b;font-size:10px;line-height:13px;text-align:center;font-weight:800}
.ffPostTranslation[data-ff-translation-status="failed"] .ffPostTranslationSwap{color:#ffcf9a;border-color:rgba(255,207,154,.45);background:rgba(255,207,154,.09)}
.ffPostTranslation[data-ff-translation-status="original"] .ffPostTranslationSwap{color:#9db3c9;border-color:rgba(157,179,201,.3);background:transparent}
@keyframes ffPtSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ffPtSpin{animation:none}}
.mCard>.ffPostTranslation{width:auto;margin:0 11px}
/* the open-Work viewer gives every button min-height var(--tap) (#viewer :is(button...)); the chip keeps its 30px height there (its row and ::after hit area stay 44px) */
#viewer .ffPostTranslation .ffPostTranslationSwap.ffPostTranslationSwap.ffPostTranslationSwap.ffPostTranslationSwap{min-height:0!important;height:30px!important} /* repeated class = specificity above the viewer's own !important rule */
#viewer .ffPostTranslation .ffPostTranslationSwap[data-ff-lines="2"].ffPostTranslationSwap.ffPostTranslationSwap.ffPostTranslationSwap{min-height:40px!important;height:auto!important}
/* Boss #1493: ONE line "language · Auto-translated ▾"; Original / Translation are chosen in its small menu. The two-line button (state machine) stays in the DOM, not drawn. */
.ffPostTranslation>.ffPostTranslationSwap{display:none!important}
.ffPtMenuBtn{position:relative;font:inherit;font-size:12px;line-height:1.2;font-weight:600;min-width:0;max-width:100%;height:30px;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;padding:0 10px;border:1px solid rgba(123,216,255,.3);border-radius:15px;background:rgba(123,216,255,.08);color:#7bd8ff;cursor:pointer;white-space:nowrap}
.ffPtMenuBtn::after{content:"";position:absolute;inset:-8px 0}
.ffPtMenuBtn:hover{background:rgba(123,216,255,.15)}
.ffPtMenuBtn:focus-visible,.ffPtMenuItem:focus-visible{outline:2px solid #79d6ff;outline-offset:2px}
.ffPtMenuText{min-width:0;overflow:hidden;text-overflow:ellipsis}
.ffPtCaret{flex:none;font-size:10px;opacity:.8}
.ffPtMenuBtn[data-ff-kind="original"]{color:#9db3c9;border-color:rgba(157,179,201,.3);background:transparent}
.ffPtMenuBtn[data-ff-kind="failed"]{color:#ffcf9a;border-color:rgba(255,207,154,.45);background:rgba(255,207,154,.09)}
.ffPtMenu{position:absolute;z-index:30;left:0;top:calc(100% - 6px);min-width:180px;max-width:min(260px,calc(100vw - 32px));box-sizing:border-box;padding:4px;border:1px solid #2c4059;border-radius:12px;background:#0b1a2e;box-shadow:0 8px 24px rgba(0,0,0,.45)}
.ffPtMenu[hidden]{display:none}
.ffPtMenuItem{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;box-sizing:border-box;padding:8px 10px;border:1px solid transparent;border-radius:9px;background:transparent;color:#e4edf8;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.ffPtMenuItem:hover,.ffPtMenuItem[aria-current=true]{background:#112b49;border-color:#2e587d}
.ffPtMenuCheck{flex:none;color:#92d3ff}
.mCard>.ffPostTranslation .ffPtMenu{left:0}
#viewer .ffPostTranslation .ffPtMenuBtn.ffPtMenuBtn.ffPtMenuBtn{min-height:0!important;height:30px!important}
#viewer .ffPostTranslation .ffPtMenuItem.ffPtMenuItem.ffPtMenuItem{min-height:44px!important}
/* Boss #1500/#1501 (SYS08): the in-place title/intro link (Posts and Works). The one-line menu chip and the two-line state button stay in the DOM for the state machine and the comment surfaces, not drawn when the link mode is on. */
.ffPostTranslation[data-ff-link-mode="1"]>.ffPtMenuBtn,.ffPostTranslation[data-ff-link-mode="1"]>.ffPtMenu{display:none!important}
.ffPtLink{position:relative;font:inherit;font-size:12px;line-height:1.2;font-weight:600;max-width:100%;height:30px;box-sizing:border-box;display:inline-flex;align-items:center;margin:0;padding:0 2px;border:0;border-radius:6px;background:transparent;color:#7bd8ff;text-decoration:underline;text-decoration-color:rgba(123,216,255,.45);text-underline-offset:3px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ffPtLink::after{content:"";position:absolute;inset:-8px -6px}
.ffPtLink:hover{text-decoration-color:currentColor}
.ffPtLink:focus-visible{outline:2px solid #79d6ff;outline-offset:2px}
.ffPtLink[data-ff-link="translating"]{color:#9db3c9;text-decoration:none;cursor:default;pointer-events:none}
.ffPtLink[data-ff-link="failed"]{color:#ffcf9a;text-decoration-color:rgba(255,207,154,.5)}
#viewer .ffPostTranslation .ffPtLink.ffPtLink.ffPtLink{min-height:0!important;height:30px!important}
/* #1501 (real-page defect): creator/language-versions.css hides the chip row on every open Work that has the Language panel (display:none!important). The ONE small link must show there, under the intro: a link-mode row shows unless the module itself hid it (inline display:none). */
.detailPost:has([data-ff-viewer]) .ffPostTranslation[data-ff-link-mode="1"]:not([style*="display: none"]),.detailPost:has([data-ff-tap-lang-menu]) .ffPostTranslation[data-ff-link-mode="1"]:not([style*="display: none"]){display:flex!important}

/* Owner1554/1555: match the article reading column and card text gutters. */
.detailPost>.ffPostTranslation.ffPtArticleRow{width:calc(100% - 36px);max-width:760px;margin:0 auto 8px}
.card>.ffPostTranslation.ffPtOuterRow{width:calc(100% - 24px);margin:0 12px 8px}
.detailPost>.ffPostTranslation.ffPtOuterRow{width:calc(100% - 32px);margin:0 16px 8px}
.mCard>.ffPostTranslation.ffPtOuterRow{width:calc(100% - 22px);margin:0 11px 8px}
@media(max-width:700px){.detailPost>.ffPostTranslation.ffPtArticleRow{width:calc(100% - 24px)}}
