:root {
  color-scheme: light;
  --paper: #f6f2e9;
  --cream: #eee6d6;
  --ink: #20251e;
  --muted: #55594d;
  --green: #18392f;
  --line: #d7cdbd;
  --rust: #9e4d35;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .23em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
:focus-visible { outline: 3px solid #af5b41; outline-offset: 4px; }
.wrap { width: min(100% - 6.5rem, 76rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; top: 1rem; left: 1rem; padding: .7rem 1rem; background: var(--paper); }
.top { background: var(--paper); }
.bar { min-height: 5.6rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .85rem; justify-self: start; line-height: 1.1; }
.brand b { display: block; font: 500 1.8rem/.98 var(--serif); }
.brand small { display: block; font-size: .76rem; margin-top: .32rem; color: var(--muted); }
.mark { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font: 1.65rem/1 var(--serif); }
.bar nav { display: flex; gap: clamp(1.3rem,4vw,3.6rem); font-size: .96rem; }
.cart-toggle { justify-self: end; display: flex; gap: .65rem; align-items: center; padding: .48rem .7rem .48rem .9rem; border: 1px solid var(--line); border-radius: 3rem; background: transparent; color: var(--ink); white-space: nowrap; }
.cart-toggle:hover { border-color: var(--green); }
.cart-toggle span { display: grid; place-items: center; min-width: 1.45rem; height: 1.45rem; padding-inline: .2rem; border-radius: 1rem; background: var(--green); color: var(--paper); font-size: .76rem; }
.hero { color: #f8efd9; background: #17382e; overflow: hidden; }
.hero-grid { min-height: 35rem; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; }
.hero-copy { z-index: 1; padding-block: 3.25rem; }
.eyebrow { display: flex; gap: .62rem; align-items: center; font-size: .77rem; font-weight: 650; text-transform: uppercase; letter-spacing: .14em; }
.eyebrow span { width: 1.45rem; height: 1px; background: currentColor; }
.hero .eyebrow { color: #e1bd8e; }
.hero-author { margin-top: 2.05rem; font-size: 1.08rem; color: #e9d9bc; }
.hero h1 { margin: .2rem 0 1.25rem; font-size: clamp(5rem,9vw,9.2rem); line-height: .86; letter-spacing: -.065em; }
.hero-dek { max-width: 29rem; color: #e9deca; font-size: 1.04rem; }
.actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.6rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.9rem; padding: .63rem 1.15rem; border: 1px solid transparent; border-radius: .23rem; font-weight: 650; line-height: 1.25; }
.button:hover { text-decoration: none; }
.paper { background: #efe1c4; color: #17382e; }
.paper:hover { background: #fff1d4; }
.outline-light { border-color: #9baf9d; color: #f8efd9; }
.outline-light:hover { background: #24473c; }
.outline { background: transparent; color: var(--green); border-color: var(--green); }
.outline:hover { background: #e9e3d5; }
.solid { background: var(--green); color: #fff8e8; }
.solid:hover { background: #295044; }
.hero-art { position: relative; align-self: stretch; display: grid; place-items: center; isolation: isolate; }
.hero-art::before { content: ""; position: absolute; z-index: -1; width: min(47vw,42rem); height: min(47vw,42rem); border-radius: 50%; opacity: .55; background: repeating-radial-gradient(circle at center, transparent 0 1.5rem, #92a48e 1.54rem, transparent 1.6rem 2.08rem); mask-image: radial-gradient(circle, transparent 28%, #000 42%, transparent 73%); }
.hero-art::after { content: ""; z-index: -2; position: absolute; inset: 0 -22%; background: radial-gradient(ellipse at center,#3b5140 0%,#17382e00 66%); }
.hero-book { width: clamp(14.25rem,24vw,21rem); transform: rotate(-7deg); box-shadow: .9rem 1.5rem 2.8rem #081810aa; transition: transform .25s ease; }
.hero-book:hover { transform: rotate(-4deg) translateY(-.25rem); }
.hero-book img { width: 100%; border-radius: .12rem .26rem .26rem .12rem; }
.catalog { padding-block: 4.25rem 5rem; }
.section-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: end; }
.section-head h2, .about h2 { font-size: clamp(2.55rem,5vw,4.7rem); line-height: 1; letter-spacing: -.045em; }
.search { min-height: 2.8rem; position: relative; }
.search input { color: var(--ink); width: min(20rem,100%); padding: .64rem .75rem .64rem 2.55rem; border: 1px solid var(--line); background: #fcf8ef; border-radius: .25rem; }
.search input::placeholder { color: var(--muted); }
.search-icon { position: absolute; width: .9rem; height: .9rem; border: 1.5px solid var(--green); border-radius: 50%; left: .9rem; top: .87rem; pointer-events: none; }
.search-icon::after { content: ""; position: absolute; height: .38rem; width: 1.5px; background: var(--green); right: -.13rem; bottom: -.25rem; transform: rotate(-45deg); }
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.75rem 0 1.5rem; }
.filters button { padding: .45rem .83rem; border: 1px solid var(--line); border-radius: 2rem; background: transparent; color: var(--ink); font-size: .9rem; }
.filters button:hover { border-color: var(--green); }
.filters button[aria-pressed="true"] { color: var(--paper); background: var(--green); border-color: var(--green); }
.shelf { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1rem,3vw,2.25rem); }
.card { min-width: 0; }
.cover-stage { position: relative; display: block; aspect-ratio: 1.05; background: #e8e1cf; border-radius: .28rem; overflow: hidden; }
.card[data-id="perekrestok"] .cover-stage { background: #dce3d9; }
.card[data-id="pravo-na-syna"] .cover-stage { background: #e9ded5; }
.cover-stage img { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); height: 78%; width: auto; max-width: 80%; object-fit: contain; box-shadow: .45rem .65rem 1rem #15180b42; transition: transform .2s ease; }
.card:hover .cover-stage img { transform: translate(-50%,calc(-50% - .24rem)); }
.card-info { padding-top: 1.07rem; }
.card-info .genre { color: var(--rust); font-size: .84rem; }
.card h3 { font-size: clamp(1.4rem,2.7vw,2.05rem); line-height: 1.1; margin: .25rem 0 .3rem; }
.card .author { color: var(--muted); font-size: .93rem; }
.empty { grid-column: 1/-1; min-height: 8rem; padding: 1.2rem 0; }
.about { background: var(--cream); padding-block: 4rem; }
.about-grid { display: grid; grid-template-columns: 1fr .8fr; gap: 3rem; }
.about p + p { margin-top: .8rem; }
.about .button { margin-top: 1.2rem; }
.footer { padding-block: 2rem; }
.footprint { display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; }
.footprint p { color: var(--muted); font-size: .86rem; }
.footprint > a:last-child { font-size: .9rem; }
dialog { width: min(50rem,100% - 2rem); max-height: min(90dvh,55rem); border: 1px solid var(--line); border-radius: .4rem; background: var(--paper); color: var(--ink); padding: 1.5rem; }
dialog::backdrop { background: #13281f9e; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-top h2 { font-size: 2.1rem; }
.close { display: grid; place-items: center; background: transparent; color: var(--ink); border: 1px solid var(--line); width: 2.65rem; height: 2.65rem; border-radius: 50%; line-height: .8; font-size: 1.75rem; flex: none; }
.close:hover { background: var(--cream); }
.book-detail { display: grid; grid-template-columns: minmax(7rem,34%) 1fr; gap: 1.5rem; }
.book-detail img { width: 100%; border-radius: .2rem; }
.book-detail h2 { font-size: clamp(2rem,5vw,3rem); line-height: 1; letter-spacing: -.035em; margin-block: .22rem .45rem; }
.book-detail .genre { color: var(--rust); font-size: .88rem; }
.book-detail .summary { margin-top: .8rem; }
.edition { display: flex; justify-content: space-between; gap: .8rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 .4rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.subtle { color: var(--muted); font-size: .89rem; }
.drawer { margin: 0 0 0 auto; min-height: 100dvh; max-height: 100dvh; width: min(100%,28rem); border-radius: 0; }
.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-item { display: flex; align-items: center; gap: .85rem; padding-block: .85rem; border-bottom: 1px solid var(--line); }
.cart-item img { width: 2.8rem; border-radius: .12rem; }
.cart-item > div { flex: 1; }
.link-button { border: 0; padding: .4rem 0; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: .2em; font-size: .88rem; }
.total { display: flex; justify-content: space-between; padding-block: .9rem; font-weight: 650; }
.cart-actions { margin-top: .9rem; display: flex; flex-direction: column; align-items: start; gap: .65rem; }
.cart-done h3 { font-size: 1.65rem; line-height: 1.1; }
.cart-done p { margin-top: .75rem; }
@media (max-width: 850px) {
  .wrap { width: calc(100% - 3.2rem); }
  .hero-grid { min-height: 30rem; }
  .hero h1 { font-size: clamp(4.35rem,10.4vw,6.6rem); }
  .about-grid { gap: 1.6rem; }
}
@media (max-width: 570px) {
  .wrap { width: calc(100% - 2rem); }
  .bar { min-height: 4.7rem; grid-template-columns: 1fr auto; gap: .55rem; }
  .bar nav { display: none; }
  .brand { gap: .55rem; }
  .brand b { font-size: 1.47rem; }
  .mark { width: 2.3rem; height: 2.3rem; font-size: 1.35rem; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 2.1rem 0 1.9rem; }
  .hero .eyebrow { font-size: .71rem; }
  .hero-author { margin-top: 1.2rem; }
  .hero h1 { font-size: clamp(3.9rem,16vw,5.8rem); }
  .hero-art { min-height: 19.5rem; padding-bottom: 2rem; }
  .hero-art::before { width: 24rem; height: 24rem; }
  .hero-book { width: 11.7rem; }
  .catalog { padding-block: 2.9rem 3rem; }
  .section-head { align-items: stretch; flex-direction: column; gap: 1.1rem; }
  .search input { width: 100%; }
  .filters { margin-block: .85rem 1.15rem; }
  .shelf { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 1.65rem; }
  .cover-stage { aspect-ratio: .85; }
  .card-info { padding-top: .65rem; }
  .about { padding-block: 2.8rem; }
  .about-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footprint { flex-wrap: wrap; }
  .footprint p { order: 3; width: 100%; }
  dialog { padding: 1rem; }
  .book-detail { gap: .8rem; }
}
@media (max-width: 370px) {
  .book-detail { grid-template-columns: 1fr; }
  .book-detail img { width: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
