/* Sale-red BOOKS CTAs with the site's prism retained on offer cards. */
body.yms-profile-books .yf-fanza-cta { margin: 22px 0; }
body.yms-profile-books .yf-fanza-cta__link,
body.yms-profile-books .yms-offer > a {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; box-sizing: border-box; width: 100%; padding: 15px 24px;
  border: 2px solid #bb0b2a; border-radius: 7px !important;
  background: linear-gradient(135deg, #df1637, #bb0b2a) !important;
  color: #fff !important; font-size: 16px; font-weight: 800; line-height: 1.5;
  text-decoration: none !important; text-align: center;
  box-shadow: 0 5px 16px rgb(187 11 42 / 18%);
  transition: box-shadow .15s ease;
}
body.yms-profile-books .yf-fanza-cta__link::after,
body.yms-profile-books .yms-offer > a::after { content: '→'; font-size: 20px; }
body.yms-profile-books .yf-fanza-cta__link:hover,
body.yms-profile-books .yms-offer > a:hover { background: linear-gradient(135deg, #c71030, #a20723) !important; box-shadow: 0 8px 22px rgb(187 11 42 / 25%); transform: none; }
body.yms-profile-books .yf-fanza-cta__link:focus-visible,
body.yms-profile-books .yms-offer > a:focus-visible,
body.yms-profile-books .yms-books-continuation > a:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 4px; }
body.yms-profile-books .yms-dealinfo { margin: 36px 0; padding: 0; border: 0; background: transparent; }
body.yms-profile-books .yms-dealinfo > h2 { font-size: 22px; margin-bottom: 12px; }
body.yms-profile-books .yms-dealinfo__offers-h { margin: 0 0 18px; font-size: 14px; color: var(--text-soft); }
body.yms-profile-books .yms-offers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
body.yms-profile-books .yms-offer {
  position: relative; overflow: hidden; margin: 0; padding: 24px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  box-shadow: 0 6px 20px rgb(23 23 28 / 4%); list-style: none;
}
body.yms-profile-books .yms-offer::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--prism); }
body.yms-profile-books .yms-offer > b { padding: 0; margin: 0 0 10px; background: none; color: var(--text); border-radius: 0; font-size: 18px; }
body.yms-profile-books .yms-offer__lead { font-size: 15px; line-height: 1.85; color: var(--text-soft); }
body.yms-profile-books .yms-offer--books { border-color: #e8c4cc; box-shadow: 0 8px 24px rgb(187 11 42 / 7%); }
body.yms-profile-books .yms-books-coupon__headline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; text-align: left; }
body.yms-profile-books .yms-books-coupon__badge { padding: 2px 5px; border-radius: 3px; background: #bb0b2a; color: #fff; font-size: 11px; font-weight: 800; }
body.yms-profile-books .yms-books-coupon__headline strong { color: #bb0b2a; font-size: 32px; font-weight: 900; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: lining-nums; }
body.yms-profile-books .yms-books-coupon__headline small { margin-left: 2px; font-size: 14px; letter-spacing: 0; }
body.yms-profile-books .yms-books-coupon__limit { color: var(--text); font-size: 12px; font-weight: 700; }
body.yms-profile-books .yms-offer > a .yms-offer__icon { flex: 0 0 24px; }
body.yms-profile-books .yms-offer > a span { min-width: 0; }
@media (max-width: 600px) {
  body.yms-profile-books .yms-offer { padding: 20px 16px; }
  body.yms-profile-books .yf-fanza-cta__link, body.yms-profile-books .yms-offer > a { padding: 14px 16px; font-size: 15px; }
  body.yms-profile-books .yms-offer > .yms-books-coupon__claim { gap: 8px; padding-right: 10px; padding-left: 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { body.yms-profile-books .yf-fanza-cta__link, body.yms-profile-books .yms-offer > a { transition: none; } }

/* Disclosure lives on the title band, without a dedicated row before the pages. */
body.yms-profile-books :is(.yms-ghero__in, .yms-package-header):has(> .yms-books-hero-pr) {
  position: relative;
}
body.yms-profile-books .yms-books-hero-pr {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  padding: 2px 6px; border-radius: 3px; background: rgb(0 0 0 / 65%);
  color: #fff; font-size: 11px; line-height: 16px;
}
body.yms-profile-books :is(.yms-ghero__in, .yms-package-header):has(> .yms-books-hero-pr) > .yms-gcrumb {
  padding-right: 36px;
}
body.yms-profile-books .yms-gmain:has(> .yms-single .yf-fanza-books-trial) {
  row-gap: 0;
}
body.yms-profile-books .yms-gmain:has(> .yms-single .yf-fanza-books-trial) > .yms-pinfo {
  margin-bottom: 0;
}
body.yms-profile-books .entry-content:has(.yf-fanza-books-trial) > .yf-fanza-article {
  margin-top: 0;
}
body.yms-profile-books .entry-content .yf-fanza-article .yf-fanza-books-trial {
  margin: 0 auto; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none;
}

/* Two matching offer rows; eligibility is checked at each official destination. */
body.yms-profile-books .yms-dealinfo :is(.yms-offer--books, .yms-offer--premium-compact) {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 44%);
  grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 10px 12px;
  min-height: 86px; box-sizing: border-box; border-color: var(--line); box-shadow: none;
}
body.yms-profile-books .entry-content .yms-dealinfo { margin: 8px 0; }
body.yms-profile-books .entry-content .yms-dealinfo .yms-offers { gap: 6px; }
body.yms-profile-books .yms-dealinfo :is(.yms-offer--books, .yms-offer--premium-compact) > b {
  grid-column: 1; grid-row: 1; margin: 0; font-size: 14px; line-height: 1.5;
}
body.yms-profile-books .yms-dealinfo :is(.yms-offer--books, .yms-offer--premium-compact) > .yms-books-coupon__headline { grid-column: 1; grid-row: 2; }
body.yms-profile-books .yms-dealinfo :is(.yms-offer--books, .yms-offer--premium-compact) > a {
  grid-column: 2; grid-row: 1 / span 2; width: 100%; min-height: 56px;
  padding: 8px 10px; gap: 6px; font-size: 13px; line-height: 1.4;
  box-shadow: none; border-width: 1px; box-sizing: border-box;
}
body.yms-profile-books .yms-dealinfo .yms-offer > a .yms-offer__icon {
  width: 18px; height: 18px; flex-basis: 18px;
}
body.yms-profile-books .yms-dealinfo .yms-offer > a::after { font-size: 16px; }
/* The original package and its title form one ordinary, full-size work link. */
body.yms-profile-books .entry-content > .yms-books-continuation { width: min(100%, 420px); margin: 10px auto; padding: 0; border: 0; }
body.yms-profile-books .yms-books-continuation > .yf-fanza-cover__link {
  display: block; padding: 0; min-height: 0; background: transparent; box-shadow: none;
}
body.yms-profile-books .yms-books-continuation .custom-thumb-foreground { display: block; width: 100%; padding: 0; }
body.yms-profile-books .yms-books-continuation .custom-thumb-foreground img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
body.yms-profile-books .yms-books-continuation__title { display: block; margin-top: 6px; color: var(--text); font-size: 14px; font-weight: 700; line-height: 1.5; text-align: left; }
body.yms-profile-books .yms-books-continuation > .yms-books-download { margin-top: 10px; }
/* Same information, presented as thin label/value rows rather than large tiles. */
body.yms-profile-books .entry-content .yf-fanza-article > .yms-books-facts { margin: 10px 0 0; }
body.yms-profile-books .entry-content .yms-books-facts > h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 15px; line-height: 1.5; }
body.yms-profile-books .entry-content .yms-books-facts .yf-template-cid { margin: 0 0 4px; font-size: 11px; line-height: 1.5; }
body.yms-profile-books .entry-content .yms-books-facts .yf-fanza-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; gap: 0; border: 1px solid var(--line); }
body.yms-profile-books .entry-content .yms-books-facts .yf-fanza-facts > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px; align-items: baseline; margin: 0; padding: 5px 8px; border: 0; border-bottom: 1px solid var(--line); }
body.yms-profile-books .entry-content .yms-books-facts :is(dt, dd) { margin: 0; padding: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
body.yms-profile-books .entry-content .yms-books-facts dt { color: var(--text-soft); font-weight: 500; }
body.yms-profile-books .entry-content .yf-fanza-article > .yms-books-facts + p { margin: 4px 0; font-size: 11px; line-height: 1.5; color: var(--text-soft); }
@media (max-width: 600px) {
  body.yms-profile-books .yms-dealinfo :is(.yms-offer--books, .yms-offer--premium-compact) { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px; }
  body.yms-profile-books .yms-dealinfo :is(.yms-offer--books, .yms-offer--premium-compact) > a { grid-column: 1; grid-row: 3; }
  body.yms-profile-books .entry-content .yms-books-facts .yf-fanza-facts { grid-template-columns: minmax(0, 1fr); }
}
