/* Bookshelf display. Section background is the requested solid color. */
.bookrail { background: #fbf7f0; background-image: none; padding: 61px 0 55px; color: #17392b; border-block: 1px solid #e7dfcf; }
.bookrail__container { width: min(1480px,calc(100% - 120px)); margin-inline: auto; }
.bookrail__heading { display: grid; grid-template-columns: minmax(0,1fr) 260px; align-items: center; gap: 48px; margin-bottom: 23px; }
.bookrail .bookrail__eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; text-align: left; font: 500 11px/1.5 Arial,sans-serif; text-transform: uppercase; letter-spacing: .23em; color: #a37d42; }
.bookrail__eyebrow::after { content: ''; display: block; width: 80px; height: 1px; background: #b18e50; }
.bookrail h2 { color: #133328; font: 400 clamp(40px,4.6vw,78px)/1.1 'PP Editorial New',Georgia,serif; letter-spacing: -.035em; margin: 0; text-align: left; }
.bookrail .bookrail__description { color: #2c4536; font: 400 clamp(17px,1.4vw,23px)/1.35 Georgia,serif; max-width: 790px; margin: 12px 0 0; text-align: left; }
.bookrail__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 23px; }
.bookrail__filters button { display: block; border: 1px solid #c4a674; border-radius: 99px; min-width: 91px; min-height: 42px; padding: 9px 22px; background: transparent; color: #19392a; font: 400 16px/1.25 Georgia,serif; cursor: pointer; transition: background .2s,color .2s; }
.bookrail__filters button[aria-pressed=true] { background: #365642; color: #fff5d6; box-shadow: inset 0 0 0 2px #fff4; }
.bookrail__filters button:hover { background: #e9e1d2; }
.bookrail__filters button[aria-pressed=true]:hover { background: #294a36; }
.bookrail__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 17px; padding-top: 25px; }
.bookrail__controls { display: flex; align-items: center; gap: 15px; }
.bookrail__controls button { display: grid; place-items: center; width: 55px; height: 55px; padding: 13px; border: 1px solid #b99a63; border-radius: 50%; color: #23422f; background: transparent; transition: background .2s,color .2s; cursor: pointer; }
.bookrail__controls button svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.bookrail__controls button:hover:not(:disabled) { background: #365642; color: #fff; }
.bookrail__controls button:disabled { opacity: .3; cursor: default; }
.bookrail .bookrail__browse { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 57px; border: 1px solid #bd9b5f; border-radius: 99px; padding: 13px 25px; background: #193c2d; color: #f5e6be; font: 400 21px/1.2 Georgia,serif; box-shadow: inset 0 0 0 3px #fff8; cursor: pointer; white-space: nowrap; }
.bookrail__browse svg { width: 23px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.bookrail__browse:hover { background: #365642; }
.bookrail__track { display: flex; align-items: stretch; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 21px 6px 8px; margin-inline: -6px; scroll-padding-inline: 6px; touch-action: pan-x pan-y; }
.bookrail__track::-webkit-scrollbar { display: none; }
.bookrail__track figure { flex: 0 0 calc((100% - 120px)/6); min-width: 0; display: flex; flex-direction: column; align-items: center; margin: 0; scroll-snap-align: start; }
.bookrail__cover { --cover-height: clamp(265px,21.8vw,360px); position: relative; display: flex; align-items: flex-end; justify-content: center; height: var(--cover-height); width: 100%; padding: 0 9px 23px; }
.bookrail__book { position: relative; display: flex; align-items: flex-end; justify-content: center; max-width: 100%; transform: perspective(1200px) rotateY(-5deg); transform-origin: center bottom; z-index: 2; box-shadow: 5px 7px 8px #342b1b28; border-radius: 2px; }
.bookrail__book::before { content: ''; position: absolute; z-index: 1; inset: 0 auto 0 0; width: 7px; border-radius: 2px 0 0 2px; background: linear-gradient(90deg,#ffffff45,#00000015,transparent); pointer-events: none; }
.bookrail__book::after { content: ''; position: absolute; top: 4px; bottom: 3px; right: -4px; width: 4px; transform: skewY(5deg); background: repeating-linear-gradient(90deg,#e7dfcc 0 1px,#f8f2e7 1px 2px); }
.bookrail__book img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(var(--cover-height) - 25px); border-radius: 2px; }
.bookrail__pedestal { position: absolute; z-index: 1; left: 1%; bottom: 4px; width: 98%; height: 18px; border-radius: 50% / 32%; background: linear-gradient(90deg,#d9cdb5,#f5eddb 34%,#e8dcc3 74%,#c7b691); border-bottom: 2px solid #b08b4c; box-shadow: inset 0 2px 1px #fff9,0 4px 5px #5c472318; }
.bookrail__pedestal::before { content: ''; position: absolute; top: -5px; left: -1px; right: -1px; height: 10px; border-radius: 50%; border: 1px solid #c5ad7d; background: #eee6d5; box-shadow: inset 0 0 0 2px #fff9; }
.bookrail figcaption { text-align: center; margin: 17px 0 0; max-width: 230px; width: 100%; }
.bookrail__title { display: block; color: #1b392a; font: 400 clamp(16px,1.21vw,21px)/1.25 Georgia,serif; }
.bookrail__genre { display: block; color: #a17a3d; font: 400 9px/1.5 Arial,sans-serif; text-transform: uppercase; letter-spacing: .24em; margin-top: 10px; }
.bookrail__genre::after { content: ''; display: block; margin: 10px auto 0; width: 28px; height: 1px; background: #b18e50; }
.bookrail__empty { min-height: 220px; border-block: 1px solid #e5dbca; padding: 55px 20px; text-align: center; }
.bookrail .bookrail__empty p { font: 400 24px/1.5 Georgia,serif; color: #365642; margin: 0 0 22px; }
.bookrail__reset { padding: 9px 0; border: 0; border-bottom: 1px solid #b18e50; color: #365642; background: transparent; font: 400 16px/1.5 Georgia,serif; cursor: pointer; }
.bookrail--expanded .bookrail__track { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 36px; overflow: visible; }
.bookrail--expanded .bookrail__cover { --cover-height: 320px; }
.bookrail__track figure[hidden], .bookrail__track[hidden], .bookrail__empty[hidden], .bookrail__controls[hidden] { display: none; }
.bookrail button:focus-visible, .bookrail__track:focus-visible { outline: 2px solid #b2925e; outline-offset: 5px; }
.bookrail__status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1199px) {
  .bookrail { padding-block: 45px; }
  .bookrail__container { width: calc(100% - 80px); }
  .bookrail__heading { grid-template-columns: minmax(0,1fr) 230px; gap: 30px; }
  .bookrail h2 { font-size: 49px; }
  .bookrail__filters { gap: 8px; }
  .bookrail__filters button { min-width: 73px; padding: 8px 15px; font-size: 15px; }
  .bookrail__browse { font-size: 19px; padding-inline: 20px; }
  .bookrail__track { gap: 22px; }
  .bookrail__track figure { flex-basis: calc((100% - 88px)/5); }
  .bookrail__cover { --cover-height: 270px; }
}
@media (max-width: 900px) {
  .bookrail__container { width: calc(100% - 56px); }
  .bookrail__heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 15px; }
  .bookrail h2 { font-size: 46px; }
  .bookrail__actions { flex-direction: row-reverse; justify-content: space-between; align-items: center; padding-top: 0; }
  .bookrail__controls button { width: 45px; height: 45px; padding: 10px; }
  .bookrail .bookrail__browse { min-height: 49px; font-size: 18px; }
  .bookrail__track figure { flex-basis: calc((100% - 66px)/4); }
  .bookrail__cover { --cover-height: 250px; }
  .bookrail--expanded .bookrail__track { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; }
  .bookrail--expanded .bookrail__cover { --cover-height: 260px; }
}
@media (max-width: 600px) {
  .bookrail { padding-block: 32px 36px; }
  .bookrail__container { width: calc(100% - 46px); }
  .bookrail .bookrail__eyebrow { font-size: 9px; letter-spacing: .18em; gap: 12px; margin-bottom: 13px; }
  .bookrail__eyebrow::after { width: 50px; }
  .bookrail h2 { font-size: clamp(36px,10.5vw,44px); }
  .bookrail .bookrail__description { font-size: 17px; line-height: 1.45; margin-top: 13px; }
  .bookrail__filters { margin-top: 20px; gap: 8px; }
  .bookrail__filters button { min-width: 0; font-size: 14px; padding: 8px 17px; min-height: 38px; }
  .bookrail__actions { gap: 15px; }
  .bookrail__controls { gap: 8px; }
  .bookrail__controls button { width: 39px; height: 39px; padding: 8px; }
  .bookrail .bookrail__browse { min-height: 48px; font-size: 17px; padding: 11px 21px; gap: 12px; }
  .bookrail__track { gap: 20px; padding-top: 16px; }
  .bookrail__track figure { flex-basis: calc((100% - 20px)/2); }
  .bookrail__cover { --cover-height: 246px; padding-inline: 6px; }
  .bookrail__title { font-size: 17px; }
  .bookrail__genre { font-size: 8px; letter-spacing: .18em; }
  .bookrail figcaption { margin-top: 12px; }
  .bookrail--expanded .bookrail__track { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; }
  .bookrail--expanded .bookrail__cover { --cover-height: 246px; }
  .bookrail .bookrail__empty p { font-size: 22px; }
}
@media (max-width: 359px) {
  .bookrail__container { width: calc(100% - 36px); }
  .bookrail .bookrail__browse { font-size: 16px; padding-inline: 16px; gap: 10px; }
  .bookrail__controls { gap: 6px; }
  .bookrail__controls button { width: 35px; height: 35px; }
}
@media (prefers-reduced-motion: reduce) { .bookrail button { transition: none; } }
