/* Public card actions only. Never a global button or Reader/app override. */
.fmp-catalog-card .fmp-card-action{gap:8px;align-items:stretch}
.fmp-catalog-card .fmp-primary-action{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0}
.fmp-catalog-card .fmp-primary-action :is(.fbp-format-actions,form){margin:0;min-width:0}
.fmp-catalog-card .fmp-primary-action :is(a.button,button.button){box-sizing:border-box;min-height:44px;max-width:100%;height:auto;white-space:normal;line-height:1.35;padding:10px 14px;font-size:14px;text-align:center}
.fmp-catalog-card .fmp-primary-action :is(a.button,button.button):not(.fwr-rate-review){color:#fff;-webkit-text-fill-color:currentColor!important;background:#14344e;border:1px solid #14344e;border-radius:8px;text-decoration:none;text-shadow:none}
.fmp-catalog-card .fmp-primary-action :is(a.button,button.button):not(.fwr-rate-review):hover{color:#fff;-webkit-text-fill-color:currentColor!important;background:#204b69}
.fmp-catalog-card .fmp-primary-action :is(a,button):focus-visible,.fmp-catalog-card .fmp-card-details:focus-visible{outline:3px solid #b27618;outline-offset:3px}
.fmp-catalog-card .fmp-primary-action .fwr-rate-review{order:2;align-self:center;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 10px;font-size:12px;color:var(--fmp-ink,var(--fbp-ink,#173248));-webkit-text-fill-color:currentColor!important;background:transparent;border:0;box-shadow:none;border-radius:0}
.fmp-catalog-card .fmp-primary-action .fwr-rate-review::before{content:'☆';font-size:21px;line-height:1}
.fmp-catalog-card .fmp-card-details{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:4px 8px;font-size:13px;line-height:1.3;color:var(--fmp-ink,#284c64);text-decoration:underline;text-underline-offset:3px;background:transparent;border:0}
.fmp-catalog-card .fmp-formats{font-size:13px;line-height:1.45;white-space:normal}
@media(max-width:600px){.fmp-catalog-card .fmp-card-action{margin-top:auto}.fmp-catalog-card .fmp-primary-action :is(a.button,button.button){font-size:13px;padding:10px}.fmp-result-row .fmp-card-action{width:100%;grid-column:1 / -1}}
/* Match existing native skin specificity; only secondary review controls change. */
body.fbp .fmp-studio-region.fbp-marketplace :is(.fmp-catalog-card .fmp-primary-action,.fmp-story-actions,.fmp-purchase-component) .fwr-rate-review{min-height:44px!important;padding:8px 10px!important;font:600 12px/1.35 Arial,Helvetica,sans-serif!important;color:var(--fmp-ink,var(--fbp-ink,#173248))!important;-webkit-text-fill-color:currentColor!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;text-shadow:none!important}
.fmp-studio-region.fbp-marketplace .fmp-story-actions{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.fmp-studio-region.fbp-marketplace .fmp-story-actions>.fwr-rate-review{order:2}
.fmp-studio-region.fbp-marketplace .fmp-story-actions>.fwr-rate-review::before{content:'☆';font-size:21px;line-height:1;margin-right:6px}
.fmp-studio-region.fbp-marketplace [data-fbp-summary-duplicate][hidden]{display:none!important}
@media(max-width:540px){.fmp-studio-region.fbp-marketplace .fmp-discovery-home>.fmp-page-heading{padding-bottom:16px;margin-bottom:0}.fmp-studio-region.fbp-marketplace .fmp-discovery-home>.fmp-shelf{padding-top:20px}.fmp-studio-region.fbp-marketplace .fmp-discovery-home .fmp-reader-discovery-entry{margin-top:12px}}
/* Native sheet specificity and form-control resets are deliberately accounted for. */
.fmp-studio-region.fbp-marketplace .fmp-catalog-card .fmp-card-info p.fmp-formats{font-size:13px;line-height:1.45}
.fmp-studio-region.fbp-marketplace .fmp-catalog-card .fmp-primary-action :is(a.button,button.button){min-height:44px!important}
@media(max-width:600px){.fmp-studio-region.fbp-marketplace .fmp-result-row.fmp-catalog-card .fmp-card-action{width:100%;grid-column:1 / -1}}
/* Reorder only actions already rendered by the owner's shelf field settings. */
.fbp-built-home .fbp-market-actions>[data-fbp-display-field="read"],.fbp-built-home .fbp-market-actions>[data-fbp-display-field="buy"],.fbp-built-home .fbp-market-actions>[data-fbp-display-field="library"]{order:-1}
body.fbp .fbp-built-home .fbp-market-actions>a.fbp-view-book{min-height:44px!important;font-size:12px!important;background:transparent!important;border:0!important;color:var(--fbp-ink,#243047)!important;-webkit-text-fill-color:currentColor!important;text-decoration:underline;text-underline-offset:3px;padding:8px!important}
body.fbp :is(.fbp-built-home .fbp-market-actions,.fmp-studio-region.fbp-marketplace .fmp-secondary-action) :is(.fbp-library-save,a.fbp-sf-wishlist,.fbp-sf-wishlist button,a.fbp-store-save,.fbp-store-save button){min-height:44px!important;padding:8px 10px!important;font:600 12px/1.35 Arial,Helvetica,sans-serif!important;color:var(--fbp-ink,#173248)!important;-webkit-text-fill-color:currentColor!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;text-shadow:none!important}
body.fbp :is(.fbp-built-home .fbp-market-actions,.fmp-studio-region.fbp-marketplace .fmp-secondary-action) :is(.fbp-library-save,a.fbp-sf-wishlist,.fbp-sf-wishlist button,a.fbp-store-save,.fbp-store-save button):focus-visible{outline:3px solid #b27618!important;outline-offset:3px!important}
body.fbp :is(.fbp-built-home .fbp-market-actions,.fmp-studio-region.fbp-marketplace .fmp-secondary-action) .fbp-library-save::before{content:'';display:inline-block;width:18px;height:18px;flex:0 0 18px;margin-right:6px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M3 4h7l2 2 2-2h7v16h-7l-2 2-2-2H3zm9 2v16'/%3E%3C/svg%3E") center/contain no-repeat;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M3 4h7l2 2 2-2h7v16h-7l-2 2-2-2H3zm9 2v16'/%3E%3C/svg%3E") center/contain no-repeat}

/* Phone discovery rails need room for real titles and native action forms.
   The stage-qualified scope also outranks the inherited Additional CSS copy
   without changing its settings, authored Builder rows or wider layouts. */
@media (max-width:540px) {
 .fmp-studio-region.fbp-marketplace .fmp-discovery-home:is([data-fmp-stage="shop"],[data-fmp-stage="story_home"]) .fbp-discovery-shelf-track {
  grid-auto-columns:min(100%,260px);
  align-items:start;
 }
 .fmp-studio-region.fbp-marketplace .fmp-discovery-home:is([data-fmp-stage="shop"],[data-fmp-stage="story_home"]) .fbp-discovery-shelf-track>.fmp-catalog-card {
  height:auto;
  align-self:start;
 }
 .fmp-studio-region.fbp-marketplace .fmp-discovery-home:is([data-fmp-stage="shop"],[data-fmp-stage="story_home"]) .fbp-discovery-shelf-track :is(.fmp-card-info,.fmp-card-action) {
  width:100%;
  max-width:none;
 }
 .fmp-studio-region.fbp-marketplace .fmp-discovery-home:is([data-fmp-stage="shop"],[data-fmp-stage="story_home"]) .fbp-discovery-shelf-track .fmp-card-action {
  margin-top:0;
 }
 .fmp-studio-region.fbp-marketplace .fmp-discovery-home:is([data-fmp-stage="shop"],[data-fmp-stage="story_home"]) .fbp-discovery-shelf-track .fmp-primary-action {
  width:100%;
 }
 .fmp-studio-region.fbp-marketplace .fmp-discovery-home:is([data-fmp-stage="shop"],[data-fmp-stage="story_home"]) .fbp-discovery-shelf-track .fmp-card-info :is(h3,p,a),
 .fmp-studio-region.fbp-marketplace .fmp-discovery-home:is([data-fmp-stage="shop"],[data-fmp-stage="story_home"]) .fbp-discovery-shelf-track .fmp-card-action :is(a,button,p,.fmp-price,.amount) {
  overflow-wrap:break-word;
  word-break:normal;
 }
}
