/* The chapter is a publication: one shared cover, price and catalog tile. */
.chapter-book {
  display: block;
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 640 / 906;
  background: var(--paper-soft);
  border-radius: 4px 2px 2px 4px;
  box-shadow: 5px 10px 19px #3b302329, 1px 2px 3px #3b302339;
}
.chapter-book img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 640 / 906;
  object-fit: cover;
  margin: 0;
  border: 1px solid #71604440;
  border-radius: inherit;
  mask-image: none;
  -webkit-mask-image: none;
}
.chapter-book::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg,#69553835 0%,#fff9e94d 1.1%,#fff9e94d 2%,#68533724 3.2%,#fff9e90d 4%,transparent 5.6%);
  box-shadow: inset 0 0 0 1px #fff9e965, inset 0 -2px 2px #68533724;
}
.chapter-book::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 2px -4px -2px auto;
  width: 5px;
  background: repeating-linear-gradient(90deg,#e9e1cd 0 1px,#c4b89c 1px 2px);
  border: 1px solid #a3937466;
  border-radius: 0 2px 2px 0;
}
.chapter-cover-link { display: block; width: min(100% - 36px,278px); margin: 0 auto 27px; transition: transform .18s ease; }
.chapter-cover-link:hover { transform: translateY(-4px); }
.chapter-card { border-radius: var(--site-panel-radius); display: flex; flex-direction: column; min-width: 0; padding: 0 0 22px; }
.grow-preview-card { border-radius: var(--site-panel-radius); }
.discovery-art { aspect-ratio: auto; }
.discovery-art img { height: auto; object-fit: cover; }
.discovery-card-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chapter-card-label { display: block; color: var(--muted); font: 600 10px/1.5 var(--shell-sans,var(--sans)); letter-spacing: .13em; text-transform: uppercase; margin: 0 0 7px; }
.chapter-card h3 { font: 600 25px/1.2 var(--serif); letter-spacing: -.5px; margin: 0 0 10px; overflow-wrap: anywhere; }
.chapter-card :is(.chapter-card-description,.discovery-card-copy>p) { color: var(--muted); font: 400 17px/1.45 var(--serif); margin: 0 0 17px; }
.chapter-card :is(.catalog-card-bottom,.discovery-card-bottom) { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 0; }
.chapter-view-button { font: 600 14px/1.4 var(--serif); gap: 12px; padding: 9px 13px; min-height: var(--button-min-height); white-space: nowrap; }
.discovery-tax { display: block; color: var(--muted); font-size: 12px; }
:is(.discovery-price,.catalog-card-price) { font: 400 24px/1.3 var(--serif); color: var(--action); font-variant-numeric: tabular-nums; }
.discovery-sample-link { align-self: flex-start; margin-top: 9px; border: 0; color: var(--muted); font-size: 11px; }
.discovery-sample-link:hover { color: var(--action); }
.discovery-grid { gap: 34px; }
.catalog-grid { gap: 43px 46px; }
.catalog-authored { padding-bottom: 16px; }
.catalog-authored,.printed-chapter-choices,.grow-workspace { scroll-margin-top: 0; }
.catalog-group { margin-bottom: 28px; }
.catalog-group-heading { margin-bottom: 30px; }
.planned-chapter-related .discovery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.planned-chapter-related .discovery-card { display: flex; }
.site-home-books { position: relative; width: min(100%,460px); height: 493px; margin: 0 auto; }
.site-home-main-book { position: absolute; z-index: 2; width: 308px; left: 50%; top: 0; transform: translateX(-50%); }
.site-home-main-book { transition: transform .18s ease; }
.site-home-main-book:hover { transform: translateX(-50%) translateY(-4px); }
.site-home-main-book:active { transform: translateX(-50%); }
.site-home-back-book { position: absolute; top: 46px; left: 4px; width: 257px; transform: rotate(-9deg); }
.site-home-back-book:nth-child(2) { left: auto; right: 4px; transform: rotate(9deg); }
.site-home-art figcaption { margin-top: 0; font: 400 18px/1.5 var(--serif); color: var(--ink); }
.site-home-art figcaption span { font: 400 11px/1.7 var(--shell-sans,var(--sans)); color: var(--muted); margin-top: 3px; }
.site-home-hero { padding-block: 55px 40px; gap: 50px; }
.catalog-book-shelf { position: relative; width: min(100%,340px); height: 235px; margin: 0 auto; }
.catalog-book-shelf .chapter-book { position: absolute; width: 133px; top: 24px; left: 2px; transform: rotate(-9deg); }
.catalog-book-shelf .chapter-book:nth-child(2) { width: 150px; top: 0; left: 95px; z-index: 2; transform: none; }
.catalog-book-shelf .chapter-book:nth-child(3) { left: auto; right: 2px; transform: rotate(9deg); }
.grow-hero { align-items: center; }
.grow-cover-art { width: min(100% - 36px,340px); margin: 20px auto; position: static; }
.grow-cover-art .chapter-book img { max-width: none; mask-image: none; -webkit-mask-image: none; }
.grow-cover-art figcaption { margin-top: 22px; color: var(--muted); }
.planned-chapter-cover { width: min(100% - 36px,320px); margin: 20px auto; }
.planned-chapter-cover .chapter-book img { width: 100%; box-shadow: none; }
:is(.grow-format-price,.bugout-price,.catalog-price,.planned-chapter-offer .catalog-price,.cart-item-price strong,.cart-summary dl>div:first-child dd,.checkout-subtotal strong,.sample-price>span,.printed-chapter-price) { color: var(--action); }
.grow-format-card:has(input:checked) { border-color: var(--action-border); box-shadow: inset 0 0 0 1px var(--action-border); }
.grow-format-card:has(input:checked) .grow-radio-dot::after { background: var(--action); }
.grow-radio-dot { color: var(--action); }
.grow-related-image { width: 100%; max-width: 118px; padding-inline-end: 4px; }
.grow-related-image,.printed-chapter-choices .chapter-book { transition: transform .18s ease; }
.grow-related-image:hover,.printed-chapter-choices .chapter-book:hover { transform: translateY(-4px); }
.library-cover-link { transition: transform .18s ease; }
.library-cover-link:hover { transform: translateY(-4px); }
.chapter-cover-link:active,.grow-related-image:active,.library-cover-link:active,.printed-chapter-choices .chapter-book:active { transform: translateY(0); }
.printed-chapter-choices li>a:focus-visible { outline: none; }
.printed-chapter-choices li>a:focus-visible .chapter-book { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
.grow-related-image .chapter-book img { box-shadow: none; }
.grow-related-grid h3 { font-weight: 600; }
.grow-reference-grid>* { min-width: 0; overflow-wrap: anywhere; }
.cart-cover .chapter-book { width: 100%; }
.cart-cover .chapter-book img { aspect-ratio: 640/906; object-fit: cover; }
.printed-chapter-choices li { padding-bottom: 25px; }
.printed-chapter-choices li>a { display: flex; flex-direction: column; height: 100%; align-items: flex-start; }
.printed-chapter-choices .chapter-book { width: min(100% - 36px,245px); margin: 0 auto 28px; }
.printed-chapter-choices .chapter-book img { width: 100%; max-width: none; margin: 0; mask-image: none; -webkit-mask-image: none; }
.printed-chapter-choices h3 { font-weight: 600; }
.printed-chapter-price { display: block; font: 400 25px/1.3 var(--serif); margin: 14px 0; }
.printed-chapter-choices .chapter-view-button { margin-top: auto; }
html[lang=ja] .chapter-card h3 { font-size: 23px; line-height: 1.5; }
html[lang=ja] .chapter-card :is(.chapter-card-description,.discovery-card-copy>p) { font-size: 15px; line-height: 1.7; }
html[lang=ja] .chapter-view-button { font-size: 14px; }
@media(max-width:1100px) {
 .discovery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 36px 48px; }
 .discovery-card { display: flex; }
 .chapter-cover-link { width: min(100% - 36px,270px); margin-bottom: 25px; }
 .site-home-hero { gap: 30px; }
 .site-home-books { height: 440px; max-width: 365px; }
 .site-home-main-book { width: 270px; }
 .site-home-back-book { width: 215px; top: 40px; }
 .catalog-grid { gap: 40px 32px; }
 .catalog-card .chapter-view-button { font-size: 14px; padding-inline: 12px; gap: 10px; }
}
@media(max-width:800px) {
 .site-home-books { height: 365px; max-width: 290px; }
 .site-home-main-book { width: 220px; }
 .site-home-back-book { width: 175px; top: 35px; }
 .site-home-hero { gap: 26px; }
 .chapter-card h3 { font-size: 25px; }
 .catalog-book-shelf { transform: scale(.88); transform-origin: right center; }
 .grow-cover-art { width: min(100% - 28px,300px); }
 .planned-chapter-related .discovery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
 .site-home-hero { gap: 34px; padding-block: 32px; }
 .site-home-art { width: 100%; max-width: 360px; }
 .site-home-books { height: 410px; max-width: 330px; }
 .site-home-main-book { width: 250px; }
 .site-home-back-book { width: 197px; top: 40px; }
 .site-home-art figcaption { font-size: 18px; }
 .discovery-grid,.catalog-grid,.planned-chapter-related .discovery-grid { grid-template-columns: 1fr; gap: 38px; }
 .chapter-card,.planned-chapter-related .discovery-card { display: flex; width: 100%; max-width: 420px; margin-inline: auto; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
 .chapter-cover-link,.planned-chapter-related .discovery-art { width: min(100% - 46px,278px); margin: 0 auto 27px; }
 .chapter-card h3 { font-size: 26px; }
 .chapter-card :is(.chapter-card-description,.discovery-card-copy>p) { font-size: 18px; margin-bottom: 17px; }
 :is(.discovery-price,.catalog-card-price) { font-size: 25px; }
 .chapter-card :is(.catalog-card-bottom,.discovery-card-bottom) { display: flex; gap: 12px; }
 .chapter-card .chapter-view-button { font-size: 15px; padding: 9px 17px; gap: 17px; }
 .discovery-sample-link { margin-top: 8px; }
 .catalog-page[data-catalog] .catalog-heading { gap: 20px; }
 .catalog-book-shelf { display: none; }
 .grow-cover-art { width: min(100% - 48px,300px); margin: 25px auto 30px; }
 .grow-cover-art figcaption { margin-top: 22px; }
 .grow-reference-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
 .planned-chapter-cover { width: min(100% - 48px,278px); max-width: none; }
 .printed-chapter-choices li>a { display: flex; }
 .printed-chapter-choices .chapter-book { width: min(100% - 48px,260px); margin: 0 auto 27px; }
 .printed-chapter-choices h3 { margin-bottom: 12px; }
 .printed-chapter-choices .chapter-view-button { margin-top: 0; }
 html[lang=ja] .chapter-card h3 { font-size: 24px; }
 html[lang=ja] .grow-hero h1 { font-size: clamp(28px,8.7vw,37px); line-height: 1.45; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
 html[lang=ja] .chapter-card .chapter-view-button { font-size: 14px; padding-inline: 14px; gap: 12px; }
}
@media(max-width:370px) {
 .site-home-books { max-width: 270px; height: 350px; }
 .site-home-main-book { width: 214px; }
 .site-home-back-book { width: 165px; }
 .chapter-card h3 { font-size: 25px; }
 .chapter-card .chapter-view-button { font-size: 14px; padding-inline: 12px; gap: 10px; }
 html[lang=ja] .chapter-card .chapter-view-button { font-size: 13px; padding-inline: 11px; gap: 8px; }
}
@media(prefers-reduced-motion:reduce) {
 .chapter-cover-link,.grow-related-image,.library-cover-link,.site-home-main-book,.printed-chapter-choices .chapter-book { transition: none; }
 .chapter-cover-link:hover,.grow-related-image:hover,.library-cover-link:hover,.printed-chapter-choices .chapter-book:hover { transform: none; }
 .site-home-main-book:hover { transform: translateX(-50%); }
}
@media print { .chapter-book { box-shadow: none; } .chapter-book::after { display: none; } .site-home-back-book { display: none; } }

/* Chapter detail covers enlarge without changing catalog-card navigation. */
.chapter-cover-preview { display: block; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--action); white-space: normal; }
.chapter-cover-preview:is(:hover,:focus-visible) { background: transparent; color: var(--action); }
.chapter-cover-preview .chapter-book { transition: transform .18s ease; }
.chapter-cover-preview:hover .chapter-book { transform: translateY(-4px); }
.chapter-cover-preview:active .chapter-book { transform: none; }
.chapter-cover-preview-cue { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: var(--button-min-height); margin-top: 12px; padding: 6px 10px; border-radius: var(--button-radius); font: 500 14px/1.5 var(--sans); }
.chapter-cover-preview:is(:hover,:focus-visible) .chapter-cover-preview-cue { background: var(--control-hover-surface); }
.chapter-cover-dialog { width: min(760px,calc(100% - 32px)); }
.chapter-cover-dialog .dialog-heading h2 { font-size: clamp(20px,3vw,30px); }
.chapter-cover-preview-stage { display: flex; justify-content: center; padding: 20px 4px 4px; }
.chapter-cover-preview-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: max(160px,calc(100dvh - 210px)); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 10px 25px #0002; }
@media(max-width:600px) { .chapter-cover-dialog { padding: 16px; } }
@media(prefers-reduced-motion:reduce) { .chapter-cover-preview .chapter-book { transition: none; } .chapter-cover-preview:hover .chapter-book { transform: none; } }
