[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nav-actions { display: flex; gap: 14px; align-items: center; margin-left: auto; white-space: nowrap; }
.nav-actions a { color: var(--hero-ink); font: 700 13px/1 var(--display); display: inline-flex; align-items: center; gap: 4px; }
.nav-actions a:first-child { font-size: 26px; font-weight: 500; }
#cart-count { min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: var(--hero-ink); color: var(--accent); font-size: 11px; }
.site-header { position: relative; }
#home-view .site-header { position: absolute; }
/* The home hero starts below the relative masthead; keep the same full-bleed composition. */
#home-view { margin-top: -70px; }
#app-view { min-height: 55vh; }
.section-more { margin-top: 24px; text-align: right; }
.event-list { display: grid; gap: 26px; }
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 45px 48px; }
.page-hero .eyebrow { display: block; margin-bottom: 8px; }
.page-hero h1 { font: 800 clamp(29px, 3.6vw, 43px)/1.13 var(--display); letter-spacing: -.05em; }
.product-page .page-hero h1 { font-size: clamp(24px, 2.65vw, 32px); }
.page-hero p { max-width: 61ch; color: var(--muted); margin-top: 10px; }
.page-content { padding-block: 48px 90px; }
.page-content h2 { font: 700 clamp(22px, 2.3vw, 29px)/1.22 var(--display); letter-spacing: -.04em; }
.page-content h3 { font: 700 17px/1.35 var(--display); letter-spacing: -.025em; }
.page-content .subtle, .muted { color: var(--muted); }
.page-content .subtle { font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 25px; }
.toolbar input[type="search"] { flex: 1 1 230px; }
.toolbar select { flex: 0 1 175px; }
input, select, textarea { max-width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 12px 13px; background: var(--bg); color: var(--ink); font: 14px/1.4 var(--body); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 110px; resize: vertical; }
label { font-size: 13px; font-weight: 700; }
.field { display: grid; gap: 7px; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-stack { display: grid; gap: 16px; }
.form-stack > .button { justify-self: start; }
.form-panel { background: var(--surface); border: 1px solid var(--line); padding: 28px; border-radius: 8px; }
.book-grid.compact { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 34px 26px; }
.compact .book-cover { height: 285px; }
.compact .book-cover strong { font-size: clamp(24px, 2.5vw, 33px); }
.card-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.card-actions .button { min-height: 38px; padding: 8px 14px; font-size: 12px; }
.text-link { color: var(--accent); font-size: 13px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }
.price { font: 800 16px/1.3 var(--display); color: var(--ink); }
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 42px; }
.pagination button { min-width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--bg); }
.pagination button.active, .pagination button:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.empty-state { padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.detail-layout { display: grid; grid-template-columns: minmax(220px,.8fr) 1.2fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.detail-cover { height: 490px; max-width: 410px; }
.detail-cover strong { font-size: clamp(36px, 4vw, 54px); }
.detail-cover.cover-image { padding: 0; background: var(--surface); }
.detail-cover.cover-image img, .book-cover.cover-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy { display: grid; gap: 17px; min-width: 0; }
.detail-copy h1 { font: 800 clamp(30px, 3.6vw, 44px)/1.13 var(--display); letter-spacing: -.05em; }
.product-page .detail-copy h1 { font-size: clamp(25px, 2.8vw, 33px); }
.detail-copy p { color: var(--muted); }
.detail-copy .price { font-size: 25px; color: var(--accent); }
.detail-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.detail-controls input { width: 75px; }
.tab-row { display: flex; gap: 25px; border-bottom: 1px solid var(--line); margin-top: 50px; }
.tab-row button { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 12px 0; color: var(--muted); font-weight: 700; }
.tab-row button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-body { max-width: 68ch; padding-block: 24px; line-height: 1.8; white-space: pre-line; }
.related-section { margin-top: 48px; }
.cart-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); gap: 35px; align-items: start; }
.cart-list { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 85px minmax(0,1fr) auto; gap: 18px; align-items: center; border-bottom: 1px solid var(--line); padding-block: 14px; }
.cart-item .mini-cover { height: 105px; padding: 9px; box-shadow: 3px 5px 10px rgba(0,0,0,.1); }
.mini-cover strong { font-size: 12px; }
.mini-cover .imprint, .mini-cover .cover-foot { font-size: 5px; }
.cart-item h3 { margin-bottom: 5px; }
.cart-item p { color: var(--muted); font-size: 12px; }
.cart-item-right { text-align: right; display: grid; justify-items: end; gap: 7px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; }
.qty-control button { border: 0; background: var(--surface); color: var(--ink); padding: 4px 11px; }
.qty-control span { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.summary { background: var(--surface); border: 1px solid var(--line); padding: 25px; border-radius: 8px; display: grid; gap: 15px; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.summary-row.total { padding-top: 14px; border-top: 1px solid var(--line); font-weight: 800; font-size: 18px; }
.journal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.journal-card { border-bottom: 1px solid var(--line); padding-bottom: 22px; display: grid; align-content: start; gap: 11px; }
.journal-card img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.journal-card p { color: var(--muted); font-size: 13px; }
.article-layout { max-width: 780px; }
.article-layout h1 { font: 800 clamp(30px,4vw,50px)/1.18 var(--display); letter-spacing: -.045em; }
.article-layout .lead { color: var(--muted); font-size: 18px; margin-top: 16px; }
.article-layout img { width: 100%; max-height: 425px; object-fit: cover; margin-block: 32px; }
.article-prose { max-width: 65ch; line-height: 1.85; }
.article-prose p + p { margin-top: 19px; }
.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: start; }
.contact-copy { display: grid; gap: 14px; }
.contact-copy p { color: var(--muted); }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 25px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 23px; }
.admin-tabs button, .small-button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 8px 12px; border-radius: 4px; font-weight: 700; }
.admin-tabs button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.admin-list { display: grid; gap: 10px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); padding: 15px; }
.admin-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.admin-row p { font-size: 12px; color: var(--muted); }
.admin-actions { display: flex; gap: 7px; flex: none; }
.admin-editor { display: grid; gap: 16px; max-width: 750px; }
.admin-editor .button { justify-self: start; }
.inbox-entry { padding: 16px 0; border-bottom: 1px solid var(--line); }
.inbox-entry p { overflow-wrap: anywhere; }
.notice { position: fixed; bottom: max(20px, env(safe-area-inset-bottom, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); z-index: 50; max-width: min(380px, calc(100vw - 32px)); padding: 14px 18px; border-radius: 5px; box-shadow: 0 12px 32px rgba(0,0,0,.22); background: var(--night); color: var(--hero-ink); font-size: 13px; }
.newsletter-form { display: flex; gap: 6px; flex-wrap: wrap; }
.newsletter-form input { width: 185px; }
.newsletter-form .button { min-height: 43px; }
@media (max-width: 1050px) { .desktop-nav { gap: 14px; } .desktop-nav a { font-size: 12px; } .footer-links { gap: 28px; } }
@media (max-width: 850px) {
  .desktop-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--header); padding: 10px max(16px, env(safe-area-inset-right, 0px)) 22px max(16px, env(safe-area-inset-left, 0px)); flex-direction: column; align-items: stretch; gap: 0; }
  .desktop-nav.open { display: flex; }
  .desktop-nav a { padding: 11px 7px; }
  .menu-toggle { display: block; margin-left: 0; }
  .nav-actions { margin-left: auto; }
  .header-inner { min-height: 70px; }
  .footer-main { flex-wrap: wrap; }
  .book-grid.compact, .journal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .desktop-nav { top: 65px; }
  #home-view { margin-top: -65px; }
  .page-hero { padding-block: 34px; }
  .page-content { padding-block: 38px 65px; }
  .book-grid.compact, .journal-grid, .detail-layout, .contact-layout { grid-template-columns: 1fr; }
  .book-grid.compact { max-width: 370px; }
  .detail-cover { height: 390px; width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 62px minmax(0,1fr); gap: 12px; }
  .cart-item .mini-cover { height: 85px; }
  .cart-item-right { grid-column: 2; grid-row: 2; display: flex; justify-content: space-between; align-items: center; width: 100%; }
  .form-panel { padding: 20px; }
  .footer-links { gap: 28px; }
}
