html[data-front-locale-pending] body{visibility:hidden}html[data-front-locale-pending]::after{content:"";position:fixed;inset:calc(50% - 10px) auto auto calc(50% - 10px);width:20px;height:20px;border:2px solid #e2e5eb;border-top-color:#6f7886;border-radius:50%;animation:front-locale-spin .7s linear infinite}html[dir=rtl] .privacy-reader,html[dir=rtl] .service-terms-reader{text-align:right}@keyframes front-locale-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){html[data-front-locale-pending]::after{animation:none}}

html[lang] .merchant-ui .md-workspace .fi-trigger[data-fi-channel]::after{content:none}html[lang] .mp-rank:before{content:attr(data-front-locale-rank)}

/* Localized mobile category tabs keep complete labels within their scrollable chips. */
@media(max-width:767px){html[lang]:not([lang="zh-CN"]) .merchant-ui .merchant-goods-workspace .merchant-category{max-width:none;overflow:visible;text-overflow:clip;flex-shrink:0}}

/* Ledger category buttons retain a single line and their original size in every locale. */
.merchant-ui .pw-categories .pw-category-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal}
.merchant-ui .pw-categories .pw-category-label-en,html:lang(en) .merchant-ui .pw-categories .pw-category-label-full{display:none}
html:lang(en) .merchant-ui .pw-categories .pw-category-label-en{display:block}

/* Only localized controls that otherwise clip their labels; original actions and grouping are unchanged. */
html[lang]:not([lang="zh-CN"]) .merchant-ui .mp-rating{white-space:normal;overflow-wrap:anywhere}
html[lang]:not([lang="zh-CN"]) .merchant-ui .mp-rating .mp-unrated{display:block;max-width:100%;white-space:normal}
@media(max-width:767px){
 .merchant-ui .pw-billing-mobile .pw-categories button{white-space:nowrap;overflow-wrap:normal}
 html[lang]:not([lang="zh-CN"]) .merchant-ui .merchant-goods-workspace #search-form{grid-template-columns:minmax(0,1fr) auto}
 html[lang]:not([lang="zh-CN"]) .merchant-ui .merchant-goods-workspace #search-form .btn{width:auto;min-width:60px;padding-inline:10px}
 html[lang]:not([lang="zh-CN"]) .merchant-ui .vip-page .vp-step small{max-width:100%;white-space:normal;overflow-wrap:anywhere}
}

@media(max-width:767px){
 html[lang]:not([lang="zh-CN"]) .mobile-promo .promo-slide{aspect-ratio:auto;min-height:calc((100vw - 16px)*.2646)}
 html[lang]:not([lang="zh-CN"]) .mobile-promo .promo-copy{min-width:0;max-width:100%}
 html[lang]:not([lang="zh-CN"]) .mobile-promo :is(.promo-title,.promo-kicker){white-space:normal;overflow-wrap:anywhere}
 html[lang]:not([lang="zh-CN"]) .mobile-options{flex-wrap:wrap;gap:8px}
 html[lang]:not([lang="zh-CN"]) .mobile-options>strong{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 html[lang]:not([lang="zh-CN"]) .mobile-options>span{min-width:0;max-width:100%;overflow-wrap:anywhere}
}

/* Identity uploads reuse the existing localized photo selector, not browser-owned file captions. */
.fs-dialog .fs-upload{position:relative;cursor:pointer}
.fs-dialog .fs-upload input[type=file]{position:absolute;width:1px;height:1px;min-height:0;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;opacity:0}
.fs-dialog .fs-upload:focus-within>div{outline:2px solid #fe2c55;outline-offset:3px}

/* Keep compact navigation and settings rows at their original size on narrow screens. */
@media(max-width:360px){
 html[lang]:not([lang="zh-CN"]) .merchant-ui .merchant-goods-tabs>a{font-size:14px}
 html[lang]:not([lang="zh-CN"]) .merchant-ui .pw-billing-mobile .pw-tabs{gap:14px}
 html[lang]:not([lang="zh-CN"]) .merchant-ui .pw-billing-mobile .pw-tabs a{font-size:13px;white-space:nowrap}
 html[lang]:not([lang="zh-CN"]) .merchant-ui .ms-row{font-size:14px;gap:8px}
 html[lang]:not([lang="zh-CN"]) .merchant-ui .ms-row>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* Frontend entry only. Keep layout, sticky positions, focus and dismissal native. */
@keyframes front-view-enter{from{opacity:.89}to{opacity:1}}
@keyframes front-dialog-enter{
 from{opacity:.84;translate:0 var(--front-dialog-enter-offset,0px)}
 to{opacity:1;translate:none}
}
@keyframes front-backdrop-enter{from{opacity:.82}to{opacity:1}}
@media(prefers-reduced-motion:no-preference){
 html:not([data-front-locale-pending]) [data-front-view-enter]{
  animation:front-view-enter 150ms cubic-bezier(.22,.68,.36,1);
 }
 html body dialog[open]:not(.support-dialog,.fi-dialog){
  animation:front-dialog-enter 150ms cubic-bezier(.22,.68,.36,1);
 }
 html body dialog[open]:not(.support-dialog,.fi-dialog,.site-menu)::backdrop{
  animation:front-backdrop-enter 140ms ease-out;
 }
 @media(min-width:768px){
  /* Edge-aligned panels stay aligned to their anchors. */
  dialog:not(.support-dialog,.fi-dialog,.site-menu,.fs-desktop-bank-drawer,.sku-sheet){
   --front-dialog-enter-offset:4px;
  }
 }
}
@media(prefers-reduced-motion:reduce){
 /* The catalog's legacy .dialog[open] entrance otherwise still runs. */
 html body dialog.dialog[open]:not(.support-dialog,.fi-dialog){animation:none}
}
