/* finesse · register=product+h5 · A=paper+terracotta · B=editorial-sans/serif · C=shelf-wall+split-detail · D=CSS-state+page-turn · E=paper-and-walnut · SOUL=8 SPECTACLE=4 DENSITY=6 */
:root {
  --bg: #efeee9;
  --bg-raised: #f6f3ed;
  --bg-soft: #e6dfd4;
  --ink: #2d241e;
  --ink-soft: #4c4036;
  --muted: #76695d;
  --faint: #9b8e80;
  --line: rgba(74, 53, 37, .18);
  --line-strong: rgba(74, 53, 37, .32);
  --accent: #b85b36;
  --accent-deep: #874027;
  --accent-soft: #ead4c6;
  --walnut: #5b3b29;
  --walnut-deep: #3e2b21;
  --walnut-soft: #87604a;
  --shadow: rgba(86, 59, 40, .18);
  --shadow-deep: rgba(53, 37, 27, .28);
  --surround: #d9d2c7;
  --reader-bg: #1f1b19;
  --reader-surface: #2b2521;
  --reader-paper: #f0e9dd;
  --reader-ink: #f2ede4;
  --reader-muted: #b8aa9c;
  --reader-line: rgba(242, 237, 228, .18);
  --reader-accent: #d26b43;
  --tone-a: #6b503e;
  --tone-b: #b68f70;
  --tone-c: #8b6c55;
  --tone-d: #d2b99e;
  --tone-e: #4b403a;
  --tone-f: #c6b29a;
  --font-display: "Iowan Old Style", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-page: cubic-bezier(.32, .86, .28, 1);
  --nav-h: 76px;
  --z-grain: 900;
  --z-nav: 300;
  --z-overlay: 600;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

html,
body {
  min-height: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  background: var(--surround);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.filter-open { overflow: clip; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: .026;
  background-image: var(--grain);
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: var(--bg-raised);
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 16px;
  z-index: var(--z-overlay);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg-raised);
  transform: translateY(-180%);
  transition: transform .25s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.site-shell {
  min-height: 100vh;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  min-height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 243, 237, .94);
  background: color-mix(in srgb, var(--bg-raised) 90%, transparent);
  backdrop-filter: blur(16px) saturate(115%);
}

.topbar__inner {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(260px, 1.25fr) minmax(180px, .9fr);
  align-items: center;
  gap: 28px;
  width: min(1440px, calc(100% - 96px));
  min-height: var(--nav-h);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
}

.brand__mark svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.35;
}

.brand__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand__copy strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__copy small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .15em;
  line-height: 1.2;
  white-space: nowrap;
}

.topbar__search,
.mobile-search-form {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 46px;
  padding: 0 12px 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(246, 243, 237, .82);
  background: color-mix(in srgb, var(--bg-raised) 72%, transparent);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.topbar__search:focus-within,
.mobile-search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.topbar__search > svg,
.mobile-search-form > svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.topbar__search input,
.mobile-search-form input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.topbar__search input::placeholder,
.mobile-search-form input::placeholder {
  color: var(--faint);
}

.search-submit,
.icon-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink-soft);
  transition: transform .2s var(--ease), background-color .2s ease, color .2s ease;
}

.search-submit:hover,
.icon-button:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.search-submit:active,
.icon-button:active,
.user-chip:active,
.mobile-tabbar button:active,
.button:active,
.text-button:active,
.filter-chip:active {
  transform: scale(.95);
}

.search-submit svg,
.icon-button svg {
  width: 21px;
  height: 21px;
}

.topbar__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.topbar__search-toggle,
.topbar__menu {
  display: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 8px 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: transform .2s var(--ease), border-color .2s ease, background-color .2s ease;
}

.user-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.user-chip span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--walnut);
  color: var(--bg-raised);
  font-family: var(--font-mono);
  font-size: 13px;
}

.user-chip em {
  font-style: normal;
  white-space: nowrap;
}

.user-chip svg {
  width: 15px;
  height: 15px;
}

.mobile-search-panel {
  display: none;
}

.main {
  width: min(1440px, calc(100% - 96px));
  min-height: calc(100vh - var(--nav-h));
  margin: 0 auto;
}

.view {
  min-width: 0;
  padding: 58px 0 84px;
  animation: view-in .5s var(--ease) both;
}

@keyframes view-in {
  from { opacity: .35; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.view__eyebrow,
.eyebrow {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  line-height: 1.2;
  text-transform: uppercase;
}

.view__title {
  min-width: 0;
  margin-top: 11px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 76px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .94;
  overflow-wrap: anywhere;
}

.view__lead {
  max-width: 560px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.section-head p {
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--accent-deep);
  font-size: 13px;
  white-space: nowrap;
}

.text-button svg {
  width: 17px;
  height: 17px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s ease, border-color .2s ease, color .2s ease;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button--primary {
  background: var(--accent);
  color: var(--bg-raised);
  box-shadow: 0 12px 24px -14px var(--shadow-deep);
}

.button--primary:hover {
  background: var(--accent-deep);
}

.button--ghost {
  border-color: var(--line-strong);
  background: rgba(246, 243, 237, .8);
  background: color-mix(in srgb, var(--bg-raised) 70%, transparent);
  color: var(--ink-soft);
}

.button--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.button--small {
  min-height: 44px;
  padding-inline: 17px;
  font-size: 13px;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
  padding: 11px 14px 11px 16px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 13px;
}

.demo-banner span {
  min-width: 0;
}

.demo-banner strong {
  font-weight: 700;
}

.demo-banner .text-button {
  flex: none;
}

.data-warning {
  margin: 0 0 24px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(184, 91, 54, .08);
  color: var(--accent-deep);
  font-size: 12px;
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: clamp(34px, 7vw, 120px);
  align-items: end;
  min-height: 310px;
  padding-bottom: 58px;
  border-bottom: 1px solid var(--line);
}

.library-hero__copy {
  min-width: 0;
}

.library-hero__title {
  max-width: 630px;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(48px, 7.5vw, 108px);
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: .9;
  overflow-wrap: anywhere;
}

.library-hero__title span {
  color: var(--accent);
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 58px;
  margin-top: 26px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-raised);
}

.hero-search svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.hero-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.hero-search input::placeholder {
  color: var(--faint);
}

.library-hero__note {
  align-self: center;
  justify-self: end;
  max-width: 390px;
  padding: 24px 0 0 30px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
}

.library-hero__note strong {
  display: block;
  margin-bottom: 13px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1;
}

.library-hero__note p {
  font-size: 14px;
}

.library-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 36px 0 22px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
  transition: transform .2s var(--ease), border-color .2s ease, background-color .2s ease, color .2s ease;
}

.filter-chip:hover,
.filter-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-raised);
}

.filter-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: grid;
  align-items: end;
  pointer-events: none;
  opacity: 0;
  transition: opacity .24s ease;
}

.filter-sheet-wrap.on {
  pointer-events: auto;
  opacity: 1;
}

.filter-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(45, 36, 30, .42);
  backdrop-filter: blur(5px);
}

.filter-sheet {
  position: relative;
  width: min(100%, 560px);
  max-height: min(82dvh, 680px);
  margin: 0 auto;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--bg-raised);
  box-shadow: 0 -24px 64px -30px var(--shadow-deep);
  overflow: auto;
  transform: translateY(100%);
  transition: transform .42s var(--ease);
}

.filter-sheet-wrap.on .filter-sheet { transform: translateY(0); }

.filter-sheet__handle {
  display: block;
  width: 44px;
  height: 4px;
  margin: -8px auto 18px;
  border-radius: 999px;
  background: var(--line-strong);
}

.filter-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-sheet__head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}

.filter-sheet__group {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.filter-sheet__group h3 {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 13px;
}

.filter-sheet__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-sheet__submit {
  width: 100%;
  margin-top: 14px;
  border-radius: 14px;
}

.view-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.view-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  min-width: 82px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.view-toggle button[aria-pressed="true"] {
  background: var(--walnut);
  color: var(--bg-raised);
}

.view-toggle svg {
  width: 16px;
  height: 16px;
}

.shelf-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, .7fr);
  gap: 28px;
  align-items: stretch;
  min-height: 320px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-raised);
  box-shadow: 0 26px 48px -35px var(--shadow-deep);
  overflow: hidden;
}

.shelf-feature::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 290px;
  height: 190px;
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: .55;
  transform: rotate(-12deg);
}

.shelf-feature__cover {
  min-width: 0;
  min-height: 264px;
}

.shelf-feature__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 14px 8px 0;
}

.shelf-feature__meta h2 {
  max-width: 530px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .94;
  overflow-wrap: anywhere;
}

.shelf-feature__meta p {
  max-width: 430px;
  margin-top: 14px;
  color: var(--muted);
}

.shelf-feature__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.shelf-feature__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
}

.cover-art {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 15px;
  background: linear-gradient(140deg, var(--tone-a), var(--tone-b));
  color: var(--bg-raised);
  box-shadow: inset 0 0 0 1px rgba(242, 237, 228, .28), 0 24px 40px -28px var(--shadow-deep);
  isolation: isolate;
  overflow: hidden;
}

.cover-art__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.84) contrast(.96) brightness(.8);
}

.cover-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, transparent 30%, rgba(242, 237, 228, .16) 30.3%, transparent 31%),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(242, 237, 228, .09) 24px 25px),
    radial-gradient(circle at 74% 30%, rgba(242, 237, 228, .27), transparent 24%);
  mix-blend-mode: screen;
}

.cover-art::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -28%;
  z-index: -1;
  width: 74%;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 237, 228, .32);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.cover-art[data-tone="1"] { --tone-a: #594536; --tone-b: #b28a6a; }
.cover-art[data-tone="2"] { --tone-a: #403d3a; --tone-b: #998777; }
.cover-art[data-tone="3"] { --tone-a: #7d5744; --tone-b: #c39a79; }
.cover-art[data-tone="4"] { --tone-a: #5c625f; --tone-b: #a6aea6; }
.cover-art[data-tone="5"] { --tone-a: #5e493d; --tone-b: #ad8463; }
.cover-art[data-tone="6"] { --tone-a: #705a4e; --tone-b: #cbb79f; }

.cover-art__top,
.cover-art__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.cover-art__brand {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.cover-art__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
}

.cover-art__title {
  max-width: 85%;
  margin-top: auto;
  padding-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 46px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: .98;
  overflow-wrap: anywhere;
}

.cover-art__subtitle {
  max-width: 85%;
  margin-top: 8px;
  font-size: 12px;
  opacity: .86;
}

.cover-art__bottom {
  align-items: end;
  margin-top: 28px;
  font-size: 11px;
  opacity: .9;
}

.cover-art__seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(242, 237, 228, .44);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 10px;
}

.cover-art--large {
  min-height: 300px;
  padding: 30px;
}

.cover-art--large .cover-art__title {
  max-width: 75%;
  font-size: clamp(32px, 5vw, 70px);
}

.cover-art--portrait {
  aspect-ratio: 3 / 4;
  min-height: 0;
}

.cover-art--portrait .cover-art__title {
  font-size: clamp(20px, 2vw, 32px);
}

.cover-art--reader {
  min-height: 0;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 28px -22px var(--shadow-deep);
}

.library-section {
  margin-top: 66px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.album-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.album-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raised);
  box-shadow: 0 18px 30px -28px var(--shadow-deep);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .25s ease, box-shadow .35s var(--ease);
}

.album-card:hover {
  border-color: var(--accent);
  box-shadow: 0 28px 44px -30px var(--shadow-deep);
  transform: translateY(-4px);
}

.album-card__cover {
  min-width: 0;
  aspect-ratio: 16 / 10;
}

.album-card__cover .cover-art {
  height: 100%;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}

.album-card__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 17px 17px 15px;
}

.album-card__body h3 {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.album-card__body p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.album-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.album-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.album-card__pages {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.open-link svg {
  width: 17px;
  height: 17px;
  transition: transform .25s var(--ease);
}

.open-link:hover svg {
  transform: translateX(4px);
}

.shelf-wood {
  position: relative;
  height: 14px;
  margin-top: -2px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--walnut-soft), var(--walnut-deep));
  box-shadow: 0 12px 18px -13px var(--shadow-deep);
}

.shelf-wood::after {
  content: "";
  position: absolute;
  inset: 3px 10px auto;
  height: 1px;
  background: var(--walnut);
  opacity: .55;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: clamp(48px, 8vw, 108px) 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(246, 243, 237, .72);
  background: color-mix(in srgb, var(--bg-raised) 62%, transparent);
  text-align: center;
}

.empty-state__book {
  position: relative;
  width: 132px;
  height: 102px;
  border: 1px solid var(--line-strong);
  border-radius: 8px 14px 14px 8px;
  background: var(--bg-soft);
  box-shadow: 12px 14px 0 -7px var(--walnut-soft), 20px 22px 30px -20px var(--shadow-deep);
  transform: rotate(-7deg);
}

.empty-state__book::before,
.empty-state__book::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: var(--line);
}

.empty-state__book::before { left: 15px; }
.empty-state__book::after { right: 15px; }

.empty-state__book span {
  position: absolute;
  inset: 32px 28px auto;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 12px 0 var(--line), 0 24px 0 var(--line);
}

.empty-state h2 {
  max-width: 560px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.empty-state p {
  max-width: 520px;
  color: var(--muted);
}

.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 5px;
}

.search-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.search-head__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 58px;
  margin-top: 20px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-raised);
}

.search-head__bar svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.search-head__bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 18px;
}

.search-head__bar input::placeholder { color: var(--faint); }

.search-head__count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.search-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 34px;
  margin-top: 34px;
}

.filter-sidebar {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raised);
}

.filter-sidebar h2 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
}

.filter-group {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.filter-group h3 {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.filter-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.search-results {
  min-width: 0;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.results-toolbar strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.03em;
}

.sort-select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--ink-soft);
}

.mobile-filter-bar {
  display: none;
}

.chip-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip-summary .tag {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 46px;
  margin-top: 42px;
}

.shelf-nav {
  align-self: start;
  padding: 20px 0;
  border-right: 1px solid var(--line);
}

.shelf-nav h2 {
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}

.shelf-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: calc(100% - 18px);
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  text-align: left;
  transition: background-color .2s ease, color .2s ease, transform .2s var(--ease);
}

.shelf-nav button:hover,
.shelf-nav button[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-nav button:active { transform: scale(.98); }

.shelf-nav svg {
  width: 19px;
  height: 19px;
}

.shelf-main {
  min-width: 0;
}

.continue-card {
  display: grid;
  grid-template-columns: minmax(170px, .36fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-raised);
  box-shadow: 0 24px 42px -34px var(--shadow-deep);
}

.continue-card__cover {
  min-width: 0;
  aspect-ratio: 4 / 5;
}

.continue-card__cover .cover-art {
  height: 100%;
  min-height: 0;
}

.continue-card__copy h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .96;
  overflow-wrap: anywhere;
}

.continue-card__copy p {
  margin-top: 10px;
  color: var(--muted);
}

.progress-line {
  position: relative;
  height: 7px;
  margin-top: 19px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.progress-line span {
  display: block;
  width: 33%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.continue-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.continue-card__action { margin-top: 19px; }

.shelf-block {
  margin-top: 50px;
}

.shelf-block .section-head { margin-bottom: 16px; }

.shelf-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.recent-list {
  border-top: 1px solid var(--line);
}

.recent-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.recent-row__cover {
  min-width: 0;
  aspect-ratio: 1.35;
}

.recent-row__cover .cover-art {
  height: 100%;
  min-height: 0;
  padding: 10px;
  border-radius: 8px;
  box-shadow: none;
}

.recent-row__cover .cover-art__title { font-size: 13px; }
.recent-row__cover .cover-art__brand,
.recent-row__cover .cover-art__index,
.recent-row__cover .cover-art__subtitle,
.recent-row__cover .cover-art__bottom { display: none; }

.recent-row__copy { min-width: 0; }

.recent-row__copy strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-row__copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.recent-row__page {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.detail-page {
  padding-top: 44px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb span:last-child { color: var(--ink-soft); }

.detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
  gap: clamp(44px, 9vw, 136px);
  align-items: center;
  margin-top: 30px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-raised);
  box-shadow: 0 28px 58px -40px var(--shadow-deep);
}

.detail-cover {
  width: min(100%, 430px);
  min-width: 0;
  aspect-ratio: 3 / 4;
  justify-self: center;
}

.detail-cover .cover-art {
  height: 100%;
  min-height: 0;
}

.detail-copy {
  min-width: 0;
}

.detail-copy h1 {
  min-width: 0;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 78px);
  font-weight: 600;
  letter-spacing: -.06em;
  line-height: .91;
  overflow-wrap: anywhere;
}

.detail-copy h2 {
  margin-top: 15px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
}

.detail-copy__summary {
  max-width: 520px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
}

.detail-copy__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.detail-copy__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 21px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.detail-copy__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.preview-section {
  margin-top: 54px;
}

.preview-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.preview-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .2s ease;
}

.preview-card:hover,
.preview-card[aria-current="page"] {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.preview-card__page {
  min-width: 0;
  aspect-ratio: 3 / 4;
}

.preview-card__page .cover-art {
  height: 100%;
  min-height: 0;
  padding: 12px;
  border-radius: 0;
  box-shadow: none;
}

.preview-card__page .cover-art__title { font-size: 14px; }
.preview-card__page .cover-art__brand,
.preview-card__page .cover-art__subtitle,
.preview-card__page .cover-art__bottom { display: none; }

.preview-card__label {
  display: block;
  padding: 8px 10px 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}

.share-panel {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: clamp(38px, 8vw, 110px);
  align-items: center;
  margin-top: 34px;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-raised);
}

.share-copy h1 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .93;
  overflow-wrap: anywhere;
}

.share-copy p {
  max-width: 470px;
  margin-top: 16px;
  color: var(--muted);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.share-qr {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 290px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
}

.qr-art {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  width: min(190px, 65%);
  aspect-ratio: 1;
  padding: 12px;
  gap: 3px;
  border: 8px solid var(--ink);
  background: var(--bg-raised);
}

.qr-art i {
  display: block;
  min-width: 0;
  min-height: 0;
  background: var(--ink);
}

.qr-art i:nth-child(3n + 1),
.qr-art i:nth-child(5n + 2) { opacity: .14; }

.share-qr p {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.reader-view {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  width: 100vw;
  margin-inline: calc((100% - 100vw) / 2);
  padding: 0;
  background: var(--reader-bg);
  color: var(--reader-ink);
  animation: none;
}

.reader-view[data-reader-surface],
.reader-view [data-reader-surface] {
  touch-action: pan-y;
}

/* The reader is a full-bleed surface: the library chrome must not steal
   vertical space or create a second scroll context while a page is open. */
.is-reader .topbar,
.is-reader .site-footer { display: none; }

.is-reader .main {
  width: 100%;
  max-width: none;
  min-height: 100vh;
}

.is-reader .view { padding: 0; }
.is-reader .reader-view,
.is-reader .reader-shell { min-height: 100vh; }

.reader-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: calc(100vh - var(--nav-h));
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 0 34px;
  border-bottom: 1px solid var(--reader-line);
}

.reader-topbar__title,
.reader-topbar__page {
  min-width: 0;
  color: var(--reader-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reader-topbar__title strong {
  color: var(--reader-ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.reader-topbar__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.reader-topbar .icon-button {
  color: var(--reader-ink);
}

.reader-topbar .icon-button:hover { background: var(--reader-surface); color: var(--reader-accent); }

.reader-topbar .icon-button.is-active {
  color: var(--reader-accent);
  background: rgba(210, 107, 67, .14);
}

.reader-topbar .icon-button.is-active svg {
  fill: currentColor;
}

.reader-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 30%);
  gap: 28px;
  align-items: center;
  width: min(1180px, calc(100% - 68px));
  margin: 0 auto;
  padding: 38px 0 28px;
}

.reader-book {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  aspect-ratio: 1.43;
  border-radius: 4px;
  background: var(--reader-paper);
  box-shadow: 0 30px 70px -34px var(--shadow-deep), 0 0 0 1px var(--reader-line);
  perspective: 1500px;
  overflow: hidden;
}

.reader-book::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 5;
  width: 1px;
  background: var(--line-strong);
  box-shadow: 0 0 24px 8px rgba(45, 36, 30, .14);
}

.reader-page {
  position: relative;
  min-width: 0;
  padding: 20px;
  color: var(--ink);
  overflow: hidden;
}

.reader-page .cover-art {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 2px;
  box-shadow: none;
}

.reader-page .cover-art__title { font-size: clamp(20px, 3.3vw, 46px); }

.reader-page--right {
  transform-origin: left center;
  transform-style: preserve-3d;
}

.reader-page--right.turning {
  animation: page-turn .76s var(--ease-page) both;
}

@keyframes page-turn {
  0% { transform: rotateY(0); }
  48% { transform: rotateY(-78deg); opacity: .75; }
  100% { transform: rotateY(0); opacity: 1; }
}

@keyframes page-swipe-next {
  0% { transform: translateX(0) rotateY(0); opacity: 1; }
  48% { transform: translateX(-3%) rotateY(-7deg); opacity: .72; }
  100% { transform: translateX(0) rotateY(0); opacity: 1; }
}

@keyframes page-swipe-prev {
  0% { transform: translateX(0) rotateY(0); opacity: 1; }
  48% { transform: translateX(3%) rotateY(7deg); opacity: .72; }
  100% { transform: translateX(0) rotateY(0); opacity: 1; }
}

.reader-stage__rail {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--reader-line);
  border-radius: 16px;
  background: rgba(43, 37, 33, .9);
  background: color-mix(in srgb, var(--reader-surface) 82%, transparent);
}

.reader-stage__rail h2 {
  margin-bottom: 14px;
  color: var(--reader-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.reader-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.reader-thumb {
  min-width: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .2s ease, transform .25s var(--ease);
}

.reader-thumb:hover,
.reader-thumb[aria-current="page"] {
  border-color: var(--reader-accent);
  transform: translateY(-2px);
}

.reader-thumb .cover-art {
  min-height: 74px;
  padding: 8px;
  border-radius: 0;
  box-shadow: none;
}

.reader-thumb .cover-art__title { font-size: 10px; }
.reader-thumb .cover-art__brand,
.reader-thumb .cover-art__subtitle,
.reader-thumb .cover-art__bottom { display: none; }

.reader-toc {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--reader-line);
}

.reader-toc li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  color: var(--reader-muted);
  font-size: 12px;
}

.reader-toc li[aria-current="page"] { color: var(--reader-ink); }

.reader-controls {
  display: grid;
  grid-template-columns: auto minmax(200px, 460px) auto;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 88px;
  padding: 12px 26px;
  border-top: 1px solid var(--reader-line);
  background: var(--reader-surface);
}

.reader-controls .icon-button {
  color: var(--reader-ink);
}

.reader-controls__center {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.reader-controls__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--reader-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.reader-controls__meta strong {
  color: var(--reader-ink);
  font-size: 17px;
  font-weight: 500;
}

.reader-slider {
  width: 100%;
  accent-color: var(--reader-accent);
}

.reader-hint {
  grid-column: 1 / -1;
  color: var(--reader-muted);
  font-size: 11px;
  text-align: center;
}

.mobile-tabbar {
  display: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: var(--z-overlay);
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg-raised);
  box-shadow: 0 18px 32px -22px var(--shadow-deep);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s var(--ease);
}

.toast.on {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .topbar__inner,
  .main { width: min(100% - 54px, 980px); }
  .topbar__inner { grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr) auto; gap: 18px; }
  .library-hero { gap: 44px; }
  .album-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-stage { grid-template-columns: minmax(0, 1fr) 230px; }
}

@media (max-width: 767px) {
  :root {
    --nav-h: 60px;
  }

  body {
    background: var(--bg);
    font-size: 14px;
  }

  body::before { opacity: .02; }

  .site-shell {
    min-height: 100dvh;
    padding-bottom: calc(env(safe-area-inset-bottom) + 78px);
  }

  .is-reader .site-shell { padding-bottom: 0; }

  .topbar {
    min-height: var(--nav-h);
  }

  .topbar__inner {
    display: flex;
    width: 100%;
    min-height: var(--nav-h);
    padding: 0 14px;
    gap: 8px;
  }

  .topbar__menu,
  .topbar__search-toggle {
    display: inline-grid;
  }

  .topbar__menu { order: -1; }

  .topbar__menu svg { width: 22px; height: 22px; }

  .brand {
    flex: 1;
    justify-content: center;
    gap: 8px;
  }

  .brand__mark {
    width: 31px;
    height: 31px;
  }

  .brand__mark svg { width: 19px; height: 19px; }

  .brand__copy strong { font-size: 18px; }
  .brand__copy small { display: none; }

  .topbar__search,
  .user-chip { display: none; }

  .topbar__actions { gap: 0; }

  .mobile-search-panel {
    display: block;
    padding: 0 14px 12px;
    border-top: 1px solid var(--line);
    background: var(--bg-raised);
  }

  .mobile-search-form { height: 46px; }

  .main {
    width: 100%;
    min-height: calc(100dvh - var(--nav-h));
    padding: 0 16px;
  }

  .view {
    padding: 28px 0 36px;
  }

  .view__eyebrow,
  .eyebrow { font-size: 9px; }

  .view__title {
    margin-top: 8px;
    font-size: clamp(36px, 12vw, 54px);
    line-height: .95;
  }

  .view__lead { margin-top: 12px; font-size: 14px; }

  .section-head {
    align-items: center;
    margin-bottom: 14px;
  }

  .section-head h2 { font-size: 28px; }
  .section-head p { display: none; }

  .demo-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
    padding: 12px;
  }

  .demo-banner .text-button { min-height: 36px; }

  .library-hero {
    display: block;
    min-height: 0;
    padding-bottom: 26px;
  }

  .library-hero__title {
    margin-top: 11px;
    font-size: clamp(50px, 17vw, 78px);
    line-height: .88;
  }

  .hero-search {
    min-height: 52px;
    margin-top: 19px;
    border-radius: 14px;
  }

  .hero-search input { font-size: 15px; }

  .library-hero__note {
    margin-top: 22px;
    padding: 15px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .library-hero__note strong { font-size: 24px; }
  .library-hero__note p { font-size: 13px; }

  .library-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 14px;
  }

  .filter-row {
    width: calc(100% + 16px);
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar { display: none; }
  .filter-chip { flex: none; min-height: 38px; padding-inline: 14px; }
  .view-toggle { align-self: flex-end; }

  .shelf-feature {
    display: block;
    min-height: 0;
    padding: 14px;
    border-radius: 17px;
  }

  .shelf-feature__cover { min-height: 220px; }
  .cover-art--large { min-height: 220px; padding: 20px; }
  .cover-art--large .cover-art__title { font-size: 38px; }
  .shelf-feature__meta { padding: 18px 4px 8px; }
  .shelf-feature__meta h2 { font-size: 34px; }
  .shelf-feature__meta p { font-size: 13px; }
  .shelf-feature__actions { margin-top: 17px; }
  .shelf-feature__stats { margin-top: 14px; }

  .library-section { margin-top: 38px; }

  .album-grid,
  .album-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .album-card { border-radius: 13px; }
  .album-card__cover { aspect-ratio: 1 / 1.12; }
  .album-card__body { padding: 12px 11px 11px; }
  .album-card__body h3 { font-size: 19px; }
  .album-card__body p { margin-top: 4px; font-size: 11px; }
  .album-card__tags { gap: 4px; margin-top: 9px; }
  .tag { min-height: 24px; padding-inline: 7px; font-size: 10px; }
  .album-card__footer { align-items: flex-start; flex-direction: column; gap: 2px; padding-top: 10px; }
  .open-link { min-height: 38px; font-size: 12px; }
  .album-card__pages { font-size: 10px; }
  .shelf-wood { height: 9px; }

  .empty-state {
    gap: 12px;
    padding: 48px 16px;
    border-radius: 18px;
  }

  .empty-state__book { width: 112px; height: 86px; }
  .empty-state h2 { font-size: 32px; }
  .empty-state p { font-size: 13px; }
  .empty-state__actions { width: 100%; }
  .empty-state__actions .button { flex: 1; min-width: 0; padding-inline: 13px; }

  .search-head {
    display: block;
    padding-bottom: 20px;
  }

  .search-head__bar {
    height: 52px;
    margin-top: 14px;
    border-radius: 14px;
  }

  .search-head__bar input { font-size: 15px; }
  .search-head__count { display: block; margin-top: 13px; }

  .search-layout {
    display: block;
    margin-top: 18px;
  }

  .filter-sidebar { display: none; }

  .mobile-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
  }

  .mobile-filter-bar .button { min-height: 40px; padding-inline: 14px; }

  .results-toolbar { margin-bottom: 12px; }
  .results-toolbar strong { font-size: 24px; }
  .sort-select { min-height: 40px; max-width: 150px; font-size: 12px; }

  .shelf-layout {
    display: block;
    margin-top: 18px;
  }

  .shelf-nav {
    display: flex;
    gap: 6px;
    width: calc(100% + 16px);
    margin-bottom: 18px;
    padding: 0 0 4px;
    border-right: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .shelf-nav::-webkit-scrollbar { display: none; }
  .shelf-nav h2 { display: none; }
  .shelf-nav button { flex: none; width: auto; min-height: 40px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
  .shelf-nav button svg { width: 16px; height: 16px; }

  .continue-card {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    padding: 13px;
    border-radius: 15px;
  }

  .continue-card__cover { width: 108px; }
  .continue-card__copy h2 { font-size: 26px; }
  .continue-card__copy p { margin-top: 6px; font-size: 12px; }
  .progress-line { height: 6px; margin-top: 13px; }
  .continue-card__meta { margin-top: 6px; font-size: 10px; }
  .continue-card__action { margin-top: 10px; }
  .continue-card__action .button { min-height: 40px; padding-inline: 13px; font-size: 12px; }

  .shelf-block { margin-top: 34px; }
  .shelf-rail { display: flex; gap: 10px; margin-inline: -16px; padding: 0 16px 5px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .shelf-rail::-webkit-scrollbar { display: none; }
  .shelf-rail .album-card { flex: 0 0 152px; scroll-snap-align: start; }
  .shelf-rail .album-card__cover { aspect-ratio: 1 / 1.18; }
  .shelf-rail .album-card__body h3 { font-size: 17px; }

  .recent-row { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 11px 0; }
  .recent-row__copy strong { font-size: 17px; }
  .recent-row__copy span { font-size: 11px; }
  .recent-row__page { font-size: 10px; }

  .detail-page { padding-top: 24px; }
  .breadcrumb { font-size: 11px; }

  .detail-hero {
    display: block;
    margin-top: 19px;
    padding: 14px;
    border-radius: 17px;
  }

  .detail-cover { width: min(78vw, 310px); margin: 0 auto; }
  .detail-copy { padding: 22px 3px 8px; }
  .detail-copy h1 { margin-top: 8px; font-size: 42px; }
  .detail-copy h2 { margin-top: 10px; font-size: 20px; }
  .detail-copy__summary { margin-top: 12px; font-size: 13px; }
  .detail-copy__tags { margin-top: 13px; }
  .detail-copy__stats { gap: 11px; margin-top: 13px; font-size: 10px; }
  .detail-copy__actions { margin-top: 18px; }
  .detail-copy__actions .button:first-child { width: 100%; }

  .preview-section { margin-top: 34px; }
  .preview-rail { display: flex; gap: 9px; margin-inline: -16px; padding: 0 16px 5px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .preview-rail::-webkit-scrollbar { display: none; }
  .preview-card { flex: 0 0 92px; scroll-snap-align: start; border-radius: 10px; }
  .preview-card__label { padding: 6px 5px 8px; font-size: 9px; }

  .share-panel { display: block; margin-top: 22px; padding: 20px 16px; border-radius: 17px; }
  .share-copy h1 { font-size: 42px; }
  .share-copy p { font-size: 13px; }
  .share-qr { min-height: 230px; margin-top: 22px; padding: 20px; }

  .reader-view {
    min-height: calc(100dvh - var(--nav-h));
    width: calc(100% + 32px);
    margin-inline: -16px;
  }

  .is-reader .reader-view,
  .is-reader .reader-shell { min-height: 100dvh; }

  .is-reader .reader-shell {
    padding-bottom: 122px;
  }

  .reader-topbar {
    min-height: 58px;
    padding: 0 10px;
    gap: 4px;
  }

  .reader-topbar__title { display: flex; align-items: center; flex: 1 1 auto; gap: 4px; }
  .reader-topbar__title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .reader-topbar__title strong { font-size: 15px; }
  .reader-topbar__page { flex: none; font-size: 10px; white-space: nowrap; }
  .reader-topbar__actions { flex: none; }
  .reader-topbar__actions .icon-button { width: 42px; height: 42px; }

  .reader-stage {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 20px 12px 14px;
  }

  .reader-shell,
  .reader-controls { width: 100%; min-width: 0; }

  .reader-book {
    grid-template-columns: minmax(0, 1fr);
    aspect-ratio: 3 / 4.2;
    width: min(100%, 390px);
    margin: 0 auto;
  }

  .reader-book::before { display: none; }
  .reader-page { display: none; padding: 12px; }
  .reader-page:first-child { display: block; }
  .reader-page .cover-art__title { font-size: 36px; }
  .reader-book.turn-next .reader-page--left { animation: page-swipe-next .66s var(--ease-page) both; }
  .reader-book.turn-prev .reader-page--left { animation: page-swipe-prev .66s var(--ease-page) both; }

  .reader-stage__rail {
    margin-top: 14px;
    padding: 11px;
    border-radius: 12px;
  }

  .reader-stage__rail h2 { display: none; }
  .reader-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .reader-thumbs::-webkit-scrollbar { display: none; }
  .reader-thumb { flex: 0 0 58px; }
  .reader-thumb .cover-art { min-height: 74px; }
  .reader-toc { display: none; }

  .reader-controls {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-nav);
    width: 100vw;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
    min-height: 108px;
    padding: 10px 14px calc(env(safe-area-inset-bottom) + 12px);
  }

  .reader-controls__meta strong { font-size: 16px; }
  .reader-hint { font-size: 10px; }

  .mobile-tabbar {
    position: fixed;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
    left: 12px;
    z-index: var(--z-nav);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 62px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(246, 243, 237, .96);
    background: color-mix(in srgb, var(--bg-raised) 92%, transparent);
    box-shadow: 0 18px 34px -24px var(--shadow-deep);
    backdrop-filter: blur(18px) saturate(120%);
  }

  .mobile-tabbar button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-width: 44px;
    min-height: 48px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
    transition: transform .2s var(--ease), background-color .2s ease, color .2s ease;
  }

  .mobile-tabbar button[aria-current="page"] {
    background: var(--walnut);
    color: var(--bg-raised);
  }

  .mobile-tabbar svg { width: 19px; height: 19px; }
  .mobile-tabbar button[data-action="favorites"] { display: grid; }

  .toast { right: 14px; bottom: calc(env(safe-area-inset-bottom) + 88px); left: 14px; max-width: none; text-align: center; }
}

@media (min-width: 768px) {
  .site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: min(1440px, calc(100% - 96px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .04em;
  }
}

@media (max-width: 340px) {
  .reader-topbar {
    padding-inline: 6px;
    gap: 2px;
  }

  .reader-topbar__title .icon-button,
  .reader-topbar__actions .icon-button {
    width: 34px;
    height: 34px;
    flex: none;
  }

  .reader-topbar__title strong { font-size: 13px; }
  .reader-topbar__page { font-size: 9px; }
}

@media (max-width: 767px) {
  .site-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .view { animation: none; }
  .reader-page--right.turning { animation: none; }
}
