:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --cream: #f0e8d8;
  --ink: #2d261d;
  --muted: #65594b;
  --accent: #963e29;
  --line: #e1d8c9;
  --serif: "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: "DM Sans", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.shell { width: min(1264px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; z-index: 2; padding: 10px; background: white; translate: 0 -110%; }
.skip:focus { translate: 0; }
.header { border-bottom: 1px solid var(--line); }
.nav { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 21px/1.18 var(--serif); white-space: nowrap; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; background: var(--accent); color: #fff6e6; border-radius: 4px 9px 9px 4px; font: 24px/1 Georgia, serif; }
.brand small { display: block; margin-top: 5px; font: 700 8px/1 var(--sans); letter-spacing: .19em; }
nav { display: flex; gap: clamp(18px, 3vw, 44px); color: var(--muted); font-size: 14px; }
nav a:hover, footer a:hover { color: var(--accent); }
.list-button { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: transparent; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; font-size: 13px; }
.list-button:hover { border-color: var(--accent); }
.count { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 20px; background: var(--cream); color: var(--accent); font-weight: 700; }
.bag-icon { display: inline-block; position: relative; width: 13px; height: 12px; border: 1.4px solid currentColor; border-radius: 2px; }
.bag-icon::before { content: ""; position: absolute; width: 6px; height: 5px; left: 2px; top: -5px; border: 1.4px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; }
.hero { display: grid; grid-template-columns: .9fr 1.1fr; background: var(--cream); margin-top: 28px; border-radius: 8px; overflow: hidden; }
.hero-copy { padding: clamp(35px, 4vw, 52px) clamp(36px, 5.4vw, 76px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; letter-spacing: .15em; color: var(--accent); }
.eyebrow span { display: inline-block; width: 17px; height: 1px; background: currentColor; }
h1 { font: 700 clamp(52px, 5.7vw, 80px)/1.08 var(--serif); letter-spacing: -.055em; margin: 20px 0 18px; }
h1 em { font-style: normal; color: var(--accent); }
.hero-description { color: var(--muted); max-width: 30ch; line-height: 1.8; }
.primary { margin-top: 26px; min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; background: var(--accent); color: #fff8eb; border: 1px solid var(--accent); border-radius: 4px; padding: 9px 17px; font-weight: 700; font-size: 14px; }
.primary:hover { background: #763222; border-color: #763222; }
.primary span { font-size: 17px; }
.hero-image { min-width: 0; min-height: 420px; position: relative; background: #725139; }
.hero-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.catalog { padding: 48px 0 72px; scroll-margin-top: 22px; }
.catalog-heading, .tools, .catalog-meta, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.catalog-heading { align-items: end; margin-bottom: 25px; }
h2 { margin-top: 0; font: 700 clamp(29px, 3.6vw, 48px)/1.13 var(--serif); letter-spacing: -.025em; }
.demo-note, .catalog-meta, .muted { color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter, .search { border: 1px solid var(--line); border-radius: 5px; background: transparent; min-height: 39px; }
.filter { padding: 6px 13px; font-size: 13px; white-space: nowrap; }
.filter:hover { border-color: var(--accent); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search { display: flex; align-items: center; gap: 12px; padding: 0 12px; width: min(100%, 263px); flex-shrink: 0; }
.search:focus-within { border-color: var(--accent); }
.search input { min-width: 0; width: 100%; background: transparent; border: none; padding: 8px 0; outline: none; font-size: 13px; }
.search-icon { width: 12px; height: 12px; flex: 0 0 12px; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; }
.search-icon::after { content: ""; width: 5px; height: 1.5px; position: absolute; background: var(--muted); rotate: 45deg; left: 8px; top: 9px; }
.catalog-meta { border-top: 1px solid var(--line); margin-top: 17px; padding: 11px 0 13px; }
.sort select { border: none; background: transparent; font-size: 13px; padding: 3px 0 3px 5px; }
.books { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 18px; }
.book-card { min-width: 0; }
.book-picture { background: var(--mat); display: grid; width: 100%; place-items: center; padding: 23px 12px; border: none; border-radius: 5px; transition: filter .18s ease; }
.book-picture:hover { filter: saturate(1.15) brightness(1.025); }
.cover {
  display: grid; position: relative; isolation: isolate; align-content: start; justify-items: center;
  width: min(76%, 145px); aspect-ratio: .69; padding: 13% 6% 0 9%; overflow: hidden;
  border-radius: 2px 4px 4px 2px; box-shadow: 9px 12px 16px -6px #30251955, inset 6px 0 0 #0002, inset -3px 0 #fff4;
  color: var(--type); background: var(--cover); text-align: center; font-family: var(--serif);
}
.cover strong { position: relative; z-index: 1; font-size: clamp(12px, 1.55vw, 21px); line-height: 1.23; letter-spacing: .07em; }
.cover small { position: relative; z-index: 1; font-size: 9px; margin-top: 5px; }
.cover-art { position: absolute; left: 10%; right: 10%; bottom: 10%; height: 42%; color: var(--motif); opacity: .85; }
.cover-art.hill { background: currentColor; border-radius: 100% 100% 0 0; height: 28%; transform: rotate(-12deg); }
.cover-art.sun { border-radius: 50%; width: 50%; left: 25%; height: auto; aspect-ratio: 1; background: repeating-radial-gradient(circle, currentColor 0 2px, transparent 2px 8px); }
.cover-art.tide { background: repeating-radial-gradient(ellipse at 15% 120%, currentColor 0 1px, transparent 2px 9px); }
.cover-art.grid { border: 1px solid; background: repeating-linear-gradient(0deg, transparent 0 13px, currentColor 13px 14px), repeating-linear-gradient(90deg, transparent 0 13px, currentColor 13px 14px); }
.cover-art.moon { width: 49%; height: auto; aspect-ratio: 1; left: 27%; background: currentColor; border-radius: 50%; box-shadow: 18px 18px 0 -11px var(--cover) inset; }
.cover-art.leaf { width: 55%; left: 23%; background: currentColor; border-radius: 85% 0; transform: rotate(-18deg); }
.cover-art.steps { background: repeating-linear-gradient(110deg, currentColor 0 2px, transparent 2px 8px); clip-path: polygon(0 100%, 0 75%, 28% 75%, 28% 50%, 55% 50%, 55% 25%, 79% 25%, 79% 0, 100% 0, 100% 100%); }
.cover-art.lines { border-block: 1px solid; background: repeating-linear-gradient(0deg, transparent 0 8px, currentColor 8px 9px); }
.book-info { padding: 11px 0 0; }
.book-category { color: var(--accent); font-size: 11px; font-weight: 700; }
.book-info h3 { font: 700 18px/1.3 var(--serif); margin: 5px 0 3px; }
.book-info h3 button { padding: 0; border: 0; text-align: left; background: transparent; font: inherit; }
.book-info h3 button:hover { color: var(--accent); }
.book-author { color: var(--muted); font-size: 12px; }
.book-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.price { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.add { background: transparent; border: 1px solid var(--line); border-radius: 4px; min-height: 32px; padding: 3px 8px; font-size: 12px; }
[data-add][aria-disabled="true"] { opacity: .72; cursor: default; }
.add:hover { background: var(--cream); border-color: var(--accent); }
.empty { grid-column: 1 / -1; padding: 42px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }
footer { border-top: 1px solid var(--line); padding: 25px 0; background: var(--cream); }
footer a:last-child { font-size: 13px; }
dialog { width: min(500px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 25px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 20px 70px #21170e44; }
dialog::backdrop { background: #261e16a8; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 12px; }
.dialog-heading h2 { margin: 0; font-size: 29px; }
.close { min-width: 34px; min-height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: transparent; font-size: 23px; line-height: 1; }
.detail-info { margin-top: 15px; display: grid; gap: 12px; }
.detail-info .primary { justify-self: start; margin-top: 0; }
.detail-image { display: grid; place-items: center; padding: 16px; background: var(--mat); border-radius: 5px; }
.detail-image .cover { padding-top: 30px; }
.detail-image .cover strong { font-size: 18px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row h3 { font-size: 14px; }
.list-row p { font-size: 13px; }
.list-row button { flex-shrink: 0; }
#list-items { margin-top: 14px; }
#list-summary { margin-top: 14px; }
.feedback { position: fixed; z-index: 1; bottom: 18px; right: 18px; border-radius: 5px; background: var(--ink); color: var(--paper); padding: 10px 16px; pointer-events: none; }
.feedback:empty { padding: 0; }
@media (max-width: 920px) {
  .shell { width: calc(100% - 54px); }
  .hero-image { min-height: 350px; }
  .hero-copy { padding: 35px; }
  .books { gap: 24px 12px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .nav { min-height: 66px; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; margin-top: 16px; }
  .hero-copy { padding: 29px 24px 30px; }
  h1 { margin: 16px 0 12px; }
  .hero-image { min-height: 0; aspect-ratio: 1.7; }
  .catalog { padding: 39px 0 48px; }
  .catalog-heading { align-items: start; flex-direction: column; gap: 7px; margin-bottom: 16px; }
  .tools { flex-direction: column-reverse; align-items: stretch; gap: 11px; }
  .search { width: 100%; }
  .books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover strong { font-size: clamp(12px, 3.3vw, 19px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

