/* Denver City Lax: the store as a storybook. The opening spread is a scrapbook page of the club's players over
   the Denver skyline and the Front Range; every collection is a chapter; the bag is a library card. */
:root {
  --paper: #f7f2e8;
  --paper-2: #efe7d6;
  --edge: #ded3c0;
  --ink: #1f3346;
  --ink-2: #56606b;
  --navy: #22384d;
  --navy-2: #1a2c3d;
  --carolina: #508ac8;
  --sky: #418ac9;
  --link: #2e62a0;
  --gold: #f5a623;
  --sun: #fcb415;
  --pine: #396a4b;
  --manila: #f1e3c2;
  --rule: #d9c7a0;
  --stamp: #2b5c9b;
  --err: #a3271f;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Courier Prime", "Courier New", "Nimbus Mono PS", ui-monospace, monospace;
  --head: 64px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html.locked { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
[hidden], img[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- header: the running head ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid rgba(31, 51, 70, .14); }
.top-in { max-width: 1260px; margin: 0 auto; height: var(--head); display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.brand { display: flex; align-items: center; min-width: 0; flex: 0 1 auto; height: 48px; }
.brand img { width: 150px; height: auto; }
.running { flex: 1 1 auto; margin: 0; text-align: center; font: 600 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tools { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.tool { position: relative; height: 44px; min-width: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--ink); }
.tool:hover { background: var(--paper-2); }
.tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--navy); color: #fff; font: 700 12px/22px var(--sans); text-align: center; }
.count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.35); } }

/* ---------- the opening spread: a scrapbook page of the club's players over Denver ---------- */
.opening { position: relative; padding: 34px 24px 56px; overflow: hidden; }
.band { position: absolute; left: 0; right: 0; top: 30%; height: 44%; background: var(--carolina); }
.book { position: relative; max-width: 1180px; margin: 0 auto; padding: 12px; background: var(--navy); border-radius: 12px; box-shadow: 0 34px 60px -34px rgba(13, 27, 41, .6), 0 2px 0 #142636; }
.collage { position: relative; aspect-ratio: 1156 / 660; background: var(--paper); border-radius: 5px; overflow: hidden; }
.gutter { position: absolute; top: 0; bottom: 0; left: calc(50% - 26px); width: 52px; z-index: 6; pointer-events: none; background: linear-gradient(90deg, rgba(31, 51, 70, 0) 0%, rgba(31, 51, 70, .08) 42%, rgba(31, 51, 70, .18) 50%, rgba(31, 51, 70, .06) 58%, rgba(31, 51, 70, 0) 100%); }
.title { position: absolute; left: 4.6%; top: 7%; z-index: 3; }
.eyebrow { margin: 0 0 10px; font: 600 12px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); }
.book-title { margin: 0; font: 760 clamp(44px, 5.2vw, 72px)/.95 var(--serif); letter-spacing: -.012em; color: var(--navy); }
.book-title span { display: block; }
.book-title span + span { color: var(--link); }
.scene { position: absolute; inset: 0; perspective: 1400px; perspective-origin: 50% 100%; }
.sun { position: absolute; left: 37.5%; top: 53%; width: 8%; aspect-ratio: 1; border-radius: 50%; background: var(--sun); }
.pano { position: absolute; left: 0; right: 0; bottom: 0; height: 41%; }
.pn { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 100%; transform-origin: 50% 100%; backface-visibility: hidden; }
.team { position: absolute; right: 2.4%; bottom: 0; width: 41%; z-index: 4; transform-origin: 50% 100%; }
.team img { display: block; width: 100%; height: auto; filter: drop-shadow(0 12px 14px rgba(20, 38, 54, .3)); }
.print { position: absolute; z-index: 5; margin: 0; padding: max(6px, .72vw); background: #fff; transform: rotate(var(--r, 0deg)); box-shadow: 0 14px 24px -14px rgba(20, 38, 54, .6), 0 1px 2px rgba(20, 38, 54, .18); }
.print img { display: block; width: 100%; height: auto; }
.print i { position: absolute; left: 33%; top: -5%; width: 34%; height: 10%; background: rgba(240, 226, 190, .86); transform: rotate(-4deg); }
.p1 { left: 5%; top: 35%; width: 23%; --r: -5deg; --k: 0; }
.p2 { left: 31%; top: 9%; width: 14.5%; --r: 4deg; --k: 1; }
.p3 { left: 53%; top: 7%; width: 16%; --r: -3deg; --k: 2; }
.p4 { left: 80.5%; top: 5%; width: 15.5%; --r: 5deg; --k: 3; }
.script { position: absolute; left: 58.5%; top: 29%; width: 21%; height: auto; z-index: 5; transform: rotate(-7deg); filter: drop-shadow(0 8px 10px rgba(20, 38, 54, .25)); }
.ribbon { position: absolute; right: 22%; bottom: -46px; width: 26px; height: 74px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); z-index: 1; }

/* contents, right under the opening spread */
.contents { padding: 18px 24px 10px; }
.contents-in { max-width: 1180px; margin: 0 auto; }
.rule { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; width: 196px; }
.rule i { flex: 1; height: 2px; background: var(--navy); border-radius: 2px; }
.rule b { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); flex: none; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5.5px var(--navy); }
.toc-h { margin: 0 0 10px; font: 700 30px/1.1 var(--serif); color: var(--navy); }
.toc { list-style: none; margin: 0; padding: 0; }
.contents .toc { columns: 3 250px; column-gap: 44px; }
.toc li { margin: 0; break-inside: avoid; }
.toc button { width: 100%; min-height: 44px; display: flex; align-items: baseline; gap: 10px; padding: 9px 2px; text-align: left; font: 500 16px/1.2 var(--sans); color: var(--ink); border-radius: 4px; }
.toc .n { flex: none; width: 22px; font: 650 15px/1 var(--serif); color: var(--link); text-align: right; font-variant-numeric: tabular-nums; }
.toc .t { flex: none; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc .dots { flex: 1 1 auto; min-width: 16px; border-bottom: 2px dotted rgba(31, 51, 70, .32); transform: translateY(-4px); }
.toc .go { flex: none; font: 600 15px/1 var(--sans); color: var(--link); }
.toc button:hover .t { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- intro (every load at the top; never for deep links or reduced motion) ---------- */
/* --t stretches every beat for frame-by-frame review (set it on <html>); 1 in the store */
.intro .pn-far { animation: stand calc(.75s * var(--t, 1)) var(--ease) calc(.05s * var(--t, 1)) both; }
.intro .pn-near { animation: stand calc(.75s * var(--t, 1)) var(--ease) calc(.2s * var(--t, 1)) both; }
.intro .pn-city { animation: stand calc(.8s * var(--t, 1)) var(--ease) calc(.36s * var(--t, 1)) both; }
.intro .sun { animation: sunrise calc(1s * var(--t, 1)) cubic-bezier(.2, .6, .2, 1) calc(.3s * var(--t, 1)) both; }
.intro .team { animation: standup calc(.82s * var(--t, 1)) cubic-bezier(.2, .8, .25, 1.08) calc(.52s * var(--t, 1)) both; }
.intro .print { animation: pin calc(.62s * var(--t, 1)) cubic-bezier(.2, .8, .3, 1.15) both; animation-delay: calc((.78s + var(--k, 0) * 90ms) * var(--t, 1)); }
.intro .script { animation: slap calc(.5s * var(--t, 1)) cubic-bezier(.3, 1.4, .5, 1) calc(1.25s * var(--t, 1)) both; }
.intro .print i { animation: tape calc(.3s * var(--t, 1)) ease both; animation-delay: calc((1.2s + var(--k, 0) * 90ms) * var(--t, 1)); }
.intro .rule i { animation: draw calc(.7s * var(--t, 1)) var(--ease) calc(.6s * var(--t, 1)) both; }
.intro .rule i:last-child { transform-origin: 0 50%; }
.intro .rule i:first-child { transform-origin: 100% 50%; }
@keyframes stand { from { transform: rotateX(78deg); opacity: .16; } 35% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes standup { from { transform: rotateX(52deg) translateY(4%); } to { transform: none; } }
@keyframes sunrise { from { transform: translateY(42%); } to { transform: none; } }
@keyframes pin { from { transform: translateY(-28px) rotate(calc(var(--r, 0deg) + 8deg)) scale(1.07); opacity: 0; } 40% { opacity: 1; } to { transform: rotate(var(--r, 0deg)); opacity: 1; } }
@keyframes tape { from { opacity: 0; transform: rotate(-4deg) scale(1.25); } to { opacity: 1; transform: rotate(-4deg); } }
@keyframes draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes slap { from { transform: rotate(-16deg) scale(1.35); opacity: 0; } to { transform: rotate(-7deg); opacity: 1; } }

/* ---------- chapters ---------- */
.chapter { max-width: 1260px; margin: 0 auto; padding: 66px 24px 40px; scroll-margin-top: calc(var(--head) + 8px); }
.chapter + .chapter { border-top: 1px solid rgba(31, 51, 70, .12); }
.ch-head { display: flex; align-items: flex-end; gap: 18px; margin: 0 0 28px; }
.drop { position: relative; flex: none; width: 82px; height: 82px; border-radius: 7px; background: var(--carolina); color: #fff; display: grid; place-items: center; font: 720 58px/1 var(--serif); overflow: hidden; }
.drop::before { content: ""; position: absolute; right: 10px; top: 10px; width: 13px; height: 13px; border-radius: 50%; background: var(--sun); }
.drop span { position: relative; transform: translateY(-2px); }
.drop svg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26px; fill: var(--navy); }
.ch-words { min-width: 0; flex: 1 1 auto; }
.ch-num { margin: 0 0 6px; font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.ch-title { margin: 0; font: 720 clamp(32px, 4.4vw, 52px)/1.02 var(--serif); color: var(--navy); letter-spacing: -.01em; overflow-wrap: anywhere; }
.see { flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 2px solid var(--navy); border-radius: 0; background: #fff; color: var(--navy); font: 650 15px/1 var(--sans); letter-spacing: .02em; box-shadow: 5px 5px 0 var(--gold); transition: transform .15s var(--ease), box-shadow .15s var(--ease); text-decoration: none; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--gold); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--gold); }
.btn.solid { background: var(--navy); color: #fff; }
.btn:disabled { background: #e7e1d6; border-color: #b5ada0; color: #5d564c; box-shadow: none; transform: none; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 22px; }
.tile { position: relative; min-width: 0; }
.t-open { display: block; width: 100%; text-align: left; border-radius: 4px; }
.ph { position: relative; display: block; aspect-ratio: 1; background: #fff; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; }
.ph img { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; object-fit: contain; }
.ph::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(31, 51, 70, .07); border-radius: 2px; pointer-events: none; }
.ph .fb { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 10px; padding: 18px; text-align: center; color: var(--ink-2); font: 600 13px/1.3 var(--sans); }
.ph .fb img { position: static; width: 64px; height: 64px; opacity: .9; }
.ph.ph-failed .fb { display: grid; }
.t-tag { position: absolute; left: 10px; top: 10px; padding: 5px 8px; background: var(--navy); color: #fff; font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.t-tag.out { background: #fff; color: var(--err); border: 1px solid var(--err); }
.t-cap { display: block; padding: 12px 2px 0; }
.t-aud { display: block; margin: 0 0 3px; font: 600 11px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.t-name { display: block; font: 600 16px/1.3 var(--sans); color: var(--ink); }
.t-price { display: block; margin-top: 4px; font: 500 15px/1.2 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.t-price s { color: var(--ink-2); margin-right: 6px; }
.t-open:hover .t-name { text-decoration: underline; text-underline-offset: 3px; }
.designs { display: flex; flex-wrap: wrap; gap: 0; margin: 6px 0 0 -6px; }
.dz { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.dz i { position: relative; display: block; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--edge); overflow: hidden; }
.dz img { position: absolute; left: -30%; top: -12%; width: 160%; height: 160%; object-fit: contain; }
.dz em { position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px/1 var(--sans); font-style: normal; color: var(--ink-2); }
.dz[aria-pressed="true"] i { border: 2px solid var(--navy); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); }
.t-more { display: none; }

/* pop up on the way in; tiles already in view at load never move */
.tile.pop { animation: tilepop calc(.6s * var(--t, 1)) var(--ease) both; animation-delay: calc(var(--k, 0) * 55ms * var(--t, 1)); }
.ch-head.pop .drop { animation: tilepop calc(.55s * var(--t, 1)) var(--ease) both; }
@keyframes tilepop { from { transform: perspective(900px) rotateX(58deg); transform-origin: 50% 100%; opacity: .16; } to { transform: none; opacity: 1; } }

/* the book within the book */
.willis { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 46px; align-items: center; background: #fff; border: 1px solid var(--edge); padding: 34px; border-radius: 4px; }
.willis .ph { border: 0; }
.willis .ph img { left: 0; top: 0; width: 100%; height: 100%; }
.willis h3 { margin: 0 0 6px; font: 720 clamp(28px, 3.4vw, 40px)/1.06 var(--serif); color: var(--navy); }
.willis .by { margin: 0 0 18px; font: 500 17px/1.4 var(--sans); color: var(--ink-2); }
.willis .t-price { font-size: 18px; margin: 0 0 22px; }

/* ---------- a chapter page ---------- */
.chpage { max-width: 1260px; margin: 0 auto; padding: 34px 24px 72px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 24px; font: 500 14px/1.2 var(--sans); color: var(--ink-2); }
.crumbs button { min-height: 44px; padding: 0 4px; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.chpage .ch-head { margin-bottom: 14px; }
.ch-count { margin: 0 0 30px; color: var(--ink-2); font-size: 15px; }
.chpage .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(31, 51, 70, .16); }
.pager button { min-height: 64px; padding: 10px 6px; text-align: left; border-radius: 4px; }
.pager button + button, .pager .next { text-align: right; }
.pager small { display: block; font: 600 11px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.pager strong { display: block; margin-top: 4px; font: 680 21px/1.15 var(--serif); color: var(--navy); }
.pager button:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- back cover ---------- */
.back { background: var(--navy); color: #fff; margin-top: 30px; }
.back-in { max-width: 1260px; margin: 0 auto; padding: 56px 24px 44px; display: grid; justify-items: center; text-align: center; gap: 14px; }
.back-badge { width: 112px; height: 112px; }
.back-name { margin: 0; font: 700 26px/1.1 var(--serif); }
.back-links { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.back-links a, .back-links button { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font: 600 15px/1.2 var(--sans); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .55); }
.powered { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; min-width: 200px; min-height: 64px; color: #dfe6ee; text-decoration: none; font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; padding: 10px; }
.powered img { width: 176px; height: auto; }

/* ---------- layers ---------- */
.layer { position: fixed; inset: 0; z-index: 50; background: rgba(13, 27, 41, .62); overflow: hidden; outline: none; }
.layer[hidden] { display: none; }
.x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--navy); border: 1px solid var(--edge); }
.x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* product: an open book on desktop, a page sliding up on phones */
.spread { position: absolute; left: 50%; top: 50%; width: min(1100px, calc(100vw - 48px)); height: min(720px, calc(100vh - 48px)); transform: translate(-50%, -50%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; background: var(--navy); border-radius: 12px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.sp-l, .sp-r { position: relative; background: var(--paper); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.sp-l { border-radius: 5px 0 0 5px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.sp-r { border-radius: 0 5px 5px 0; padding: 34px 40px 30px; }
.sp-gutter { position: absolute; top: 10px; bottom: 10px; left: calc(50% - 22px); width: 44px; pointer-events: none; background: linear-gradient(90deg, rgba(31, 51, 70, 0), rgba(31, 51, 70, .16) 50%, rgba(31, 51, 70, 0)); }
.lyr-product.opening .sp-r { animation: turn calc(.5s * var(--t, 1)) cubic-bezier(.25, .7, .2, 1) backwards; transform-origin: 0 50%; }
.lyr-product.opening .sp-l { animation: fadein calc(.35s * var(--t, 1)) ease backwards; }
@keyframes turn { from { transform: perspective(1800px) rotateY(88deg); } to { transform: none; } }
@keyframes fadein { from { opacity: .16; } to { opacity: 1; } }
.g-main { position: relative; flex: 1 1 auto; min-height: 0; background: #fff; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; }
.g-main .ph { position: absolute; inset: 0; border: 0; aspect-ratio: auto; }
.g-main .ph img { left: 5%; top: 5%; width: 90%; height: 90%; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 4px; flex: none; scrollbar-width: thin; }
.thumbs button { position: relative; flex: none; width: 64px; height: 64px; background: #fff; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; }
.thumbs button img { position: absolute; left: 6%; top: 6%; width: 88%; height: 88%; object-fit: contain; }
.thumbs button[aria-pressed="true"] { border: 2px solid var(--navy); }
.thumbs em { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px/1 var(--sans); font-style: normal; color: var(--ink-2); }
.pv-kicker { margin: 0 0 8px; padding-right: 48px; font: 600 12px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.pv-title { margin: 0 0 10px; padding-right: 40px; font: 720 clamp(26px, 2.6vw, 36px)/1.08 var(--serif); color: var(--navy); }
.pv-price { margin: 0 0 22px; font: 600 22px/1 var(--sans); font-variant-numeric: tabular-nums; }
.pv-price s { color: var(--ink-2); font-weight: 500; font-size: 17px; margin-right: 8px; }
.pv-delivery { margin: -12px 0 20px; font: 500 14.5px/1.45 var(--sans); color: var(--ink-2); }
.f-label { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; font: 700 12px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.f-label em { font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: 14px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-width: 48px; min-height: 44px; padding: 0 14px; border: 1.5px solid #9aa3ad; background: #fff; color: var(--ink); font: 600 15px/1 var(--sans); border-radius: 4px; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.dim { color: #636c75; border-style: dashed; }
.chip:disabled { color: #8b8f94; background: #f1ede6; border-color: #cfc8bc; text-decoration: line-through; }
.sw { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.sw i { display: block; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(31, 51, 70, .35); overflow: hidden; }
.sw[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--navy); }
.sw.dim i { opacity: .5; }
.sw:disabled i { opacity: .35; }
.sw:disabled::after { content: ""; position: absolute; left: 9px; right: 9px; top: 21px; height: 2px; background: var(--err); transform: rotate(-45deg); }
.pv-designs { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-designs button { position: relative; width: 60px; height: 60px; background: #fff; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; }
.pv-designs button img { position: absolute; left: 5%; top: 5%; width: 90%; height: 90%; object-fit: contain; }
.pv-designs button[aria-pressed="true"] { border: 2px solid var(--navy); box-shadow: 0 0 0 2px var(--gold); }
.pv-designs em { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px/1 var(--sans); font-style: normal; color: var(--ink-2); }
.buy { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.qty { display: inline-flex; align-items: center; height: 46px; border: 1.5px solid #9aa3ad; background: #fff; border-radius: 4px; flex: none; }
.qty button { width: 44px; height: 44px; font: 600 20px/1 var(--sans); color: var(--ink); }
.qty output { min-width: 26px; text-align: center; font: 600 16px/1 var(--sans); font-variant-numeric: tabular-nums; }
.buy .btn { flex: 1 1 auto; }
.err { margin: 16px 0 0; padding: 10px 12px; border-left: 4px solid var(--err); background: #fbe9e6; color: var(--err); font: 600 14px/1.4 var(--sans); }
.desc { margin-top: 26px; border-top: 1px solid rgba(31, 51, 70, .16); }
.desc summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.desc summary::-webkit-details-marker { display: none; }
.desc summary::after { content: "+"; font-size: 20px; letter-spacing: 0; }
.desc[open] summary::after { content: "−"; }
.desc-b { font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.desc-b, .desc-b * { color: var(--ink) !important; background-color: transparent !important; font-family: var(--sans) !important; }
.desc-b a { color: var(--link) !important; }
.desc-b img { max-width: 100%; height: auto; background: #fff !important; }
.desc-b table { max-width: 100%; display: block; overflow-x: auto; overflow-y: hidden; }
.loading { padding: 40px 0; color: var(--ink-2); }
.set-pieces { display: grid; gap: 14px; margin-top: 8px; }
.piece { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 12px; background: #fff; border: 1px solid var(--edge); border-radius: 4px; }
.piece .ph { width: 76px; height: 76px; }
.piece h4 { margin: 0 0 2px; font: 650 15px/1.3 var(--sans); }
.piece .f-label { margin-top: 10px; }
.piece-price { margin: 0; color: var(--ink-2); font-size: 14px; }

/* the bag: a library card */
.card { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column; background: var(--manila); box-shadow: -24px 0 50px -30px rgba(0, 0, 0, .55); }
.lyr-bag.opening .card { animation: slidein calc(.34s * var(--t, 1)) var(--ease) backwards; }
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
.card-head { position: relative; padding: 22px 70px 14px 26px; border-bottom: 2px solid var(--navy); }
.card-head h2 { margin: 0; font: 720 30px/1.1 var(--serif); color: var(--navy); }
.card-head p { margin: 4px 0 0; font: 500 14px/1.3 var(--sans); color: #5a4f3b; }
.card .x { top: 16px; right: 16px; background: var(--manila); border-color: #b9a77f; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 96px 74px; gap: 10px; padding: 9px 26px; border-bottom: 1px solid var(--rule); font: 700 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #5a4f3b; }
.cols span:last-child { text-align: right; }
.lines { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.line { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 14px 26px 14px; border-bottom: 1px solid var(--rule); }
.line.bad { background: #f7d9d2; }
.line .ph { width: 58px; height: 58px; border-color: #d6c59c; }
.l-title { margin: 0; padding-right: 12px; font: 700 15px/1.3 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.l-meta { margin: 2px 0 0; font: 400 13.5px/1.35 var(--sans); color: #4c4434; }
.l-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.l-row .qty { height: 44px; background: #fffaf0; border-color: #a99a77; }
.l-row .qty button { height: 42px; }
.l-price { margin-left: auto; font: 700 15px/1 var(--mono); font-variant-numeric: tabular-nums; }
.rm { min-height: 44px; padding: 0 6px; font: 600 13px/1 var(--sans); color: var(--err); text-decoration: underline; text-underline-offset: 3px; }
.l-left { display: grid; justify-items: center; align-content: start; gap: 10px; }
.stamp { display: inline-block; padding: 3px 5px 2px; white-space: nowrap; border: 2px solid var(--stamp); border-radius: 3px; color: var(--stamp); font: 700 11px/1 var(--mono); letter-spacing: .08em; transform: rotate(-7deg); opacity: .85; pointer-events: none; }
.stamp.fresh { animation: stamp calc(.55s * var(--t, 1)) cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes stamp { from { transform: rotate(-16deg) scale(1.9); opacity: 0; } 60% { opacity: .9; } to { transform: rotate(-7deg); opacity: .85; } }
.card-foot { padding: 16px 26px calc(18px + env(safe-area-inset-bottom)); border-top: 2px solid var(--navy); background: var(--manila); }
.sum { display: flex; justify-content: space-between; align-items: baseline; font: 700 18px/1 var(--mono); }
.note { margin: 8px 0 14px; font: 400 13.5px/1.4 var(--sans); color: #4c4434; }
.card-foot .btn { width: 100%; }
.empty { padding: 34px 26px; text-align: center; }
.empty img { width: 92px; height: 92px; margin: 0 auto 14px; }
.empty p { margin: 0 0 18px; font: 600 17px/1.4 var(--sans); }

/* search: the index */
.index { position: absolute; left: 50%; top: 0; width: min(760px, 100vw); max-height: min(86vh, 760px); transform: translateX(-50%); display: flex; flex-direction: column; background: var(--paper); border-radius: 0 0 10px 10px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.lyr-search.opening .index { animation: drop calc(.3s * var(--t, 1)) var(--ease) backwards; }
@keyframes drop { from { transform: translate(-50%, -24px); opacity: .16; } to { transform: translateX(-50%); opacity: 1; } }
.index-head { position: relative; padding: 20px 70px 16px 24px; border-bottom: 1px solid rgba(31, 51, 70, .16); }
.index-title { margin: 0 0 8px; font: 720 24px/1 var(--serif); color: var(--navy); }
.index-head input { width: 100%; height: 48px; padding: 0 14px; border: 2px solid var(--navy); border-radius: 0; background: #fff; color: var(--ink); font: 500 17px/1 var(--sans); -webkit-appearance: none; appearance: none; }
.index-head input::-webkit-search-cancel-button { display: none; }
.index-head .x { top: 14px; }
.results { list-style: none; margin: 0; padding: 6px 0 14px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.results li { margin: 0; }
.results button { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 24px; text-align: left; min-height: 64px; }
.results button:hover, .results button:focus-visible { background: var(--paper-2); }
.results .ph { width: 52px; height: 52px; }
.r-name { font: 600 15.5px/1.3 var(--sans); }
.r-where { display: block; font: 500 13px/1.3 var(--sans); color: var(--ink-2); }
.r-price { font: 600 15px/1 var(--sans); font-variant-numeric: tabular-nums; }
.r-none { padding: 18px 24px 10px; margin: 0; color: var(--ink-2); }
.r-hint { padding: 12px 24px 4px; margin: 0; font: 600 12px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }

/* contents drawer */
.drawer { position: absolute; top: 0; left: 0; bottom: 0; width: min(420px, 100vw); background: var(--paper); padding: 22px 26px 30px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; box-shadow: 24px 0 50px -30px rgba(0, 0, 0, .55); }
.lyr-contents.opening .drawer { animation: slideleft calc(.32s * var(--t, 1)) var(--ease) backwards; }
@keyframes slideleft { from { transform: translateX(-100%); } to { transform: none; } }
.drawer h2 { margin: 6px 0 4px; font: 720 30px/1.1 var(--serif); color: var(--navy); }
.drawer .eyebrow { margin-top: 10px; }
.drawer .toc { margin-top: 14px; }
.drawer .toc button { min-height: 46px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 40; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; background: var(--navy); color: #fff; border-radius: 6px; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .6); font: 600 15px/1.3 var(--sans); max-width: calc(100vw - 32px); animation: toast .3s var(--ease); }
.toast button { min-height: 44px; padding: 0 14px; background: var(--gold); color: var(--navy); font-weight: 700; border-radius: 4px; flex: none; }
@keyframes toast { from { transform: translate(-50%, 16px); opacity: .16; } }

/* ---------- tablets and phones: one page at a time ---------- */
@media (max-width: 1100px) {
  .shelf, .chpage .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .running { display: none; }
}
@media (max-width: 899px) {
  :root { --head: 58px; }
  .top-in { padding: 0 12px 0 16px; gap: 6px; }
  .tool span { display: none; }
  .tool { padding: 0; width: 44px; }
  .bagtool .count { position: absolute; top: 2px; right: -2px; }
  .brand img { width: 126px; }
  .opening { padding: 22px 16px 22px; }
  .band { display: none; }
  .book { padding: 0; background: none; box-shadow: none; border-radius: 0; max-width: 560px; }
  .collage { aspect-ratio: auto; background: none; overflow: visible; border-radius: 0; }
  .gutter, .ribbon { display: none; }
  .title { position: static; margin: 0 0 16px; }
  .book-title { font-size: clamp(40px, 11.5vw, 60px); }
  .scene { position: relative; inset: auto; aspect-ratio: 343 / 440; overflow: hidden; border-radius: 6px; background: #efe8da; }
  .pano { height: 37%; }
  .pn { object-position: 41% 100%; }
  .scene { aspect-ratio: 343 / 410; }
  .sun { left: 7%; top: 60%; width: 14%; }
  .team { right: -1%; width: 72%; }
  .script { left: 2.5%; top: 39.5%; width: 44%; }
  .print { padding: 6px; }
  .p1 { left: 3.5%; top: 4%; width: 50%; --r: -5deg; }
  .p3 { left: auto; right: 3.5%; top: 13%; width: 42%; --r: 4deg; }
  .p2, .p4 { display: none; }
  .contents { padding: 10px 16px 4px; }
  .toc button { min-height: 48px; font-size: 17px; }
  .chapter { padding: 46px 16px 26px; }
  .ch-head { gap: 14px; margin-bottom: 18px; }
  .drop { width: 64px; height: 64px; font-size: 44px; }
  .drop svg { height: 20px; }
  .drop::before { width: 10px; height: 10px; right: 8px; top: 8px; }
  .ch-head .see { display: none; }
  .t-more { display: flex; }
  .willis { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px; }
  .chpage { padding: 18px 16px 56px; }
  .pager strong { font-size: 18px; }
}
@media (max-width: 767px) {
  .shelf { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64%; gap: 14px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf > * { scroll-snap-align: start; }
  .chpage .shelf { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 22px 12px; scroll-snap-type: none; }
  .t-name { font-size: 15px; }
  .t-more { align-self: stretch; }
  .spread { left: 0; top: 0; right: 0; bottom: 0; width: auto; height: auto; transform: none; display: block; padding: 0; border-radius: 0; background: var(--paper); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .lyr-product.opening .spread { animation: rise calc(.34s * var(--t, 1)) var(--ease) backwards; }
  .lyr-product.opening .sp-r, .lyr-product.opening .sp-l { animation: none; }
  @keyframes rise { from { transform: translateY(40px); opacity: .16; } to { transform: none; opacity: 1; } }
  .sp-gutter { display: none; }
  .sp-l, .sp-r { overflow: visible; border-radius: 0; }
  .sp-l { padding: 60px 16px 4px; }
  .g-main { flex: none; aspect-ratio: 1; }
  .sp-r { padding: 18px 16px 120px; }
  .pv-title { padding-right: 0; }
  .buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid rgba(31, 51, 70, .18); }
  .x { position: fixed; }
  .card { width: 100vw; }
  .cols { display: none; }
  .line { padding: 14px 16px; }
  .card-head { padding: 18px 64px 12px 16px; }
  .card-foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .index { width: 100vw; max-height: 100%; height: 100%; border-radius: 0; }
  .index-head { padding: 16px 64px 14px 16px; }
  .results button { padding: 8px 16px; }
  .toast { bottom: 14px; }
}
@media (hover: hover) and (min-width: 900px) {
  .scene.tilt .pn, .scene.tilt .team, .scene.tilt .print { transition: translate .35s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
}
.ph .fb img { filter: invert(1); opacity: .5; }
@media (min-width: 768px) and (max-width: 1100px) { #chapters .shelf .tile:nth-of-type(n+7) { display: none; } }
.toast[hidden] { display: none; }

/* chapter initials take turns in the club's colors */
.drop.ink-1 { background: var(--navy); }
.drop.ink-1 svg { fill: var(--carolina); }
.drop.ink-2 { background: var(--pine); }
.drop.ink-3 { background: var(--gold); color: var(--navy); }
.drop.ink-3::before { background: #fff; }
.folio { margin: 34px 0 0; text-align: center; font: 600 15px/1 var(--serif); color: var(--ink-2); letter-spacing: .1em; }
.folio::before, .folio::after { content: "—"; margin: 0 10px; color: rgba(31, 51, 70, .35); }
/* a ribbon marker hangs from the open book */
.willis .ph img { filter: drop-shadow(10px 14px 14px rgba(20, 38, 54, .28)); }
@media (hover: hover) { .t-open .ph { transition: transform .25s var(--ease), box-shadow .25s var(--ease); } .t-open:hover .ph { transform: translateY(-3px); box-shadow: 0 10px 18px -12px rgba(31, 51, 70, .45); } }
@media (max-width: 899px) { .folio { margin-top: 22px; } }
.ch-title:focus, .layer:focus { outline: none; }
/* on phones every layer covers the screen: hide the page under it */
@media (max-width: 767px) { html.locked #main, html.locked #back, html.locked .top { visibility: hidden; } }
.g-main .ph .fb img { position: static; width: 120px; height: 120px; }

/* Featured: a second open spread */
.sh-gutter { display: none; }
@media (min-width: 900px) {
  .spread-shelf { position: relative; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 26px; padding: 34px 40px 36px; background: var(--paper); border: 12px solid var(--navy); border-radius: 12px; box-shadow: 0 30px 50px -36px rgba(13, 27, 41, .6); }
  .spread-shelf .tile:first-of-type { grid-column: 1 / span 2; grid-row: 1 / span 2; padding-right: 14px; }
  .spread-shelf .tile:first-of-type .t-name { font: 700 24px/1.15 var(--serif); color: var(--navy); }
  .spread-shelf .tile:first-of-type .t-price { font-size: 17px; }
  .spread-shelf .tile:nth-of-type(n+2) { padding-left: 14px; }
  .spread-shelf .sh-gutter { display: block; position: absolute; top: 0; bottom: 0; left: calc(50% - 24px); width: 48px; pointer-events: none; background: linear-gradient(90deg, rgba(31, 51, 70, 0), rgba(31, 51, 70, .14) 50%, rgba(31, 51, 70, 0)); }
}
@media (min-width: 900px) and (max-width: 1100px) { .spread-shelf { padding: 26px 26px 28px; gap: 20px 18px; } }
