:root {
  color-scheme: light;
  --paper: #f9f6ef;
  --white: #fdfbf7;
  --ink: #211c18;
  --muted: #675a50;
  --line: #ded5c7;
  --red: #751e2a;
  --red-dark: #56141e;
  --display: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 3; padding: .75rem 1rem; background: var(--white); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.shell { width: min(100% - 112px, 1240px); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); background: var(--white); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; min-height: 83px; }
.brand { display: inline-block; flex: 0 0 auto; }
.brand img { object-fit: contain; height: auto; filter: brightness(0); }
.masthead nav { display: flex; gap: 37px; align-items: center; }
.nav-link { display: block; position: relative; font-size: .875rem; font-weight: 600; padding-block: 31px; }
.nav-link:hover, .nav-link.current { color: var(--red); }
.nav-link.current::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--red); }
.hero { display: grid; grid-template-columns: minmax(0,.96fr) minmax(0,1.04fr); align-items: center; gap: clamp(36px,6vw,92px); padding-block: 57px 55px; }
.hero-copy { padding-block: 12px 26px; }
.eyebrow { display: flex; align-items: center; gap: 11px; font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .19em; color: var(--red); }
.eyebrow span { width: 19px; height: 1px; background: currentColor; }
.hero h1 { font: 500 clamp(3.4rem,6.05vw,6.15rem)/.99 var(--display); letter-spacing: -.067em; margin-top: 23px; }
.hero h1 em { color: var(--red); font-weight: 400; }
.hero-text { color: var(--muted); max-width: 350px; margin-top: 26px; font-size: 1rem; line-height: 1.7; }
.button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 11px 17px; border: 1px solid transparent; font-weight: 700; font-size: .825rem; transition: background .18s, color .18s, border-color .18s; }
.button.primary { background: var(--red); color: #fff9f1; }
.button.primary:hover { background: var(--red-dark); }
.button.secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button.secondary:hover { border-color: var(--red); color: var(--red); }
.button:disabled { opacity: .62; cursor: wait; }
.button span { font-size: 1.1rem; line-height: 1; }
.hero .button { margin-top: 28px; }
.hero-image { position: relative; }
.hero-image img { width: 100%; aspect-ratio: 1.38; height: auto; object-fit: cover; object-position: center 46%; background: #a48d76; }
.hero-image figcaption { position: absolute; right: 0; bottom: -23px; color: var(--muted); font-size: .67rem; }
.hero-image figcaption span { margin-inline: 3px; }
.catalog { border-top: 1px solid var(--line); padding-block: 34px 74px; scroll-margin-top: 20px; }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 14px 30px; margin-bottom: 23px; }
h2 { font: 500 clamp(2.2rem,4.1vw,3.42rem)/1.06 var(--display); letter-spacing: -.05em; }
.section-note { color: var(--muted); margin-top: .6rem; font-size: .83rem; line-height: 1.5; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 2px; padding: 7px 13px; min-height: 34px; font-size: .77rem; font-weight: 600; }
.filter:hover { border-color: var(--red); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.book-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px 22px; }
.book-card { min-width: 0; }
.book-link { display: block; }
.cover-stage { display: grid; place-items: center; padding: 25px 14px; background: #f1ede6; overflow: hidden; min-height: 210px; }
.book-card[data-art="gatsby"] .cover-stage, .cover-stage[data-art="gatsby"] { background: #e5e8e0; }
.book-card[data-art="seneca"] .cover-stage, .cover-stage[data-art="seneca"] { background: #eee7d6; }
.cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: min(68%,181px); aspect-ratio: .665; overflow: hidden; isolation: isolate; background: #70262c; color: #f7ead4; padding: 12px 11px 10px; text-align: center; box-shadow: 2px 5px 10px #34261743, 12px 12px 23px #3426171a; transition: transform .25s ease, box-shadow .25s ease; }
.cover::after { content: ""; position: absolute; inset: 0; border-left: 4px solid #0906022b; box-shadow: inset 1px 0 #fff3; z-index: 2; pointer-events: none; }
.book-link:hover .cover { transform: translateY(-5px); }
.book-link:hover .cover:not(.image-cover) { box-shadow: 2px 9px 14px #34261742, 12px 18px 24px #34261726; }
.cover .cover-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.image-cover { padding: 0; background: transparent; box-shadow: none; overflow: visible; }
.cover.image-cover::after { content: none; }
.cover.image-cover .cover-art {
  object-fit: contain;
  filter: drop-shadow(0 3px 4px #211c1829) drop-shadow(0 9px 11px #211c1826);
}
.cover.demo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(#310c0de8 0%, #3f1313a0 43%, transparent 75%, #230e0fc9 100%); }
.cover.demo { justify-content: start; }
.cover .cover-author { font: 600 clamp(.39rem,.7vw,.61rem)/1.2 var(--sans); text-transform: uppercase; letter-spacing: .17em; margin-top: .5em; }
.cover .cover-title { font: 500 clamp(.85rem,2vw,1.78rem)/1.02 var(--display); letter-spacing: -.045em; margin-top: .5em; overflow-wrap: anywhere; }
.cover .cover-mark { font-size: .48rem; font-weight: 700; letter-spacing: .24em; margin-top: auto; }
.cover[data-art="crime"] .cover-art { object-position: 73% center; }
.cover[data-art="gatsby"] { color: #fbebc4; background: #142c32; }
.cover[data-art="gatsby"]::before { background: linear-gradient(#102b30f0,#102b30a1 39%,transparent 73%,#091b1dcc); }
.cover[data-art="seneca"] { background: #d7c09a; color: #2f2518; }
.cover[data-art="seneca"]::before { background: linear-gradient(#eadebef2,#eadebebe 39%,transparent 72%,#e6d4aec9); }
.cover[data-art="seneca"] .cover-art { object-position: center 74%; }
.cover.fallback { justify-content: center; background: #6e443c; }
.cover.fallback .cover-mark { margin-top: 17px; }
.book-meta { display: flex; align-items: center; justify-content: space-between; padding-block: 16px 13px; border-bottom: 1px solid var(--line); gap: 14px; }
.book-meta .author { font-size: .7rem; color: var(--muted); letter-spacing: .045em; margin-bottom: 4px; }
.book-meta h3 { font: 500 clamp(1.15rem,1.95vw,1.57rem)/1.15 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.book-meta .arrow { color: var(--red); font-size: 1.25rem; flex-shrink: 0; transition: transform .2s; }
.book-link:hover .arrow { transform: translateX(4px); }
.about { padding-block: 54px 60px; background: #efe8dc; border-block: 1px solid var(--line); scroll-margin-top: 20px; }
.about-inner { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 32px; }
.about h2 { margin-top: 13px; }
.about-inner > p { font: 400 clamp(1.12rem,1.8vw,1.48rem)/1.6 var(--display); max-width: 630px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 94px; display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.footer-inner small, .footer-link { color: var(--muted); font-size: .75rem; }
.footer-link:hover { color: var(--red); }
.detail, .admin { min-height: calc(100vh - 180px); padding-block: 42px 70px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--red); font-size: .85rem; font-weight: 700; margin-bottom: 24px; }
.back-link:hover { text-decoration: underline; }
.detail-grid { display: grid; grid-template-columns: minmax(230px,.8fr) minmax(0,1.2fr); align-items: start; gap: clamp(32px,7vw,95px); }
.detail .cover-stage { min-height: 440px; padding-block: 40px; }
.detail .cover { width: min(70%,265px); }
.detail .cover-title { font-size: clamp(1.65rem,3.3vw,2.55rem); }
.detail .cover-author { font-size: .72rem; }
.detail-copy { padding-block: 8px; }
.detail h1, .admin h1 { font: 500 clamp(2.5rem,5vw,4.6rem)/1.02 var(--display); letter-spacing: -.055em; overflow-wrap: anywhere; margin-block: 12px 18px; }
.detail-author { color: var(--muted); font-size: 1rem; margin-bottom: 26px; }
.synopsis { margin-top: 28px; max-width: 65ch; }
.synopsis h2 { font-size: 1.65rem; margin-bottom: 11px; }
.synopsis p { color: #3b322a; line-height: 1.72; margin-bottom: .9em; white-space: pre-line; overflow-wrap: anywhere; }
.sample-note { padding: .7rem .85rem; border-left: 2px solid var(--red); color: var(--muted); font-size: .86rem; background: #f1e9dc; display: inline-block; }
.admin { max-width: 960px; }
.admin-intro { color: var(--muted); margin-bottom: 26px; }
.admin-panel { padding: clamp(16px,3vw,28px); background: var(--white); border: 1px solid var(--line); margin-bottom: 28px; }
.admin-panel h2 { font-size: 1.75rem; margin-bottom: 17px; }
.admin-form label { display: grid; gap: 7px; font-size: .85rem; font-weight: 600; }
.admin-form input, .admin-form textarea { color: var(--ink); border: 1px solid #c4b6a6; background: #fffdf9; border-radius: 0; width: 100%; padding: 10px; font-weight: 400; }
.admin-form textarea { resize: vertical; line-height: 1.55; }
.import-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.edit-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-block: 17px; }
.edit-fields .wide { grid-column: 1 / -1; }
.form-status { color: var(--muted); font-size: .84rem; margin-top: 12px; min-height: 1.25em; }
.form-status.error { color: var(--red); font-weight: 600; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-list { padding: 0; margin: 0; list-style: none; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.admin-list li:last-child { border-bottom: 0; }
.admin-list .section-note { margin: 2px 0 0; }
@media(max-width: 900px) {
  .shell { width: calc(100% - 64px); }
  .hero { gap: 30px; }
  .hero h1 { font-size: clamp(3.1rem,7.1vw,5rem); }
}
@media(max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .masthead-inner { min-height: 64px; }
  .masthead .brand img { width: 83px; }
  .masthead nav { gap: 17px; }
  .nav-link { padding-block: 22px; font-size: .77rem; }
  .hero { grid-template-columns: 1fr; gap: 27px; padding-block: 35px 49px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(3.45rem,12.3vw,5.1rem); }
  .hero-text { margin-top: 17px; }
  .hero .button { margin-top: 20px; }
  .hero-image img { aspect-ratio: 1.58; }
  .catalog { padding-block: 27px 44px; }
  .catalog-head { align-items: start; flex-direction: column; }
  .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px 12px; }
  .cover-stage { min-height: auto; padding: 15px 8px; }
  .cover { width: min(78%,170px); padding-inline: 7px; }
  .book-meta { align-items: start; padding-top: 12px; }
  .book-meta .author { font-size: .64rem; }
  .book-meta .arrow { font-size: 1rem; }
  .about { padding-block: 37px; }
  .about-inner, .detail-grid { grid-template-columns: 1fr; gap: 19px; }
  .detail, .admin { padding-block: 27px 50px; }
  .detail .cover-stage { min-height: 0; padding-block: 23px; }
  .detail .cover { width: min(53%,200px); }
  .footer-inner { min-height: 84px; flex-wrap: wrap; column-gap: 14px; }
  .footer-inner .brand img { width: 66px; }
  .import-row { grid-template-columns: 1fr; }
  .import-row button { justify-self: start; }
}
@media(max-width: 360px) {
  .edit-fields { grid-template-columns: 1fr; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
