/* R3.9 matte paper product presentation. The renderer can move commerce.css to the end of
   <head>; the scoped body + panel selectors intentionally retain precedence.
   No offer text, state, image crop, focus lifecycle or purchase logic changes. */
body dialog.r3-product-dialog {
  --sfw-paper:#fff;--sfw-paper-soft:#fff9fc;
  --product-edge:#0b0b0b;
  --product-rose:#515151;
  --product-note:#fff9fc;
  border-color:var(--product-edge);
  border-radius:12px;
  background:var(--sfw-paper,#fffdf9);
  box-shadow:4px 4px 0 #f7bed5;
  scroll-padding-block:80px 88px;
  scrollbar-color:#cbb2c0 #fbf7f9;
  scrollbar-width:thin;
}
body dialog.r3-product-dialog::backdrop {
  background:rgb(21 21 21 / .67);
  backdrop-filter:blur(7px);
}
body .r3-product-dialog #a3-product-detail {background:var(--sfw-paper,#fffdf9);}
body .r3-product-dialog #a3-product-detail .a3-product-detail__header {
  min-height:64px;padding:9px 24px 9px 32px;gap:16px;
  background:var(--product-note);color:var(--commerce-ink);
  border-bottom:1px solid var(--product-edge);
  box-shadow:0 2px 4px #27272706;
}
body .r3-product-dialog #a3-product-detail #a3-detail-eyebrow {
  display:flex;align-items:center;gap:12px;
  color:#4b4b4b;font-size:12px;line-height:1.5;letter-spacing:.06em;
}
body .r3-product-dialog #a3-product-detail #a3-detail-eyebrow::before {
  content:"";flex:none;width:22px;height:22px;border:1px solid #d7adbf;
  border-radius:7px 7px 11px 11px;
  background:#F3DCE6;
  box-shadow:inset 0 0 0 4px #fffafc;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__first-glance {
  gap:32px;padding:30px 32px 32px;
  background:var(--sfw-paper,#fffdf9);
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__title-row {margin-bottom:10px;}
body .r3-product-dialog #a3-product-detail .commerce-product-accent {color:var(--product-rose);}
body .r3-product-dialog #a3-product-detail .commerce-product-short-value {
  max-width:48ch;margin:14px 0 20px;color:#5a515a;font-size:15px;line-height:1.65;
}
/* R3.21: let the original cover meet the page without nested mats.
   Existing crop maps, gallery controls and source ratios stay intact. */
body .r3-product-dialog #a3-product-detail .a3-product-detail__visual {
  padding:0;border:0;border-radius:0;
  background:transparent;box-shadow:none;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__visual>figure,
body .r3-product-dialog #a3-product-detail .commerce-product-main-cover {
  padding:0;border:0;border-radius:12px;
  background:transparent;box-shadow:none;
}
body .r3-product-dialog #a3-product-detail .commerce-product-main-cover .r5-art-frame,
body .r3-product-dialog #a3-product-detail .a3-product-detail__visual>figure>.r5-art-frame {border-radius:12px;}
body .r3-product-dialog #a3-product-detail :is(.r5-preview-rail,.commerce-image-tools) {
  margin-top:12px;padding:12px 0 0;border-top:1px solid #e6d5df;
}
body .r3-product-dialog #a3-product-detail .commerce-gallery-controls {gap:8px;justify-content:center;}
body .r3-product-dialog #a3-product-detail :is(.r5-preview-rail,.commerce-image-tools) button {
  min-width:44px;min-height:44px;border:1px solid #d8becb;border-radius:12px;
  background:#fff;color:#343434;box-shadow:0 2px 5px #2c2c2c06;
}
body .r3-product-dialog #a3-product-detail :is(.r5-preview-rail,.commerce-image-tools) button:disabled {
  color:#7a6c75;background:#f8f2f5;border-color:#e7dce2;box-shadow:none;
}
body .r3-product-dialog #a3-product-detail .commerce-gallery-pages {justify-content:center;gap:6px;margin-top:10px;}
body .r3-product-dialog #a3-product-detail .r5-preview-rail button[data-slide][aria-current=true] {
  background:#f1dbe6;color:#353535;border-color:#c68ca6;
  box-shadow:inset 0 0 0 1px #fff8;
}
/* Real fact labels are visible again; the icon and fine rule aid scanning. */
body .r3-product-dialog #a3-product-detail .a3-product-detail__quick {margin:0;}
body .r3-product-dialog #a3-product-detail #a3-detail-quick {
  gap:0;padding:2px 0;border-top:1px solid #eaddE4;border-bottom:1px solid #eaddE4;
}
body .r3-product-dialog #a3-product-detail #a3-detail-quick>li {gap:12px;padding:11px 0;}
body .r3-product-dialog #a3-product-detail #a3-detail-quick>li+li {border-top:1px dashed #e9dfe5;}
body .r3-product-dialog #a3-product-detail #a3-detail-quick small {
  display:block;margin:0 0 3px;color:#636363;font-size:12px;line-height:1.4;
  letter-spacing:.04em;text-transform:none;font-weight:600;
}
body .r3-product-dialog #a3-product-detail #a3-detail-quick strong {font-size:14px;line-height:1.55;}
body .r3-product-dialog #a3-product-detail .commerce-value-mark {
  flex-basis:36px;width:36px;height:36px;border-radius:11px;
  background:#f7e7ef;color:#4b4b4b;box-shadow:inset 0 0 0 1px #edd3df,inset 0 2px 0 #fff;
}
/* The existing price/action/status nodes form a single compact offer card. */
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(148px,.86fr);
  align-items:center;gap:12px 16px;margin-top:20px;padding:18px;
  border:1px solid #0b0b0b;border-radius:12px;background:#fff;
  box-shadow:4px 4px 0 #f7bed5;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>* {grid-column:1/-1;min-width:0;}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>.payment-selection-summary {grid-column:1;gap:6px;}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>.payment-button {
  grid-column:2;min-height:48px;border-radius:13px;
  background:#212121;border-color:#212121;color:#fff;
  box-shadow:0 4px 9px #21212110;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>.payment-button--availability {
  background:#ff86b0;border-color:#0b0b0b;color:#0b0b0b;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>.payment-button--availability:hover:not(:disabled) {
  background:#eac7d7;border-color:#b87d97;color:#282828;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>.payment-button:disabled {
  color:#71656d;background:#eee5eb;border-color:#d8c8d2;box-shadow:none;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary .payment-amount {max-width:100%;font-size:44px;white-space:normal;flex-wrap:wrap;}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary .payment-value {white-space:nowrap;}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary .payment-term-summary {font-size:13px;line-height:1.5;color:#685a64;}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary :is(.payment-status,small) {font-size:13px;line-height:1.6;color:#5a5a5a;}
body .r3-product-dialog #a3-product-detail .a3-product-detail__primary .payment-status:empty {display:none;}
body .r3-product-dialog #a3-product-detail .payment-term-selector {font-weight:500;gap:8px;}
body .r3-product-dialog #a3-product-detail .payment-term-selector select {
  min-height:46px;border-color:#cdb5c3;border-radius:11px;background:#fff;
}
body .r3-product-dialog #a3-product-detail .payment-availability {
  margin:0;padding:15px;border:1px solid #dfc4d2;border-radius:13px;background:#fff;
}
body .r3-product-dialog #a3-product-detail .payment-availability-links {display:flex;flex-wrap:wrap;gap:4px 16px;}
/* Inclusion and comparison content uses readable cards instead of a long
   unbroken list. Native details/summary open and closed states are untouched. */
body .r3-product-dialog #a3-product-detail .a3-product-detail__scope {
  margin:0 32px 24px;padding:26px 0 0;gap:22px;border-top-color:var(--product-edge);
}
body .r3-product-dialog #a3-product-detail .commerce-scope-group {
  margin:0;padding:0 20px;border:1px solid var(--product-edge);border-radius:10px;
  background:#fff;box-shadow:2px 3px 0 #EAD5DE;
}
body .r3-product-dialog #a3-product-detail .commerce-scope-group--separate {background:#fcf8fa;}
body .r3-product-dialog #a3-product-detail .commerce-scope-group.commerce-scope-group--included>summary {
  min-height:68px;padding:16px 0;font-size:27px;
}
body .r3-product-dialog #a3-product-detail #a3-detail-included {gap:0;}
body .r3-product-dialog #a3-product-detail #a3-detail-included>li {
  grid-template-columns:36px minmax(0,1fr);gap:12px;padding:14px 0;
}
body .r3-product-dialog #a3-product-detail #a3-detail-included>li+li {border-top:1px solid #eee4e9;}
body .r3-product-dialog #a3-product-detail #a3-detail-included>li:first-child {padding-top:2px;}
body .r3-product-dialog #a3-product-detail #a3-detail-included>li:last-child {padding-bottom:0;}
body .r3-product-dialog #a3-product-detail .commerce-scope-icon {
  width:36px;height:36px;padding:8px;background:#fcf6f9;color:#616161;
  border-radius:11px;box-shadow:inset 0 0 0 1px #ebd5e0;
}
body .r3-product-dialog #a3-product-detail .commerce-basic-comparison {
  padding:18px;gap:22px;border-color:#decbd6;border-radius:16px;
  background:#FAF6F8;box-shadow:2px 3px 0 #EAD5DE;
}
body .r3-product-dialog #a3-product-detail .commerce-basic-comparison figure {
  padding:5px;border:1px solid #e3d2dc;background:#fff;border-radius:13px;
  box-shadow:0 3px 8px #3030300a;
}
body .r3-product-dialog #a3-product-detail .commerce-basic-comparison figure .r5-art-frame {border-radius:8px;}
body .r3-product-dialog #a3-product-detail .commerce-basic-comparison a {
  min-height:44px;padding:8px 12px;border:1px solid #e0becf;border-radius:11px;
  background:#fff;color:#484848;text-decoration:none;width:fit-content;
}
body .r3-product-dialog #a3-product-detail .a3-product-detail__lower {margin:0 32px 24px;}
body .r3-product-dialog #a3-product-detail .a3-product-detail__lower>.commerce-disclosure {
  margin-bottom:10px;padding-inline:20px;border-color:var(--product-edge);border-radius:16px;
  background:#fff;box-shadow:0 2px 6px #20202003;
}
body .r3-product-dialog #a3-product-detail .commerce-disclosure>summary {
  min-height:60px;gap:14px;line-height:1.45;font-size:15px;
}
body .r3-product-dialog #a3-product-detail .commerce-disclosure>summary::after {
  width:30px;height:30px;flex-basis:30px;border-radius:10px;
  color:#5e5e5e;background:#fcf3f7;border-color:#ead5df;
}
body .r3-product-dialog #a3-product-detail .commerce-disclosure[open]>summary::after {background:#f0d9e5;border-color:#dbb5c8;}
body .r3-product-dialog #a3-product-detail .commerce-disclosure dt {color:#5b5b5b;font-size:13px;}
body .r3-product-dialog #a3-product-detail .commerce-disclosure dd {padding-bottom:12px;border-bottom:1px solid #eee5ea;}
body .r3-product-dialog #a3-product-detail .r3-product-top-facts {padding:12px 14px;border:1px solid #eadce3;border-radius:12px;background:#fcf8fa;}
body .r3-product-dialog #a3-product-detail .r3-product-footer {
  position:relative;bottom:0;z-index:4;gap:10px;padding:14px 32px max(14px,env(safe-area-inset-bottom));
  background:var(--product-note);border-color:var(--product-edge);
}
body .r3-product-dialog #a3-product-detail .r3-product-footer>:is(a,button) {
  min-height:44px;border-color:#dfc9d5;border-radius:12px;background:#fff;
  color:#393939;padding:9px 15px;font-size:13px;
}
body .r3-product-dialog #a3-product-detail .r3-product-footer>button {background:#f4e1eb;border-color:#dbb6c9;}
body .r3-product-dialog #a3-product-detail :is(button,a,select,summary,img[role=button]):focus-visible {
  outline:3px solid #707070;outline-offset:4px;
}
/* A broad Premium inclusion panel avoids a tall empty second column. */
@media(min-width:801px) {
  body .r3-product-dialog #a3-product-detail[data-detail-family=premium] .commerce-scope-group--included {grid-column:1/-1;}
  body .r3-product-dialog #a3-product-detail[data-detail-family=premium] #a3-detail-included {grid-template-columns:repeat(2,minmax(0,1fr));column-gap:26px;}
  body .r3-product-dialog #a3-product-detail[data-detail-family=premium] #a3-detail-included>li {padding:14px 0;border-top:1px solid #eee4e9;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison {grid-column:1/-1;grid-template-columns:112px minmax(0,1fr);align-items:center;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison>div {display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:0 24px;align-items:start;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison h3 {grid-column:1;grid-row:1;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison .r5-price {grid-column:1;grid-row:2;margin-bottom:0;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison ul {grid-column:2;grid-row:1/3;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison a {grid-column:2;grid-row:3;margin-top:5px;}
}
@media(min-width:801px) and (min-height:720px) {
  body .r3-product-dialog #a3-product-detail .r3-product-footer {position:sticky;box-shadow:0 -2px 6px #2a2a2a08;}
}
@media(max-width:1000px) {
  body .r3-product-dialog #a3-product-detail .a3-product-detail__primary {grid-template-columns:minmax(0,1fr);}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>:is(.payment-selection-summary,.payment-button) {grid-column:1;}
}
@media(max-width:800px) {
  body dialog.r3-product-dialog {width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:16px;scroll-padding-block:72px 24px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__header {min-height:58px;padding:7px 12px 7px 18px;}
  body .r3-product-dialog #a3-product-detail #a3-detail-eyebrow {font-size:12px;gap:9px;letter-spacing:.01em;}
  body .r3-product-dialog #a3-product-detail #a3-detail-eyebrow::before {width:18px;height:18px;border-radius:6px 6px 9px 9px;box-shadow:inset 0 0 0 3px #fffafc;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__first-glance {grid-template-columns:minmax(0,1fr);padding:22px 16px;gap:16px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__identity {display:contents;}
  body .r3-product-dialog #a3-product-detail .commerce-product-short-value {margin:0;font-size:14px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__visual {padding:0;border-radius:0;max-width:470px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__visual>figure,
  body .r3-product-dialog #a3-product-detail .commerce-product-main-cover {padding:0;border-radius:12px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__primary {grid-template-columns:1fr;margin:0;padding:16px;border-radius:14px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__primary>:is(.payment-selection-summary,.payment-button) {grid-column:1;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__primary .payment-amount {font-size:40px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__quick {width:100%;margin-top:2px;}
  body .r3-product-dialog #a3-product-detail #a3-detail-quick>li {padding:12px 0;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__scope {grid-template-columns:1fr;margin:0 16px 20px;padding-top:20px;gap:16px;}
  body .r3-product-dialog #a3-product-detail .commerce-scope-group {padding-inline:16px;border-radius:14px;}
  body .r3-product-dialog #a3-product-detail .commerce-scope-group.commerce-scope-group--included>summary {font-size:25px;min-height:62px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__lower {margin:0 16px 20px;}
  body .r3-product-dialog #a3-product-detail .a3-product-detail__lower>.commerce-disclosure {padding-inline:16px;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison {grid-template-columns:32% minmax(0,1fr);padding:14px;gap:15px;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison h3 {font-size:28px;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison .r5-price {font-size:32px;}
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison a {font-size:13px;}
  body .r3-product-dialog #a3-product-detail .r3-product-footer {padding:14px 16px max(14px,env(safe-area-inset-bottom));justify-content:flex-start;}
  body .r3-product-dialog #a3-product-detail .r3-product-footer>:is(a,button) {flex:1 1 auto;}
}
@media(hover:hover) {
  body .r3-product-dialog #a3-product-detail :is(.r5-preview-rail,.commerce-image-tools) button:hover:not(:disabled),
  body .r3-product-dialog #a3-product-detail .commerce-basic-comparison a:hover,
  body .r3-product-dialog #a3-product-detail .r3-product-footer>:is(a,button):hover {background:#f5e4ed;border-color:#ca98af;}
  body .r3-product-dialog #a3-product-detail .commerce-disclosure>summary:hover {color:#626262;}
}
@media(prefers-reduced-motion:reduce) {
  body .r3-product-dialog #a3-product-detail :is(button,a,summary) {transition:none;}
}
