/* Append-only presentation layer. Official anchor/img/text nodes stay intact. */
.page-detail .detail-lower-grid > .section {min-width:0;}
@media(min-width:1024px) {
  .page-detail .volume-strip {--volume-gap:12px; gap:var(--volume-gap); padding-inline:0;}
  .page-detail .volume-card {flex:0 0 calc((100% - 5 * var(--volume-gap)) / 5.5);}
}
.page-detail .volume-card > .official-code {min-height:62px; align-items:stretch;}
.page-detail .volume-card > .official-code > a {
  display:block; width:100%; padding:10px 6px; text-align:center;
  white-space:normal; word-break:normal; overflow-wrap:normal; text-wrap:balance;
  font-size:12px; line-height:1.65;
}
/* Uniform tag palette. Active filter buttons keep their check plus emphasis. */
body .tag,body .tag:nth-child(2n),body .tag.status {background:#edf3f8; color:#40566e; border-color:#dbe5ee;}
body .genre-chip,body .genre-chip:nth-child(3n+2),body .genre-chip:nth-child(3n) {background:#edf3f8; color:#40566e; border-color:#dbe5ee;}
.filter-tag:not(.is-selected) {background:#fff; color:#405670; border-color:#d9e4ee;}
.synopsis-origin {display:inline-block; margin:0 0 12px; padding:4px 8px; border-radius:6px; background:#f1f5f9; color:#5b6d83; font-size:11px; line-height:1.6;}
.detail-engagement {padding:14px; margin:12px 0 17px; border:1px solid #f0bed7; border-radius:13px; background:linear-gradient(120deg,#fff6fb,#f5faff);}
.detail-demo-note {margin:0 0 11px; font-size:11px; color:#607089; line-height:1.7;}
.detail-demo-note strong {display:block; margin-bottom:2px; color:#8f2760; font-size:12px;}
.detail-action-grid {display:grid; grid-template-columns:minmax(0,1fr); gap:14px;}
.detail-action-grid h2 {margin:0 0 8px; font-size:15px; line-height:1.6; color:#273f5a;}
.detail-vote-action > .btn {width:100%; min-height:48px; font-size:16px; font-weight:800; padding:10px 12px; justify-content:center;}
.detail-vote-action > .btn.voted {opacity:1; color:#765067; background:#f5e6ee; border-color:#e5c7d8;}
.detail-vote-status,.detail-rating-status {margin:7px 0 3px; font-size:12px; line-height:1.7; color:#69536a;}
.detail-reference-votes {display:block; margin-top:5px; color:#738095; font-size:10px; line-height:1.6;}
.detail-quick-stars {display:flex; flex-wrap:wrap; gap:5px;}
.detail-quick-stars button {display:grid; place-items:center; width:44px; height:46px; padding:0; border:1px solid #e2c96e; border-radius:8px; background:#fff9e6; color:#a58b42; font-size:28px; line-height:1; cursor:pointer;}
.detail-quick-stars button.active {border-color:#bd8500; background:#ffeaaa; color:#875900;}
.detail-rating-more {min-height:36px; border:0; background:transparent; color:#347ca2; font:inherit; font-size:11px; padding:4px 0; cursor:pointer;}
.detail-engagement button:focus-visible,.detail-vote-status:focus-visible {outline:3px solid #177fb7; outline-offset:3px;}
@media(min-width:1200px) {.detail-action-grid {grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px;}}
@media(max-width:639px) {
  .detail-engagement {padding:12px; margin:12px 0 15px;}
  .detail-vote-action > .btn {min-height:49px; font-size:16px;}
  .detail-demo-note {font-size:11px;}.detail-action-grid {gap:13px;}
  .detail-rating-more {min-height:44px; font-size:12px;}
}

/* Owned store caption outside the immutable official affiliate HTML. */
.page-detail .trial-store-caption{display:block;margin:8px 0 5px;font-size:12px;font-weight:800;line-height:1.5;color:#384b63;text-align:center;}

/* BookLive owns the primary action; supplemental stores retain their issued HTML. */
.page-detail .secondary-store-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:end;}
.page-detail .secondary-store-links:has(>:only-child){grid-template-columns:1fr;}
.page-detail .secondary-store-links:empty{display:none;}
.page-detail .secondary-store-links>*{min-width:0;}
.page-detail .secondary-store-links .btn{width:100%;white-space:normal;text-wrap:balance;font-size:12px;}
.page-detail .free-range-highlight{display:block;padding:12px 10px;margin:12px 0;border:2px solid #eb5b98;border-radius:10px;background:#fff0f7;color:#a72562;font-size:20px;line-height:1.5;text-align:center;}
.page-detail .primary-store-caption{font-size:12px;font-weight:800;text-align:center;}

/* Detail cleanup: one upper rating control, two equal supplemental store columns. */
.page-detail #detail-rating{min-width:0;scroll-margin-top:110px;}
.page-detail #detail-rating:focus{outline:none;}
.page-detail #detail-rating:focus-visible{outline:3px solid #177fb7;outline-offset:4px;}
.page-detail .detail-upper-rating{padding:0;text-align:left;}
.page-detail .detail-upper-rating>.stars-input{display:flex;flex-wrap:nowrap;gap:4px;}
.page-detail .detail-upper-rating>.stars-input>button{min-width:0;flex:1;max-width:46px;width:auto;min-height:44px;padding:0;font-size:27px;}
.page-detail .detail-upper-rating>p{font-size:12px;line-height:1.7;margin:6px 0;}
.page-detail .detail-side .store-links{display:flex;flex-direction:column;}
.page-detail .secondary-store-links{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;}
.page-detail .secondary-store-links>.btn{margin:0;min-height:52px;display:flex;align-items:center;justify-content:center;}
.page-detail .secondary-store-links>.bukkomi-supplement{padding:0;flex-direction:column;}
.page-detail .secondary-store-links>.bukkomi-supplement>a{width:100%;min-height:50px;display:flex;align-items:center;justify-content:center;padding:6px;}
.page-detail .secondary-store-links:has(>:only-child){grid-template-columns:1fr;}
