/* Complete the existing neutral system on reading, product and utility surfaces.
   The fixed brand motif, commerce events and stored product data stay native. */
body.jj-refined-ui :is(.main-page,.main-article > div,.jj-policy-page) {
  width:100%; max-width:1000px; margin:40px auto 56px;
  padding:clamp(24px,4vw,52px); background:#fff;
  border:1px solid var(--jj-line); border-radius:20px; box-shadow:var(--jj-shadow);
}
body.jj-refined-ui .main-article > div { max-width:1100px; }
body.jj-refined-ui .jj-policy-page { width:calc(100% - 2 * var(--page-padding,30px)); }
body.jj-refined-ui :is(.main-page__title,.main-article__title,.jj-policy-page > h1) {
  margin:0 0 24px; padding:0; font-size:clamp(26px,3vw,36px);
  font-weight:600; line-height:1.25; letter-spacing:-.03em; text-wrap:balance;
}
body.jj-refined-ui :is(.main-page__content,.main-article__content,.jj-policy-page .rte) {
  border-radius:0; background:transparent; font-size:16px; line-height:1.8;
  color:#343a35; overflow-wrap:anywhere;
}
body.jj-refined-ui :is(.main-page__content,.jj-policy-page .rte) { max-width:74ch; margin-inline:auto; }
body.jj-refined-ui :is(.main-page__content,.main-article__content,.jj-policy-page .rte) :is(p,li) { line-height:1.8; }
body.jj-refined-ui :is(.main-page__content,.main-article__content,.jj-policy-page .rte) p { margin-block:0 1.25em; }
body.jj-refined-ui .main-article__info { color:var(--jj-muted); border-color:var(--jj-line); font-size:13px; }
body.jj-refined-ui .main-article__cover-image { border-radius:14px; margin-block:28px; }
body.jj-refined-ui .main-article__content { margin-block:28px; }
body.jj-refined-ui .main-article__comment-item { border-radius:14px; border-color:var(--jj-line); }
body.jj-refined-ui .jj-reading-paragraph { text-align:start !important; font-weight:400 !important; }
body.jj-refined-ui .jj-reading-paragraph :is(strong,b) { font-weight:400 !important; }
body.jj-refined-ui .jj-table-hint { font-size:12px; color:var(--jj-muted); margin:16px 0 8px; line-height:1.6; }
body.jj-refined-ui .jj-table-hint[hidden] { display:none; }
body.jj-refined-ui :is(.rte,.product-expander__content) table {
  border-color:#dce2d8; background:#fff; border-radius:10px;
  font-size:14px; line-height:1.6; scrollbar-width:thin; scrollbar-color:#aeb9a7 #f0f3ec;
}
body.jj-refined-ui :is(.rte,.product-expander__content) :is(th,td) {
  padding:12px 14px; border-color:#dce2d8; vertical-align:top;
}
body.jj-refined-ui :is(.rte,.product-expander__content) th { background:#f2f5ee; font-weight:550; }
body.jj-refined-ui :is(.rte,.product-expander__content) table:focus-visible { outline:2px solid #6c776c; outline-offset:4px; }

/* Full product detail only: quick view retains its independent, approved layout. */
body.jj-refined-ui .jj-product-page { margin-block:20px 44px; }
body.jj-refined-ui .jj-product-page .product-detail {
  display:block; background:rgb(255 255 255 / 98%); border:1px solid var(--jj-line);
  border-radius:20px; box-shadow:var(--jj-shadow); padding:clamp(20px,3vw,40px);
}
body.jj-refined-ui .jj-product-page .product-detail__main { gap:clamp(24px,3.5vw,48px); --detail-main-column-gap:clamp(24px,3.5vw,48px); }
body.jj-refined-ui .jj-product-page .product-detail__col { min-width:0; }
body.jj-refined-ui .jj-product-page .product-detail__info { gap:24px; --info-row-gap:24px; }
body.jj-refined-ui .jj-product-page .product-detail__heading { font-size:clamp(25px,2.35vw,32px); line-height:1.28; letter-spacing:-.035em; }
body.jj-refined-ui .jj-product-page .product-detail__sell-info {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px;
  width:100%; padding-block:20px; border-block:1px solid #e5e9e1;
}
body.jj-refined-ui .jj-product-page .product-detail__sell-info .sell-info { gap:10px; width:auto; min-width:0; }
body.jj-refined-ui .jj-product-page .sell-info__icon { width:18px; height:18px; flex-shrink:0; color:#64705f; }
body.jj-refined-ui .jj-product-page .sell-info__text { font-size:12px; line-height:1.5; font-weight:450; color:#5b6658; }
body.jj-refined-ui .jj-product-page .product-description { padding:0; line-height:1.8; color:#343a35; }
body.jj-refined-ui .jj-product-page .product-description h2 { font-size:25px; line-height:1.3; letter-spacing:-.025em; margin-block:4px 18px; }
body.jj-refined-ui .jj-product-page .product-description h3 { font-size:18px; line-height:1.4; letter-spacing:-.01em; margin-block:28px 12px; }
body.jj-refined-ui .jj-product-page .product-description p { margin-block:0 18px; }
body.jj-refined-ui .jj-product-page .product-description :is(video,img) { max-width:100%; border-radius:12px; }

/* Native utility screens share one calm card, without changing their forms. */
body.jj-refined-ui :is(.customer-container,.customers-forgot-password__container) { background:transparent; padding:40px var(--page-padding,20px) 56px; }
body.jj-refined-ui .customers-forgot-password__container > .page-width { padding-inline:0; }
body.jj-refined-ui :is(.customer-container > .customer,.customers-forgot-password-section) {
  width:min(100%,500px); max-width:500px; padding:32px; background:#fff; border:1px solid var(--jj-line);
  border-radius:20px; box-shadow:var(--jj-shadow);
}
body.jj-refined-ui :is(.customer__title,.customers-forgot-password__title) { font-size:28px; font-weight:600; letter-spacing:-.03em; line-height:1.3; text-transform:none; margin-bottom:28px; }
body.jj-refined-ui .customer__extra { flex-wrap:wrap; gap:16px; }
body.jj-refined-ui .customer__jump-link { margin-top:26px; }
body.jj-refined-ui .main-cart__container { background:transparent; padding-block:32px 48px; }
body.jj-refined-ui .main-cart__container > .page-width {
  width:calc(100% - 2 * var(--page-padding,30px)); padding:clamp(20px,3vw,36px);
  background:#fff; border:1px solid var(--jj-line); border-radius:20px; box-shadow:var(--jj-shadow);
}
body.jj-refined-ui .main-cart__container .cart-empty__body { padding-block:70px; min-height:260px; }
body.jj-refined-ui .section-main-not-found { background:transparent; padding:36px var(--page-padding,20px) 48px; }
body.jj-refined-ui .section-main-not-found > .page-width { max-width:760px; padding:60px 24px; background:#fff; border:1px solid var(--jj-line); border-radius:20px; box-shadow:var(--jj-shadow); }

/* Stable public app hooks; no changes to rewards membership or app storage. */
body.jj-refined-ui #member-system-plugin { font-family:var(--font-body-family,inherit); }
body.jj-refined-ui #member-system-plugin * { font-family:var(--jj-font, sans-serif) !important; }
body.jj-refined-ui #member-system-plugin [role="dialog"] { color:var(--jj-ink); border:1px solid var(--jj-line); border-radius:18px; box-shadow:0 14px 44px rgb(22 28 23 / 12%); }
body.jj-refined-ui #member-system-plugin [role="dialog"] button { min-height:44px; border-radius:10px; color:var(--jj-ink) !important; }
body.jj-refined-ui #member-system-plugin [role="dialog"] button[aria-label="Close"] { min-width:44px; }
body.jj-refined-ui #member-system-plugin > button { right:24px !important; bottom:24px !important; border:1px solid var(--jj-line); background:#f9fbf7 !important; box-shadow:var(--jj-shadow); min-height:44px; }
body.jj-refined-ui #advc-backTop { bottom:86px !important; right:24px !important; }
body.jj-refined-ui .advc-back-to-top--icon { background:#f9fbf7; border:1px solid var(--jj-line); border-radius:50%; }

@media (max-width:959px) {
  body.jj-refined-ui :is(.main-page,.main-article > div) { margin-block:24px 32px; padding:24px 18px; border-radius:16px; }
  body.jj-refined-ui .jj-policy-page { padding:24px 18px; margin-block:24px 32px; border-radius:16px; }
  body.jj-refined-ui .main-article__cover-image { margin-block:20px; }
  body.jj-refined-ui .jj-product-page { margin-block:16px 28px; }
  body.jj-refined-ui .jj-product-page .product-detail { padding:16px; border-radius:16px; }
  body.jj-refined-ui .jj-product-page .product-detail__main { gap:24px; }
  body.jj-refined-ui .jj-product-page .product-detail__info { gap:20px; --info-row-gap:20px; }
  body.jj-refined-ui .jj-product-page .product-detail__sell-info { gap:14px 12px; }
  body.jj-refined-ui .jj-product-page .product-description { font-size:15px; }
  body.jj-refined-ui :is(.customer-container,.customers-forgot-password__container) { padding-block:24px 32px; }
  body.jj-refined-ui :is(.customer-container > .customer,.customers-forgot-password-section) { padding:26px 20px; border-radius:16px; }
  body.jj-refined-ui .main-cart__container { padding-block:24px 32px; }
  body.jj-refined-ui .main-cart__container > .page-width { padding:20px; border-radius:16px; }
  body.jj-refined-ui .main-cart__container .cart-empty__body { padding-block:48px; min-height:220px; }
  body.jj-refined-ui .advc-footer-tab { height:auto; min-height:64px; padding:6px 10px calc(6px + env(safe-area-inset-bottom,0px)); background:#f8faf5 !important; border-top:1px solid #dce3d6; box-shadow:0 -4px 20px rgb(24 32 26 / 4%); }
  body.jj-refined-ui .advc-footer-tab__item { min-width:0; min-height:50px; border-radius:10px; color:#687061; padding:5px 4px; gap:3px; }
  body.jj-refined-ui .advc-footer-tab__title { font-family:inherit !important; font-size:11px !important; line-height:1.3; font-weight:500 !important; color:inherit !important; margin:0; }
  body.jj-refined-ui .advc-footer-tab__icon svg { width:24px; height:24px; }
  body.jj-refined-ui .advc-footer-tab__icon [stroke] { stroke:currentColor; stroke-width:1.5; }
  body.jj-refined-ui .advc-footer-tab__item[aria-current] { color:#283126; background:#e8eee2; }
  body.jj-refined-ui .advc-footer-tab__item:focus-visible { outline:2px solid #6c776c; outline-offset:-2px; }
  /* The app's inert placeholder already reserves the complete bar height. */
  body.jj-refined-ui:has(.advc-footer-tab--placeholder) { padding-bottom:0; }
  body.jj-refined-ui #member-system-plugin > button { right:16px !important; bottom:calc(82px + env(safe-area-inset-bottom,0px)) !important; }
  body.jj-refined-ui #advc-backTop { right:16px !important; bottom:calc(140px + env(safe-area-inset-bottom,0px)) !important; }
}
@media (max-width:359px) {
  body.jj-refined-ui .jj-product-page .product-detail__sell-info { grid-template-columns:1fr; }
  body.jj-refined-ui .jj-product-page .product-detail { padding:14px; }
  body.jj-refined-ui :is(.customer-container > .customer,.customers-forgot-password-section) { padding:24px 16px; }
}
