:root {
  color-scheme: dark;
  --bg: #111b17;
  --bg-deep: #0c1410;
  --line: #3c5143;
  --gold: #e2be80;
  --cream: #f8efdf;
  --ink: #211b12;
  --muted: #bbcabd;
  --success: #b9e5ba;
  --error: #ffc1b6;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, Cambria, "Times New Roman", serif;
  --wrap: 74rem;
  --radius: 1.125rem;
  --shadow: 0 1.75rem 4rem #050a0766;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 17.5rem; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--cream);
  background: radial-gradient(ellipse at 53% 11%, #263f2e 0%, transparent 58%), var(--bg);
  font: 1rem/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
.site-body { display: flex; flex-direction: column; }
.site-main { flex: 1; min-width: 0; }
img, svg { display: block; max-width: 100%; }
audio { width: 100%; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
a { color: var(--gold); text-underline-offset: .18em; }
a:hover { color: var(--cream); }
h1, h2, h3, p, ul, ol, dl, figure { margin-block: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.036em;
  line-height: 1.08;
}
h1 { font-size: clamp(2.65rem, 7vw, 5.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3.1rem); }
h3 { line-height: 1.25; }
p + p { margin-top: .8rem; }
[hidden] { display: none !important; }
:focus-visible { outline: .16rem solid var(--gold); outline-offset: .2rem; }
::selection { background: var(--gold); color: var(--ink); }
.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding-block: clamp(2.1rem, 5vw, 4.25rem); }
.section-heading { margin-block-end: clamp(1.25rem, 3vw, 2.25rem); }
.section-heading > :where(p, div) { margin-top: .7rem; }
.section-heading :where(p, .muted) { max-width: 58ch; }
.section-heading h1 { font-size: clamp(2.45rem, 6.8vw, 4.65rem); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .16em;
  line-height: 1.35;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.45rem; height: 1px; background: currentColor; }
.eyebrow + :where(h1, h2, h3) { margin-top: .68rem; }
.muted { color: var(--muted); }
.stack, .form-stack { display: grid; gap: 1rem; }
.stack > *, .form-stack > * { min-width: 0; }
.actions, .hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.panel, .surface {
  background: linear-gradient(145deg, #26392cdb, #19271f);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 .8rem 2rem #080e0a2b;
}
.panel, .surface { padding: clamp(1rem, 3vw, 2rem); }
.panel > :is(h2, h3) + *, .surface > :is(h2, h3) + * { margin-top: 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.8rem;
  padding: .55rem 1rem;
  border: 1px solid var(--line);
  border-radius: .68rem;
  background: #283b2e;
  color: var(--cream);
  font-size: .89rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover { color: var(--cream); background: #344d3c; border-color: #698272; }
.button-primary { background: var(--gold); color: var(--ink); border-color: #f3d39d; box-shadow: inset 0 1px #f9e5ba70, 0 5px 15px #090d0652; }
.button-primary:hover { background: #f2d295; color: var(--ink); border-color: #fae6bc; }
.button-secondary { background: #1a281ecc; color: var(--cream); }
.button-danger { color: var(--error); border-color: #865748; }
.button:disabled, .button[aria-disabled="true"] { opacity: .48; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 1.65rem;
  padding: .25rem .58rem;
  border: 1px solid #566c58;
  border-radius: 99rem;
  background: #1c2a21;
  color: var(--muted);
  font-size: .71rem;
  font-weight: 700;
  line-height: 1.2;
}
.skip-link {
  position: fixed;
  z-index: 30;
  top: .75rem;
  left: .75rem;
  transform: translateY(-150%);
  background: var(--gold);
  color: var(--ink);
  padding: .65rem .95rem;
  border-radius: .45rem;
}
.skip-link:focus { transform: translateY(0); }
.site-header { position: relative; z-index: 4; padding-block: 1.15rem .55rem; }
.site-nav {
  position: relative;
  display: flex;
  min-height: 4.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.35rem;
  padding: .55rem .65rem .55rem .9rem;
  border: 1px solid #53664c;
  border-radius: 6rem;
  background: linear-gradient(180deg, #263b2ce8, #192b20fa);
  box-shadow: inset 0 1px #ded9a516, 0 1rem 2.25rem #07100842;
}
.brand {
  display: inline-flex;
  flex: none;
  gap: .7rem;
  align-items: center;
  color: var(--cream);
  text-decoration: none;
}
.brand:hover { color: var(--gold); }
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid #bf9d6a;
  border-radius: 50%;
  background: radial-gradient(ellipse, #cda36a 0%, #98683c 85%);
  box-shadow: inset 0 0 0 .15rem #2a1e1470;
  color: #23190e;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.08em;
}
.brand-mark svg { width: 1.25rem; height: 1.25rem; }
.brand-wordmark { display: grid; gap: .1rem; font-family: var(--font-display); font-size: 1.01rem; font-weight: 650; letter-spacing: .06em; line-height: 1.1; white-space: nowrap; }
.brand-wordmark small { color: var(--gold); font: 600 .58rem/1 var(--font-sans); letter-spacing: .15em; text-transform: uppercase; }
#site-menu { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: flex-end; gap: clamp(.6rem, 2.7vw, 2rem); }
.nav-links, .nav-actions { display: flex; align-items: center; gap: .25rem; min-width: 0; list-style: none; padding: 0; }
.nav-links a, .nav-actions > a:not(.button), .nav-actions > form > button:not(.button) {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 99rem;
  padding: .45rem .7rem;
  background: transparent;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a[aria-current="page"], .nav-actions > a:not(.button):hover, .nav-actions > form > button:not(.button):hover {
  color: var(--cream);
  background: #38503c;
  border-color: #586e54;
}
.nav-actions .button { min-height: 2.6rem; border-radius: 99rem; white-space: nowrap; }
.menu-toggle { display: none; background: #2d4634; color: var(--cream); border: 1px solid #596f5c; border-radius: 99rem; min-height: 2.55rem; padding: .4rem .75rem; }
.site-footer { margin-top: 2.25rem; border-top: 1px solid #3d5142; background: #101912cc; color: var(--muted); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; padding-block: 1.45rem; font-size: .84rem; }
.footer-inner > * { min-width: 0; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.flash { padding-top: .75rem; }
.notice { padding: .75rem 1rem; border: 1px solid #64866a; border-radius: .65rem; background: #253c2b; color: var(--success); overflow-wrap: anywhere; }
.notice-error, .notice[role="alert"] { border-color: #a36e64; background: #472c27; color: var(--error); }
.notice-info { border-color: #718b78; color: var(--cream); }
.notice a { color: inherit; }
.empty-state { display: grid; justify-items: start; gap: .65rem; padding: clamp(1rem, 4vw, 2rem); border: 1px dashed #607764; border-radius: var(--radius); color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--cream); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(1.5rem, 7vw, 6rem); align-items: center; padding-block: clamp(2.4rem, 8vw, 6.3rem); }
.auth-intro { display: grid; gap: .95rem; align-content: center; }
.auth-intro h1 { margin: 0; }
.auth-intro p:not(.eyebrow) { max-width: 47ch; color: var(--muted); }
.auth-card { display: grid; gap: 1.1rem; }
.auth-card > :is(h2, h3) + * { margin-top: 0; }
.field, .form-field { display: grid; gap: .38rem; min-width: 0; }
.field > label, .field > span:first-child, .form-field > label, .form-field > span:first-child { color: var(--cream); font-size: .88rem; font-weight: 660; }
.field > small, .form-field > small { color: var(--muted); font-size: .81rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
:where(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"]), select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .58rem .73rem;
  border: 1px solid #607866;
  border-radius: .55rem;
  background: #111c15;
  color: var(--cream);
  font-size: 1rem;
}
::placeholder { color: #a2b7a7; opacity: 1; }
textarea { min-height: 7rem; resize: vertical; }
input[type="file"] { font-size: .86rem; }
input[type="file"]::file-selector-button {
  min-height: 2.1rem;
  margin-right: .6rem;
  padding: .35rem .6rem;
  border: 1px solid #768f75;
  border-radius: .4rem;
  background: #304b36;
  color: var(--cream);
  font: inherit;
  cursor: pointer;
}
input:is([type="checkbox"], [type="radio"]) { accent-color: var(--gold); width: 1.13rem; height: 1.13rem; vertical-align: middle; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .65rem; }
legend { padding-inline: .38rem; }
details { border-radius: .65rem; }
summary { cursor: pointer; font-weight: 650; }

.catalog-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: .8rem;
  padding-block: clamp(2rem, 5.5vw, 4.6rem) clamp(1.25rem, 3.1vw, 2.45rem);
  text-align: center;
}
.catalog-hero::before {
  position: absolute;
  z-index: -1;
  inset: -2.5rem 0 -.4rem;
  content: "";
  background: radial-gradient(ellipse at center, #42644466, transparent 63%);
  pointer-events: none;
}
.catalog-hero :is(.eyebrow, .hero-actions) { justify-content: center; }
.catalog-hero h1 {
  max-width: 16ch;
  margin-top: 0;
  color: #fff4dc;
  font-size: clamp(2.65rem, 7.5vw, 6rem);
  line-height: .98;
  text-shadow: 0 .18rem 1.8rem #09180bcc;
}
.catalog-hero h1 em { color: var(--gold); font-weight: inherit; }
.catalog-hero p:not(.eyebrow), .hero-copy {
  max-width: 52ch;
  margin-inline: auto;
  color: var(--muted);
  font-size: clamp(.96rem, 2vw, 1.1rem);
}
.catalog-hero .hero-actions { margin-top: .42rem; }
.shelf-wrap { padding-block: clamp(.9rem, 2.5vw, 1.8rem) 1.65rem; }
.shelf-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  margin-bottom: .8rem;
}
.shelf-heading h2 { font-size: clamp(1.65rem, 4vw, 2.5rem); }
.shelf-heading p { color: var(--muted); font-size: .87rem; }
.shelf {
  --book-size: 10.3rem;
  position: relative;
  isolation: isolate;
  padding: .6rem .6rem .8rem;
  border: 1px solid #7a5534;
  border-radius: 1rem;
  background: linear-gradient(90deg, #21170f, #52321f 5%, #412918 28%, #573720 52%, #3d2617 77%, #543621 94%, #21170f);
  box-shadow: 0 1.35rem 3.2rem #080b07a0, inset 0 1px #d7a46674, inset 0 -5px #150e08b3;
}
.shelf-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(var(--book-size), 1fr);
  gap: clamp(.55rem, 2vw, 1.75rem);
  align-items: end;
  padding: 1.75rem clamp(.9rem, 4vw, 3.15rem) .5rem;
  border-radius: .52rem .52rem .17rem .17rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 1.25rem;
  scrollbar-color: #a7764e #332116;
  scrollbar-width: thin;
  background: radial-gradient(ellipse at 50% -12%, #9a65476b 0%, transparent 66%), repeating-linear-gradient(90deg, #61402a22 0 2px, transparent 3px 96px), linear-gradient(180deg, #3c291b, #302116 54%, #1b130e);
  box-shadow: inset 0 .9rem 1.5rem #170e09b3, inset 0 -.35rem .95rem #0d090773;
}
.shelf::after {
  display: block;
  content: "";
  height: 1.03rem;
  border: 1px solid #754c2c;
  border-radius: 0 0 .24rem .24rem;
  background: repeating-linear-gradient(0deg, #2313092a 0 1px, transparent 1px 4px), linear-gradient(180deg, #a47040 0%, #79502d 30%, #5a381f 72%, #381f12 100%);
  box-shadow: 0 .5rem .9rem #0d09088c, inset 0 1px #e9b27577;
}
.shelf-book {
  position: relative;
  display: grid;
  min-width: 0;
  justify-items: center;
  align-content: end;
  gap: .55rem;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
  color: var(--cream);
}
.shelf-book > a { display: grid; justify-items: center; gap: .55rem; color: inherit; text-decoration: none; }
.book-cover {
  --cover-border: #be945c;
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .52rem;
  isolation: isolate;
  width: min(100%, 10.6rem);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  padding: 1rem .7rem 1rem 1rem;
  border: 1px solid #d1a57683;
  border-left: .28rem solid #5b2b2c;
  border-radius: .2rem .43rem .43rem .2rem;
  background: radial-gradient(ellipse at 65% 34%, #743b3c, transparent 65%), linear-gradient(110deg, #36191f, #53282d 34%, #442126);
  box-shadow: inset .18rem 0 .45rem #211513c7, 0 1.15rem .95rem -.65rem #070403, .3rem .2rem 0 #a48b68, .42rem .19rem 0 #311e1b;
  color: #edce99;
  transition: transform .28s ease, box-shadow .28s ease;
}
.book-cover:has(img) { padding: 0; }
.book-cover:not(:has(img))::before {
  position: absolute;
  z-index: -1;
  inset: .55rem .45rem .55rem .65rem;
  content: "";
  border: 1px solid #dfaf7699;
  outline: 1px solid #dfaf7640;
  outline-offset: -.25rem;
  border-radius: .13rem;
}
.book-cover:not(:has(img))::after {
  position: absolute;
  right: .45rem;
  left: .65rem;
  bottom: .8rem;
  content: "◆";
  color: #dfaf76ae;
  font-size: .55rem;
  text-align: center;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-mark { color: #efcf98; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.book-cover-title { display: block; color: #f8dcaa; font: 500 clamp(1.1rem, 3vw, 1.6rem)/1.05 var(--font-display); text-wrap: balance; }
.shelf-book:nth-child(2n) .book-cover:not(:has(img)) { background: radial-gradient(ellipse at 65% 34%, #704341, transparent 65%), linear-gradient(110deg, #2b141a, #53282d 34%, #3d1d25); }
.shelf-book:nth-child(3n) .book-cover:not(:has(img)) { background: radial-gradient(ellipse at 65% 34%, #6d3d3e, transparent 65%), linear-gradient(110deg, #36191f, #603032 34%, #452223); }
.shelf-book:not(.is-placeholder):is(:hover, :focus-within) .book-cover { transform: translateY(-.4rem) rotate(-1.2deg); box-shadow: inset .18rem 0 .45rem #211513c7, 0 1.55rem 1.25rem -.65rem #070403, .32rem .23rem 0 #c4a984, .45rem .19rem 0 #311e1b; }
.book-meta { display: grid; gap: .2rem; min-height: 2.9rem; align-content: center; }
.book-meta :is(h2, h3), .book-meta strong { font-family: var(--font-display); font-size: 1.06rem; color: var(--cream); }
.book-meta :is(p, span, small) { color: #dfcbb0; font-size: .76rem; }
.is-placeholder .book-meta :is(p, span, small) { color: #c3ad93; }
.detail-layout { display: grid; grid-template-columns: minmax(10rem, .64fr) minmax(0, 1fr); gap: clamp(1.6rem, 7vw, 5.6rem); align-items: center; }
.detail-cover { display: grid; place-items: center; padding: clamp(1.2rem, 5vw, 3rem); min-width: 0; border: 1px solid #65563c; border-radius: var(--radius); background: radial-gradient(ellipse at center, #79614570, transparent 75%), #202c22; box-shadow: inset 0 0 3.4rem #11190fd0; }
.detail-cover .book-cover { width: min(100%, 15.5rem); }
.detail-cover > img { max-height: 27rem; border-radius: .3rem; box-shadow: var(--shadow); }
.detail-copy { min-width: 0; }
.detail-copy > * + * { margin-top: 1rem; }
.detail-copy h1 { font-size: clamp(2.35rem, 6vw, 4.6rem); overflow-wrap: anywhere; }
.detail-copy p { max-width: 60ch; }
.reader { width: min(70rem, calc(100% - 2rem)); margin-inline: auto; }
.reader .section-heading { display: grid; gap: .6rem; }
.reader-heading > div { min-width: 0; }
.reader h1 { font-size: clamp(1.75rem, 5vw, 3.45rem); overflow-wrap: anywhere; }
.reader-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 60rem);
  min-height: 15rem;
  margin: 1rem auto;
  padding: clamp(.35rem, 1vw, .65rem);
  border: 1px solid #8e6241;
  border-radius: .65rem;
  background: #593925;
  box-shadow: var(--shadow), inset 0 0 0 .13rem #28170c;
  overflow: clip;
  perspective: 100rem;
  touch-action: pan-y pinch-zoom;
}
.reader-sheet {
  display: block;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-height: 71vh;
  object-fit: contain;
  background: #f5efe2;
  color: #322314;
}
.reader-stage [data-reader-sheet="left"] { border-radius: .35rem 0 0 .35rem; }
.reader-stage [data-reader-sheet="right"] { border-radius: 0 .35rem .35rem 0; box-shadow: inset .65rem 0 1.6rem #462c1536; }
.reader-stage:not(.is-single)::after { position: absolute; z-index: 1; inset-block: .65rem; left: 50%; width: .85rem; transform: translateX(-50%); content: ""; background: linear-gradient(90deg, transparent, #3526176e 49%, #f3e6cc78 52%, transparent); pointer-events: none; }
.reader-stage.is-single { grid-template-columns: minmax(0, 1fr); max-width: 35rem; }
.reader-stage.is-single [data-reader-sheet] { border-radius: .35rem; }
.reader-stage:not(.is-zoomed).is-turning-next .reader-sheet { animation: reader-turn-next .32s ease-out; }
.reader-stage:not(.is-zoomed).is-turning-prev .reader-sheet { animation: reader-turn-prev .32s ease-out; }
@keyframes reader-turn-next { from { opacity: .72; transform: perspective(90rem) rotateY(-2.25deg) translateX(.3rem); } to { opacity: 1; transform: none; } }
@keyframes reader-turn-prev { from { opacity: .72; transform: perspective(90rem) rotateY(2.25deg) translateX(-.3rem); } to { opacity: 1; transform: none; } }

.author-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.author-card { display: grid; gap: .65rem; align-content: start; min-width: 0; }
.author-card img { max-height: 10.5rem; border-radius: .32rem; }
.author-card :is(h2, h3, p) { overflow-wrap: anywhere; }
.author-card .actions { margin-top: .3rem; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .78fr); align-items: start; gap: clamp(1rem, 3vw, 2rem); }
.checkout-summary, .payment-card { display: grid; gap: 1rem; min-width: 0; }
.checkout-price { color: var(--gold); font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 3.85rem); font-weight: 500; line-height: 1.08; }
.checkout-price small { color: var(--muted); font: .92rem/1.25 var(--font-sans); }
.checkout-status { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.pix-qr { display: block; width: min(100%, 15rem); height: auto; aspect-ratio: 1; margin-inline: auto; padding: .5rem; border-radius: .75rem; background: white; object-fit: contain; }
.pix-code { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .79rem; }

@media (max-width: 51rem) {
  .site-nav { gap: .7rem; }
  #site-menu { gap: .5rem; }
  .nav-links a, .nav-actions > a:not(.button) { padding-inline: .52rem; font-size: .81rem; }
  .nav-actions .button { padding-inline: .68rem; font-size: .79rem; }
}
@media (max-width: 44rem) {
  .site-nav { flex-wrap: wrap; }
  .js .site-nav .menu-toggle { display: inline-flex; align-items: center; gap: .4rem; }
  #site-menu { flex: 1 0 100%; flex-wrap: wrap; gap: .35rem; }
  .js #site-menu {
    position: absolute;
    top: calc(100% + .42rem);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: .65rem;
    border: 1px solid #526955;
    border-radius: 1rem;
    background: #213428;
    box-shadow: var(--shadow);
  }
  .js #site-menu:not(.is-open) { display: none; }
  #site-menu .nav-links, #site-menu .nav-actions { flex-wrap: wrap; }
  .js #site-menu .nav-links, .js #site-menu .nav-actions { flex-direction: column; align-items: stretch; }
  .js #site-menu .nav-links a, .js #site-menu .nav-actions > a, .js #site-menu .nav-actions > form > button { justify-content: start; width: 100%; }
  .js #site-menu .nav-actions .button { justify-content: center; }
  .auth-shell, .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .shelf { --book-size: 8.6rem; }
  .detail-layout { grid-template-columns: minmax(8rem, .52fr) minmax(0, 1fr); gap: 1.05rem; }
}
@media (max-width: 34rem) {
  .wrap { width: calc(100% - 1.5rem); }
  .site-header { padding-top: .75rem; }
  .site-nav { min-height: 3.55rem; padding: .36rem .48rem .36rem .58rem; }
  .brand-mark { width: 2.3rem; height: 2.3rem; }
  .brand { gap: .45rem; }
  .brand-wordmark { font-size: .88rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .detail-cover .book-cover, .detail-cover > img { width: min(100%, 10rem); }
  .shelf { --book-size: 7.1rem; padding: .4rem .4rem .55rem; }
  .shelf-track { padding: 1.25rem .75rem .4rem; }
  .shelf::after { height: .74rem; }
  .book-cover { gap: .34rem; padding: .75rem .48rem .75rem .7rem; }
  .book-cover-mark { font-size: .56rem; }
  .reader { width: calc(100% - 1.1rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* Page compositions */
.site-main > :is(.catalog-hero, .section):not(.wrap, .reader) {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}
.catalog-hero .hero-copy {
  display: grid;
  justify-items: center;
  gap: .8rem;
  max-width: 55rem;
}
.catalog-hero .hero-copy > .eyebrow::after { content: ""; width: 1.45rem; height: 1px; background: currentColor; }
.catalog-hero .hero-copy > p { margin-block: 0; }
.catalog-hero .shelf-wrap { width: 100%; min-width: 0; }
.book-cover-edition { color: #efd3a1; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.book-cover-title, .book-meta { overflow-wrap: anywhere; }
.shelf + .shelf { margin-top: 1rem; }
.shelf-track.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.shelf-track.is-dragging * { cursor: grabbing; }
.catalog-filters {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: end;
  padding: clamp(.75rem, 2vw, 1.25rem);
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #203428a3;
}
.catalog-filters ~ nav { margin-top: 1rem; }
.audio-track { display: grid; gap: .7rem; margin-block: .85rem; }
.audio-track audio { display: block; max-width: 37rem; }
.section-heading:has(> .button) { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .7rem; }
.section-heading:has(> .button) > div { margin-top: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: .65rem 1rem; }
.footer-inner { align-items: center; }
.footer-inner .brand-mark { width: 2.15rem; height: 2.15rem; }
.footer-inner .brand-wordmark { font-size: .84rem; }
.reader-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .6rem; }
.reader-toolbar [data-reader-prev] { justify-self: start; }
.reader-toolbar [data-reader-next] { justify-self: end; }
.reader-status { color: var(--muted); font-size: .85rem; text-align: center; }
.reader-modes { justify-content: center; }
.reader-modes [aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.reader:not(.is-enhanced) .reader-stage { grid-template-columns: minmax(0, 1fr); max-width: 35rem; }
.reader:not(.is-enhanced) .reader-stage::after { display: none; }
.reader.is-enhanced .reader-stage img { cursor: zoom-in; }
.reader .reader-stage.is-zoomed {
  align-items: start;
  max-height: min(72vh, 55rem);
  max-height: min(72dvh, 55rem);
  grid-template-columns: repeat(2, minmax(clamp(32rem, 60vw, 50rem), 1fr));
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: auto;
}
.reader .reader-stage.is-single.is-zoomed { grid-template-columns: minmax(clamp(32rem, 76vw, 56rem), 1fr); }
.reader .reader-stage.is-zoomed::after { display: none; }
.reader .reader-stage.is-zoomed img { height: auto; max-height: none; cursor: zoom-out; }
.reader .reader-stage img.is-unavailable { min-height: 10rem; text-align: center; }

@media (max-width: 40rem) {
  .catalog-filters { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  .site-main > :is(.catalog-hero, .section):not(.wrap, .reader) { width: calc(100% - 1.5rem); }
  .reader-toolbar { gap: .3rem; }
  .reader-toolbar .button { padding-inline: .52rem; font-size: .79rem; }
  .reader-status { font-size: .76rem; }
}

.nav-shortcuts {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .3rem;
  min-width: 0;
  padding-top: .3rem;
}
.nav-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: .35rem .65rem;
  border: 1px solid #526a53;
  border-radius: 99rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.nav-shortcuts a:hover, .nav-shortcuts a[aria-current="page"] { color: var(--cream); background: #38503c; border-color: #789179; }
.reader-toolbar [data-reader-prev]::before { content: "‹" / ""; font-size: 1.15em; }
.reader-toolbar [data-reader-next]::after { content: "›" / ""; font-size: 1.15em; }
.reader:has(.reader-stage.is-zoomed) .reader-toolbar {
  position: sticky;
  z-index: 2;
  top: .55rem;
  padding: .35rem;
  border-radius: .7rem;
  background: #19271ff2;
}
.payment-card .muted, .checkout-summary .muted { overflow-wrap: anywhere; }
.author-cover { border-radius: .3rem; box-shadow: 0 .5rem 1.2rem #0b100c99; }
.checkbox { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .88rem; }
@media (min-width: 44.01rem) {
  .site-nav:has(.nav-shortcuts) { border-radius: 1.35rem; }
  #site-menu:has(.nav-shortcuts) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .05rem .7rem;
  }
  #site-menu:has(.nav-shortcuts) .nav-links { justify-content: flex-end; }
  #site-menu .nav-shortcuts { grid-column: 1 / -1; border-top: 1px solid #49614e; }
}
@media (max-width: 53rem) { .shelf { --book-size: 8.55rem; } }
@media (max-width: 44rem) {
  .nav-shortcuts { justify-content: flex-start; }
  .nav-shortcuts a { min-height: 2.7rem; }
  .shelf-track { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Leitor: imagens sempre enquadradas no espaço disponível, sem área rolável. */
.reader { width: min(74rem, calc(100% - 2rem)); padding-block: clamp(1.25rem, 3vw, 2.4rem) 2.5rem; }
.reader .reader-heading { margin-bottom: 1.2rem; }
.reader .reader-heading h1 { font-size: clamp(1.65rem, 3.7vw, 3rem); }
.reader .reader-heading .eyebrow { font-size: .68rem; }
.reader-toolbar { width: min(100%, 62rem); margin-inline: auto; }
.reader-toolbar .reader-status { margin: 0; color: #e7d9be; font-weight: 650; }
.reader-navigation[aria-disabled="true"] { opacity: .4; cursor: default; }
.reader-stage,
.reader:not(.is-enhanced) .reader-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  width: min(100%, 62rem);
  max-width: 62rem;
  height: min(67vh, 46rem);
  height: min(67dvh, 46rem);
  min-height: 14rem;
  margin: .8rem auto;
  padding: clamp(.25rem, .7vw, .5rem);
  overflow: hidden;
  perspective: 95rem;
  background: linear-gradient(115deg, #553525, #261912 48%, #60422d);
  box-shadow: 0 1.4rem 3rem #03090799, inset 0 0 0 .12rem #b9875a63;
  touch-action: pan-y pinch-zoom;
}
.reader-stage.is-single,
.reader:not(.is-enhanced) .reader-stage { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
.reader-stage .reader-sheet {
  width: 100%; height: 100%; min-width: 0; min-height: 0; max-height: none;
  object-fit: contain; object-position: center; background: #f0eadc;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
.reader.is-enhanced .reader-stage img { cursor: pointer; }
.reader-stage:not(.is-single)::after { z-index: 2; inset-block: .35rem; pointer-events: none; }
.reader-stage:not(.is-zoomed).is-turning-next .reader-sheet,
.reader-stage:not(.is-zoomed).is-turning-prev .reader-sheet { animation: none; }
.reader-flip {
  position: absolute; z-index: 3; top: .4rem; bottom: .4rem; right: .4rem; width: calc(50% - .4rem);
  transform-origin: left center; pointer-events: none; opacity: 0; backface-visibility: hidden;
  box-shadow: -.3rem 0 .8rem #0004;
}
.reader-flip img { display: block; width: 100%; height: 100%; object-fit: contain; background: #f0eadc; }
.reader-stage.is-single .reader-flip { width: calc(100% - .8rem); }
.reader-stage.is-turning-next .reader-flip { animation: reader-page-turn-next .5s ease-in-out both; }
.reader-stage.is-turning-prev .reader-flip { left: .4rem; right: auto; transform-origin: right center; animation: reader-page-turn-prev .5s ease-in-out both; }
@keyframes reader-page-turn-next { 0% { opacity: 1; transform: rotateY(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: rotateY(-165deg); } }
@keyframes reader-page-turn-prev { 0% { opacity: 1; transform: rotateY(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: rotateY(165deg); } }
.reader-modes { margin-top: 1rem; }
.reader-modes [aria-pressed="true"] { background: #d7b77b; color: #1b261c; border-color: #f2d59e; }
.reader-hint { margin: .8rem auto 0; text-align: center; color: #bbc9bb; font-size: .8rem; }
.reader-zoom:not([open]) { display: none; }
.reader-zoom[open] {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .7rem;
  position: fixed; inset: 0; z-index: 100; width: 100%; max-width: none;
  height: 100vh; height: 100dvh; max-height: none; margin: 0;
  padding: clamp(.55rem, 2vw, 1rem); overflow: hidden; border: 0;
  background: radial-gradient(ellipse at center, #1d3c2c, #07130e 85%); color: var(--cream);
}
.reader-zoom::backdrop { background: #07110fee; }
.reader-zoom-header, .reader-zoom-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.reader-zoom-label { color: var(--gold); font-size: .72rem; letter-spacing: .14em; font-weight: 750; }
.reader-zoom-content { min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.reader-zoom-content img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.reader-zoom-footer { justify-content: center; }
.reader-zoom-footer > span { min-width: 7rem; text-align: center; color: var(--cream); font-size: .85rem; }
.page-reader .reader-sheet, .page-reader .reader-zoom-content img { -webkit-touch-callout: none; }

/* Capas com profundidade, animação ao focar ou passar o ponteiro. */
.shelf-book { perspective: 45rem; }
.shelf-book .book-cover { transform: perspective(45rem) rotateY(-7deg); transform-origin: left center; transition: transform .45s ease, box-shadow .45s ease; }
.shelf-book:not(.is-placeholder):is(:hover, :focus-visible, :focus-within) .book-cover {
  transform: perspective(45rem) translateY(-.4rem) rotateY(-19deg) rotateX(2deg);
}
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .shelf-book:not(.is-placeholder) .book-cover { animation: shelf-book-breathe 6s ease-in-out infinite; }
  .shelf-book:nth-child(2n) .book-cover { animation-delay: -1.5s; }
  @keyframes shelf-book-breathe { 0%, 100% { transform: perspective(45rem) rotateY(-7deg); } 50% { transform: perspective(45rem) translateY(-.15rem) rotateY(-13deg); } }
}
@media (max-width: 34rem) {
  .reader { width: calc(100% - 1rem); }
  .reader-stage, .reader:not(.is-enhanced) .reader-stage { height: min(60vh, 38rem); height: min(60dvh, 38rem); }
  .reader-modes { gap: .35rem; }
  .reader-modes .button { min-height: 2.6rem; padding-inline: .65rem; font-size: .78rem; }
  .reader-zoom-footer > span { min-width: 5rem; font-size: .75rem; }
  .reader-zoom-footer .button { padding-inline: .5rem; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reader-stage .reader-flip, .shelf-book .book-cover { animation: none !important; transition: none !important; }
}
@media print { .page-reader .reader-stage, .page-reader .reader-zoom { visibility: hidden !important; } }
.reader-page-zoom { position: absolute; z-index: 4; bottom: .65rem; left: 25%; transform: translateX(-50%); padding: .28rem .55rem; border: 1px solid #d0ac77a6; border-radius: 2rem; background: #18241fda; color: #fff4de; font-size: .7rem; font-weight: 700; opacity: .86; }
.reader-page-zoom-right { left: 75%; }
.reader-stage.is-single .reader-page-zoom-left { left: 50%; }
.reader-page-zoom:focus-visible, .reader-page-zoom:hover { opacity: 1; background: #384735; }
.reader-error { margin: .7rem auto; color: #ffd5c7; font-size: .85rem; text-align: center; }
.shelf-book:not(.is-placeholder):is(:hover, :focus-visible, :focus-within) .book-cover { animation: none; }
/* A leitura tem seu próprio retorno ao livro; reservar a tela para o conteúdo. */
.page-reader .site-header, .page-reader .site-footer { display: none; }
@media (min-height: 36rem) {
  body.page-reader { height: 100vh; height: 100dvh; }
  .page-reader .site-main { display: flex; flex-direction: column; min-height: 0; }
  .page-reader .reader { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding-block: .75rem; }
  .page-reader .reader-heading { flex: 0 0 auto; margin-bottom: .55rem; }
  .page-reader .reader-heading h1 { font-size: clamp(1.35rem, 3vw, 2.35rem); }
  .page-reader .reader-toolbar, .page-reader .reader-modes, .page-reader .reader-hint, .page-reader .reader-error { flex: 0 0 auto; }
  .page-reader .reader-stage, .page-reader .reader:not(.is-enhanced) .reader-stage { flex: 1 1 10rem; height: auto; min-height: 0; }
  .page-reader .reader-modes { margin-top: .3rem; }
  .page-reader .reader-hint { margin-top: .4rem; }
}

/* Setas ornamentais ficam junto ao livro; a numeração acompanha a leitura. */
.reader-book-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.05rem, 1vw, .9rem);
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: .5rem auto .35rem;
}
.reader-book-shell .reader-stage,
.reader:not(.is-enhanced) .reader-book-shell .reader-stage {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin: 0;
}
.reader-stage .reader-sheet.is-blank { background: #f0eadc; }
.reader-navigation {
  display: grid;
  flex: 0 0 clamp(2.75rem, 5.4vw, 4.75rem);
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .2rem;
  border-radius: 999px;
  color: #efc371;
  text-decoration: none;
  transition: transform .2s ease, filter .2s ease, opacity .2s ease;
}
.reader-navigation svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 .15rem .16rem #0009); }
.reader-navigation-next svg { transform: rotate(180deg); }
.reader-arrow-wing { fill: #d79b40; stroke: #ffdf94; stroke-width: 1; stroke-linejoin: round; }
.reader-arrow-line, .reader-arrow-ring { fill: none; stroke: #eec572; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reader-arrow-dot { fill: #ffdf94; }
.reader-navigation:hover:not([aria-disabled="true"]), .reader-navigation:focus-visible { filter: brightness(1.25); transform: scale(1.08); }
.reader-navigation:focus-visible { outline: 2px solid #f5d797; outline-offset: 2px; }
.reader-navigation[aria-disabled="true"] { opacity: .28; cursor: default; }
.reader-status { flex: 0 0 auto; margin: 0 auto; color: #e3bd75; font: 600 .9rem/1.5 var(--font-display); letter-spacing: .14em; text-align: center; }
@media (min-height: 36rem) {
  .page-reader .reader-book-shell { flex: 1 1 10rem; }
  .page-reader .reader-book-shell .reader-stage,
  .page-reader .reader:not(.is-enhanced) .reader-book-shell .reader-stage { flex: 1 1 auto; height: 100%; min-height: 0; }
}
@media (max-width: 34rem) {
  .reader-book-shell { gap: 0; }
  .reader-navigation { flex-basis: 2.75rem; }
  .reader-status { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { .reader-navigation { transition: none; } }
