:root {
  --paper: #f6f7fb;
  --card: #ffffff;
  --ink: #171c33;
  --soft: #58607c;
  --rule: #dcdfeb;
  --accent: #8a5a00;
  --accent-ink: #ffffff;
  --gold: #e6ab2e;
  --gold-ink: #1c1604;
  --head: #171c33;
  --head-ink: #f3f1f7;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10142a; --card: #181d38; --ink: #eceaf4; --soft: #a3a9c4; --rule: #2b3156;
    --accent: #f2c04f; --accent-ink: #1c1604; --gold: #f2c04f; --gold-ink: #1c1604; --head: #0a0d1f; --head-ink: #f3f1f7;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); }
.wrap { max-width: 78rem; margin-inline: auto; padding-inline: 1.25rem; }

.top { background: var(--head); color: var(--head-ink); padding-block: 3rem 3.25rem; }
.mark { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .9rem; font: italic 400 1.5rem/1 var(--display); margin: 0 0 2rem; letter-spacing: .01em; }
.logo { display: block; width: 3.5rem; height: 3.5rem; padding: .3rem; border-radius: 8px; background: #ffffff; }
.mark::after { content: ""; display: block; flex: 0 0 100%; height: 3px; background: linear-gradient(#e6ab2e, #e6ab2e) left / 2.5rem 100% no-repeat; margin-top: .75rem; }
h1 { font: 600 clamp(1.9rem, 5vw, 3.1rem)/1.1 var(--display); margin: 0 0 1.25rem; max-width: 18ch; text-wrap: balance; }
.lede { margin: 0; max-width: 62ch; color: #c5c8dc; }

main { padding-block: 2rem 4rem; }
.storebar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
.storebar label { font-weight: 600; }
.storebar select, .storebar button { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: .4rem .6rem; max-width: 100%; }
.storebar select:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.line { scroll-margin-top: 1rem; }
.line + .line { margin-top: 3.5rem; }
.linehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; margin: 2.5rem 0 0; padding-left: 1rem; border-left: 3px solid var(--gold); }
.linehead h2 { font: 600 clamp(1.5rem, 3vw, 2rem)/1.15 var(--display); margin: 0; }
.lineto { font: 600 .9rem/1.4 var(--body); color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.lineto::after { content: " \2192"; }
.count { font: 500 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin: .6rem 0 .5rem 1.2rem; }

.shelves { display: flex; flex-wrap: wrap; gap: 2.75rem 2.5rem; margin-top: 1rem; }
.shelf { min-width: 0; }
.shelfhead { border-top: 2px solid var(--ink); padding-top: .6rem; margin-bottom: 1rem; min-height: 4.1rem; }
.shelfhead h3 { font: 600 1.2rem/1.2 var(--display); margin: 0; }
.series { margin: .15rem 0 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.75rem 1.5rem; }
.book { width: 10.5rem; display: flex; flex-direction: column; }
.cover { display: block; width: 100%; padding: 0; border: 0; cursor: pointer; border-radius: 3px; overflow: hidden; background: var(--card); box-shadow: 0 1px 2px rgba(10, 13, 31, .18), 0 10px 24px -8px rgba(10, 13, 31, .35); transition: transform .15s ease; }
.cover:hover { transform: translateY(-3px); }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.cover:focus-visible, .more:focus-visible, .close:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.nocover { display: flex; align-items: center; justify-content: center; aspect-ratio: 2 / 3; padding: 1rem; text-align: center; font: 600 1rem/1.25 var(--display); color: var(--head-ink); background: var(--head); }
.book h4 { font: 600 1rem/1.25 var(--display); margin: .85rem 0 0; text-wrap: balance; }
.short { margin: .4rem 0 0; font-size: .85rem; line-height: 1.45; color: var(--soft); }
.more { align-self: flex-start; margin: .3rem 0 0; padding: 0; border: 0; background: none; font: 600 .85rem/1.4 var(--body); color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: auto; padding-top: .8rem; }
.btn { display: inline-block; padding: .4rem .65rem; border-radius: 4px; background: transparent; color: var(--accent); border: 1px solid currentColor; font-weight: 600; font-size: .8rem; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn::after { content: " \2197"; font-weight: 400; }

.book > .buy .btn { padding: .38rem .5rem; font-size: .78rem; }
.book > .buy .btn::after { content: none; }

.modal { width: min(52rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 8px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(5, 7, 20, .5); overflow: auto; }
.modal::backdrop { background: rgba(10, 13, 31, .62); }
.modalgrid { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; padding: 2.25rem; }
.modalcover { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 10px 24px -8px rgba(10, 13, 31, .4); }
.modaltext h3 { font: 600 1.6rem/1.2 var(--display); margin: 0; padding-right: 2rem; text-wrap: balance; }
.by { margin: .3rem 0 0; font-size: 1.05rem; }
.meta { margin: .15rem 0 0; font-size: .875rem; color: var(--soft); }
.about { margin-top: 1rem; }
.about p { margin: 0 0 .75rem; }
.modal .buy { margin-top: 1.25rem; padding-top: 0; gap: .5rem; }
.modal .btn { padding: .55rem 1rem; font-size: .95rem; }
.buylabel { font-weight: 600; margin-right: .25rem; }
.close { position: sticky; top: .5rem; float: right; margin: .5rem .5rem 0 0; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 1; }

.foot { border-top: 1px solid var(--rule); padding-block: 2rem 3rem; color: var(--soft); font-size: .9rem; }
.foot p { margin: 0 0 .5rem; max-width: 65ch; }

.lookinside { display: block; width: 100%; margin-top: .6rem; font: 600 .95rem/1 var(--body); padding: .75rem; border-radius: 4px; border: 1px solid var(--gold); background: var(--gold); color: var(--gold-ink); cursor: pointer; }
.lookinside:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lookinside:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.reader { width: min(46rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 1.5rem); padding: 0; border: 0; border-radius: 8px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(5, 7, 20, .5); overflow: auto; }
.reader::backdrop { background: rgba(10, 13, 31, .72); }
.readerbar { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--rule); }
.readertitle { font: 600 1rem/1.2 var(--display); }
.readercount { margin-left: auto; font-size: .85rem; color: var(--soft); }
.readerclose { width: 2.1rem; height: 2.1rem; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.readerpage { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem .5rem; background: var(--paper); }
.readerpage img { display: block; width: auto; height: auto; max-width: calc(100% - 6rem); max-height: calc(100vh - 11rem); box-shadow: 0 4px 18px rgba(10, 13, 31, .25); background: #fff; -webkit-user-select: none; user-select: none; }
.readernav { flex: 0 0 2.5rem; height: 2.5rem; border: 1px solid var(--rule); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.readernav:disabled { opacity: .3; cursor: default; }
.readernote { margin: 0; padding: .6rem 1rem .9rem; font-size: .8rem; color: var(--soft); text-align: center; }
.coverswitch { display: flex; gap: .5rem; margin-top: 1rem; }
.coverswitch button { flex: 1; font: 600 .9rem/1 var(--body); padding: .6rem .5rem; border-radius: 4px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); cursor: pointer; }
.coverswitch button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.coverswitch button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.product-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); gap: 1.75rem; align-items: start; margin-bottom: 2rem; }
.product-head .buybox { margin-bottom: 0; }
.details.card { margin-top: 0; padding: 1.25rem; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
.details.card dl { gap: .4rem 1rem; font-size: .88rem; }
.topbar { background: var(--head); color: var(--head-ink); padding-block: 1rem; }
.mark.small { margin: 0; font-size: 1.25rem; color: var(--head-ink); text-decoration: none; }
.mark.small::after { content: none; }
.mark.small .logo { width: 2.5rem; height: 2.5rem; }
.crumbs { font-size: .85rem; color: var(--soft); margin-bottom: 1.5rem; }
.crumbs a, .backlink a { color: var(--accent); }
.product { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3rem; align-items: start; }
.product-cover { position: sticky; top: 1.5rem; }
.product-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 2px 4px rgba(10, 13, 31, .18), 0 18px 40px -12px rgba(10, 13, 31, .45); }
.product-info h1 { color: var(--ink); max-width: none; margin: .35rem 0 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.product-info .by { font-size: 1.15rem; margin-top: .4rem; }
.product-info h2 { font: 600 1.15rem/1.3 var(--display); margin: 0 0 .6rem; }
.buybox { margin: 1.5rem 0 2rem; padding: 1.25rem 1.25rem 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
.buybox .buy { margin: 0; padding: 0; gap: .6rem; }
.btn-buy { padding: .65rem 1.25rem; font-size: 1rem; background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.btn-buy:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.storepick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; font-size: .85rem; color: var(--soft); }
.storepick select, .storepick button { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: .3rem .5rem; max-width: 100%; }
.product .about { margin-top: 0; }
.details { margin-top: 2rem; }
.details dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1.5rem; margin: 0; font-size: .92rem; }
.details dt { color: var(--soft); }
.details dd { margin: 0; }
.related { margin-top: 3.5rem; border-top: 2px solid var(--ink); padding-top: .8rem; }
.related h2 { font: 600 1.2rem/1.2 var(--display); margin: 0 0 1.25rem; }
.minirow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.mini { width: 8.5rem; }
.mini a { color: var(--ink); text-decoration: none; }
.mini img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 20px -8px rgba(10, 13, 31, .35); transition: transform .15s ease; }
.mini a:hover img { transform: translateY(-3px); }
.minititle { display: block; margin-top: .6rem; font: 600 .95rem/1.25 var(--display); }
.backlink { margin-top: 3rem; }
a.cover { text-decoration: none; }
a.more { display: inline-block; }

@media (max-width: 64rem) {
  .product-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .product { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .product-head { grid-template-columns: minmax(0, 1fr); }
  .product-cover { position: static; width: 12rem; }
  .mini { width: calc(50vw - 2rem); max-width: 8.5rem; }
  .shelves { gap: 2.25rem 1.25rem; }
  .row { gap: 1.5rem 1rem; }
  .book { width: calc(50vw - 1.75rem); max-width: 10.5rem; }
  .modalgrid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 1.25rem; }
  .modalcover { width: 9rem; }
}
@media (prefers-reduced-motion: reduce) { .cover { transition: none; } }

.contact { border-top: 1px solid var(--rule); padding-block: 2.25rem 1rem; }
.contact h2 { font: 600 1.5rem/1.2 var(--display); margin: 0 0 .35rem; }
.contact-lede { margin: 0 0 1.25rem; color: var(--soft); max-width: 65ch; }
.contact-form { max-width: 46rem; }
.contact-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .9rem; }
.contact-form input, .contact-form textarea { display: block; width: 100%; box-sizing: border-box; margin-top: .3rem; padding: .6rem .7rem; font: 400 1rem/1.4 var(--body); color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 4px; }
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible, .contact-send:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.contact-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-buttons { margin: .25rem 0 0; }
.contact-send { padding: .6rem 1.4rem; border: 0; border-radius: 4px; background: var(--gold); color: var(--gold-ink); font: 600 1rem/1.2 var(--body); cursor: pointer; }
.contact-send:hover { filter: brightness(1.05); }
.contact-note { margin: 1rem 0 0; padding: .7rem 1rem; border-left: 3px solid var(--gold); background: var(--card); }
.contact-error { border-left-color: #b3261e; }
@media (max-width: 40rem) { .contact-two { grid-template-columns: 1fr; } }

h1.split { display: flex; max-width: none; text-wrap: balance; }
h1.split > span { flex: 1 1 0; max-width: calc(18ch + 1.5rem); padding-left: 1.5rem; border-left: 3px solid var(--gold); }
h1.split .split-side { margin-left: 1.5rem; }
@media (max-width: 48rem) {
  h1.split { flex-direction: column; }
  h1.split > span { padding-left: 1rem; }
  h1.split .split-side { margin: 1rem 0 0; }
}
.seriespage .product-info { margin-bottom: 1.5rem; }
.series a { color: inherit; }
.related h2 a { color: inherit; }
.member { padding-block: 2rem 3rem; }
.member h1 { font: 600 2rem/1.15 var(--display); margin: 0 0 .5rem; }
.member-lede { margin: 0 0 1.5rem; color: var(--soft); max-width: 65ch; }
.member-form .member-agree { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.member-form .member-agree input { width: auto; margin: .25rem 0 0; }
.joinline a { color: var(--ink); font-weight: 600; }
.member-form select { display: block; width: 100%; box-sizing: border-box; margin-top: .3rem; padding: .6rem .7rem; font: 400 1rem/1.4 var(--body); color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 4px; }
.member-three { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 0 1rem; }
@media (max-width: 40rem) { .member-three { grid-template-columns: 1fr; } }
.topsplit { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 1.5rem; row-gap: 1.25rem; }
.topsplit h1.split { display: contents; }
.topsplit h1.split .split-side { margin-left: 0; }
.topsplit .lede { grid-column: 1; width: 0; min-width: 100%; max-width: none; }
.topjoin { grid-column: 2; display: flex; align-items: center; justify-content: center; margin: 0; }
.joinbtn { display: inline-block; padding: .7rem 1.5rem; border-radius: 4px; background: var(--gold); color: var(--gold-ink); font: 600 1rem/1.2 var(--body); text-decoration: none; }
.joinbtn:hover { filter: brightness(1.05); }
.joinbtn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 48rem) {
  .topsplit { grid-template-columns: 1fr; }
  .topsplit h1.split .split-side { margin: 0; }
  .topsplit .lede, .topjoin { grid-column: 1; }
  .topjoin { justify-content: flex-start; }
}
