/* ChapterHop — warm paper, pencilled edges and room for a good story. */
:root {
  --paper: #fbf6eb;
  --paper-light: #fffcf5;
  --ink: #354c40;
  --ink-deep: #293e33;
  --muted: #62685b;
  --sage: #d7e1cb;
  --sage-deep: #43634c;
  --butter: #efd58a;
  --coral: #cf785d;
  --lavender: #d8cce5;
  --line: #d9d5c5;
  --line-dark: #a9b09a;
  --font-body: "Trebuchet MS", "Segoe UI", sans-serif;
  --font-story: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --shadow: 0 5px 0 rgba(53, 76, 64, .045), 0 14px 32px rgba(76, 66, 44, .035);
  --radius: 17px 21px 18px 14px / 17px 16px 22px 19px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 25px; }
body {
  margin: 0;
  min-width: 320px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(111, 94, 66, .045) .65px, transparent .65px);
  background-size: 5px 5px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--butter); color: var(--ink-deep); }
a { color: inherit; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
img { max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
button svg, .button svg, .chip svg, .community-chip svg, .delivery-label svg { width: 18px; height: 18px; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .58; }
:focus-visible { outline: 3px solid #9c5b35; outline-offset: 5px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: -70px; left: 20px; padding: 10px 20px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
main { min-height: 65vh; }
h1, h2, h3, h4 { margin-top: 0; color: var(--ink); }
h1, h2, h3 { font-family: var(--font-story); font-weight: 600; }
h1 { font-size: clamp(2.3rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 2.8vw, 2.35rem); line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
small, .text-small { font-size: .8rem; }
.text-muted { color: var(--muted); }
.text-hand { font-family: var(--font-hand); }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.stack > :last-child { margin-bottom: 0; }
.inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline form { margin: 0; }
.grow { flex: 1; }
.spacer { margin-top: 30px; }

.site-header { border-bottom: 1px solid rgba(166, 169, 143, .4); background: rgba(251, 246, 235, .88); }
.header-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand-mark { display: block; width: 51px; height: 51px; object-fit: contain; }
.brand-name { font-family: var(--font-story); font-size: 27px; line-height: 1.08; font-weight: 700; letter-spacing: -.9px; display: block; }
.brand-dot { color: #b87652; }
.brand-tagline { display: block; font-family: var(--font-hand); font-size: 10px; color: var(--muted); line-height: 1.6; letter-spacing: .05em; }
.main-nav { display: flex; align-items: center; gap: 29px; }
.nav-link { position: relative; padding: 10px 0; color: #586151; font-size: 13px; text-decoration: none; white-space: nowrap; }
.nav-link:hover, .nav-link.active, .nav-link[aria-current="page"] { color: var(--ink-deep); }
.nav-link.active::after, .nav-link[aria-current="page"]::after { content: ""; position: absolute; bottom: 2px; left: -3px; right: -3px; height: 3px; background: var(--coral); border-radius: 70% 20% 50% 35%; transform: rotate(-1.8deg); }
.header-actions { display: flex; align-items: center; gap: 15px; }
.avatar, .owner-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--sage); color: var(--ink); font-family: var(--font-story); text-decoration: none; font-size: 16px; font-weight: 700; width: 38px; height: 38px; border-radius: 49% 53% 46% 55%; border: 1px solid rgba(53, 76, 64, .15); }
.avatar:hover { background: #c9d7b9; }
.owner-avatar { width: 25px; height: 25px; font-size: 12px; border: none; }
.button, button[type="submit"] { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; padding: 11px 22px; border: 1px solid var(--ink); border-radius: 8px 10px 7px 9px / 10px 7px 9px 8px; font-family: var(--font-body); font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:hover, button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 1px 3px 0 rgba(53, 76, 64, .12); }
.button-primary, button[type="submit"] { color: var(--paper-light); background: var(--ink); }
.button-primary:hover, button[type="submit"]:hover { background: var(--ink-deep); }
.button-secondary { background: transparent; color: var(--ink); border-color: #87977b; }
.button-secondary:hover { background: #f0efdd; }
.button-small { min-height: 38px; padding: 8px 16px; font-size: 12px; }
.button-ghost { background: transparent; color: var(--ink); border-color: transparent; padding-inline: 8px; }
.button-ghost:hover { background: #eeeede; box-shadow: none; }
.button-danger { background: #fff5ef; color: #87422e; border-color: #b87259; }
.button-danger:hover { background: #f6e5db; }
.button.button-secondary { background: transparent; color: var(--ink); border-color: #87977b; }
.button.button-secondary:hover { background: #f0efdd; }
.button.button-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.button.button-ghost:hover { background: #eeeede; box-shadow: none; }
.button.button-danger { background: #fff5ef; color: #87422e; border-color: #b87259; }
.button.button-danger:hover { background: #f6e5db; }
.button-wide { width: 100%; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 42px; height: 42px; padding: 9px; border-radius: 50%; background: transparent; border: 1px solid var(--line); }
.icon-button:hover { background: var(--sage); }
.text-button { background: none; border: 0; padding: 8px 0; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 26px; padding-top: 54px; padding-bottom: 45px; position: relative; }
.hero-copy { padding-bottom: 12px; position: relative; z-index: 1; }
.eyebrow, .section-kicker { font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: #6e755c; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.eyebrow::before { content: "✦"; font-size: 16px; color: #a87538; line-height: 1; }
.eyebrow:has(svg)::before { display: none; }
.eyebrow .icon { width: 15px; height: 15px; color: #a87538; transform: rotate(-10deg); }
.hero-title { font-size: clamp(2.8rem, 4.6vw, 4.45rem); font-weight: 500; line-height: 1.06; letter-spacing: -.045em; max-width: 570px; margin-bottom: 23px; }
.hero-title em { color: #718259; font-weight: 500; }
.hero-description { color: #606655; max-width: 420px; line-height: 1.85; font-size: 14px; margin-bottom: 27px; }
.hero-actions { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; }
.hero-art img { width: 100%; max-height: 385px; object-fit: contain; mix-blend-mode: multiply; }
.hero-note { color: #65704e; font-size: 13px; font-family: var(--font-hand); transform: rotate(-5deg); text-align: center; position: absolute; bottom: 0; right: 20px; }
.hero-note::before { content: "↶"; display: block; font-family: var(--font-story); font-size: 32px; line-height: .8; }
.hero-copy .hero-note { display: flex; gap: 7px; align-items: center; text-align: left; position: static; transform: rotate(-1deg); margin-top: 19px; font-size: 10px; }
.hero-copy .hero-note::before { display: none; }
.hero-copy .hero-note .icon { width: 15px; height: 15px; color: #b17358; }
.illustration-note { position: absolute; right: 1px; bottom: -5px; color: #6d7e52; font-family: var(--font-hand); font-size: 12px; line-height: 1.5; text-align: center; transform: rotate(-7deg); }
.illustration-note::before { content: "↶"; display: block; font-family: var(--font-story); font-size: 29px; line-height: .6; margin-bottom: 8px; transform: rotate(15deg); }
.community-chip { margin-top: 26px; display: inline-flex; align-items: center; gap: 7px; color: #5d6656; font-size: 11px; }
.community-chip svg { width: 14px; height: 14px; color: #708467; }
.community-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px dashed #c5c8b3; border-bottom: 1px dashed #c5c8b3; padding: 17px 3px; margin-bottom: 44px; }
.community-strip .community-chip { margin: 0; font-size: 11px; }
.community-strip-details { display: flex; align-items: center; gap: 24px; color: #657058; font-size: 10px; }
.community-strip-details > span { display: inline-flex; align-items: center; gap: 7px; }
.community-strip-details .icon { width: 17px; height: 17px; color: #7c8d66; }
.intro-strip { display: flex; gap: 38px; justify-content: center; align-items: center; border-block: 1px dashed #c5c8b3; padding: 18px 15px; margin-bottom: 42px; font-size: 11px; color: #657058; }
.intro-strip span { display: flex; align-items: center; gap: 9px; }
.intro-strip svg { width: 20px; height: 20px; color: #819565; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.section-title { margin: 0; }
.heading-star { display: inline-block; vertical-align: top; margin: -9px 0 0 10px; font-size: 30px; color: #ae8b4f; font-weight: 400; transform: rotate(13deg); }
.handwritten { font-family: var(--font-hand); color: #71825b; font-size: 12px; transform: rotate(-3deg); }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.section-kicker { display: block; margin-bottom: 8px; }
.age-tabs { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 25px 0 18px; }
.chip { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 35px; padding: 8px 17px; border: 1px solid #d6d7c7; border-radius: 20px 24px 18px 22px / 18px 20px 24px 18px; background: transparent; text-decoration: none; font-size: 11px; line-height: 1.4; color: #58644f; transition: background .16s, transform .16s; }
.chip:hover { background: #e9eddf; transform: rotate(-1deg); }
.chip.active, .chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--sage); border-color: #98a88d; color: #344b35; }
.filter-bar { padding: 13px 0 20px; display: flex; align-items: center; gap: 12px; }
.search-field { position: relative; flex: 1; display: flex; align-items: center; min-width: 160px; }
.search-field svg { width: 17px; height: 17px; position: absolute; left: 15px; color: #7b836e; pointer-events: none; }
.search-field input { padding-left: 42px !important; }
.filter-bar input, .filter-bar select { min-height: 44px; font-size: 12px; background-color: #fffdf7; }
.filter-bar select { width: auto; max-width: 190px; }
.filters { display: flex; gap: 10px; align-items: center; }
.results-caption { margin: 0 0 18px; display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); }
.results-summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: #5f6c52; font-size: 10px; margin: 0 0 21px; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 25px; row-gap: 31px; }
.book-card { min-width: 0; position: relative; animation: settle-in .35s ease both; }
.book-card:nth-child(2n) { animation-delay: 35ms; }
.book-card:nth-child(3n) { animation-delay: 70ms; }
.book-image-link { display: block; text-decoration: none; }
.cover-stage { position: relative; min-height: 250px; height: 270px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px 18px 13px 17px / 18px 13px 18px 12px; background: #ececda; padding: 24px 24px 22px; transition: background .2s; }
.book-card:nth-child(4n + 2) .cover-stage { background: #f0e6d4; }
.book-card:nth-child(4n + 3) .cover-stage { background: #e5e5e6; }
.book-card:nth-child(4n + 4) .cover-stage { background: #eee4d7; }
.book-card .cover-stage-sage { background: #e8ecdc; }
.book-card .cover-stage-butter { background: #f1e9d2; }
.book-card .cover-stage-coral { background: #f0e3dc; }
.book-card .cover-stage-lavender { background: #e9e5ed; }
.book-card .cover-stage-blue { background: #e0eaeb; }
.book-cover { display: block; height: 214px; max-width: 100%; width: 150px; object-fit: cover; border-radius: 2px 6px 6px 2px; box-shadow: -3px 1px 0 rgba(255, 255, 255, .45) inset, 4px 8px 10px rgba(57, 52, 37, .13), 1px 1px 2px rgba(57, 52, 37, .15); transform: rotate(-3deg); transition: transform .25s; position: relative; }
.book-card:nth-child(2n) .book-cover { transform: rotate(3deg); }
.book-card:nth-child(3n) .book-cover { transform: rotate(-1deg); }
.book-image-link:hover .book-cover { transform: translateY(-4px) rotate(0); }
.cover-placeholder { background: #bfcfa3; color: #354c40; padding: 22px 13px 15px; display: flex; align-items: center; justify-content: space-between; flex-direction: column; text-align: center; border-left: 5px solid rgba(29, 47, 32, .15); overflow: hidden; }
.cover-placeholder::before { content: "✧"; display: block; font-size: 42px; line-height: 1; font-family: var(--font-story); opacity: .7; transform: rotate(12deg); }
.cover-placeholder::after { content: "❧"; position: absolute; left: 22%; bottom: 42px; font-family: var(--font-story); font-size: 65px; line-height: 1; transform: rotate(-18deg); opacity: .2; pointer-events: none; }
.cover-placeholder:has(.cover-star)::before { display: none; }
.cover-placeholder .cover-star { width: 21px; height: 21px; opacity: .7; transform: rotate(12deg); }
.cover-placeholder .cover-book-icon { width: 47px; height: 43px; opacity: .5; stroke-width: 1; }
.cover-title { font-family: var(--font-story); font-size: 21px; font-weight: 700; line-height: 1.12; position: relative; z-index: 1; }
.cover-author { font-size: 8px; letter-spacing: .08em; text-transform: uppercase; position: relative; z-index: 1; }
.cover-sage { background-color: #c5d4b6; color: #355036; }
.cover-coral { background-color: #ce8169; color: #fff8e8; }
.cover-butter { background-color: #edcd77; color: #4c5734; }
.cover-lavender { background-color: #cec0d9; color: #51435c; }
.cover-blue { background-color: #abc7cf; color: #344c59; }
.condition-badge { position: absolute; top: 11px; left: 11px; z-index: 2; padding: 4px 9px; border-radius: 12px 10px 13px 9px; background: rgba(255, 252, 242, .95); color: #505c45; font-size: 9px; font-weight: 600; }
.saved-button { position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; background: rgba(255, 252, 242, .9); border: none; border-radius: 50%; display: grid; place-items: center; }
.saved-button svg { width: 15px; height: 15px; }
.book-info { padding: 15px 2px 0; }
.book-age { display: block; margin-bottom: 5px; font-size: 8px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #767b63; }
.book-title { font-family: var(--font-story); font-size: 17px; font-weight: 700; line-height: 1.25; margin: 0 0 3px; letter-spacing: -.3px; }
.book-title a { text-decoration: none; }
.book-title a:hover { text-decoration: underline; }
.book-author { font-size: 11px; color: #727361; margin-bottom: 11px; }
.owner-row { display: flex; align-items: center; gap: 7px; color: #606a56; font-size: 10px; }
.owner-row .owner-avatar { width: 22px; height: 22px; font-size: 10px; }
.card-footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; padding-top: 10px; border-top: 1px solid #e2dfd0; font-size: 9px; color: #65725a; }
.book-card .card-footer { justify-content: space-between; align-items: center; }
.delivery-label { display: inline-flex; align-items: center; gap: 5px; }
.delivery-label svg { width: 12px; height: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; margin: 36px 0 12px; font-size: 12px; }
.empty-state { padding: 60px 24px; background: rgba(255, 253, 247, .5); border: 1px dashed #adb79c; border-radius: var(--radius); text-align: center; margin: 25px 0; }
.book-grid > .empty-state { grid-column: 1 / -1; }
.empty-state h2, .empty-state h3 { margin-bottom: 10px; }
.empty-state p { color: var(--muted); max-width: 440px; margin: 0 auto 22px; font-size: 13px; }
.empty-state svg { width: 43px; height: 43px; color: #7c926b; margin-bottom: 12px; }
.sharing-banner { position: relative; display: flex; align-items: center; gap: 22px; background: #edf0df; border: 1px solid #cbd4ba; border-radius: 21px 27px 18px 24px / 18px 21px 27px 20px; padding: 27px 31px; margin-top: 48px; box-shadow: 0 3px 0 rgba(67, 81, 47, .035); }
.sharing-banner > .icon { width: 40px; height: 42px; color: #b4795d; transform: rotate(-9deg); stroke-width: 1.2; }
.sharing-banner h2 { font-size: 24px; margin-bottom: 5px; }
.sharing-banner p { font-size: 11px; color: #6a7358; margin: 0; }
.sharing-banner .button { margin-left: auto; flex-shrink: 0; font-size: 11px; }
.sharing-banner::before { content: ""; position: absolute; inset: 4px 5px 5px 4px; border: 1px dashed rgba(133, 149, 105, .25); border-radius: inherit; pointer-events: none; }

.page-heading { padding-top: 48px; margin-bottom: 28px; display: flex; gap: 24px; justify-content: space-between; align-items: center; }
.page-heading h1 { margin-bottom: 9px; }
.page-intro { color: var(--muted); font-size: 13px; margin: 0; max-width: 620px; }
.page-heading .eyebrow { margin-bottom: 10px; }
.text-link { font-size: 12px; color: #5c6e4c; text-underline-offset: 5px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr); gap: 30px; align-items: start; }
.panel, .form-panel { background: var(--paper-light); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.65rem; margin-bottom: 16px; }
.panel h3 { margin-bottom: 15px; }
.panel p { font-size: 13px; }
.panel + .panel { margin-top: 22px; }
.stack > .panel + .panel { margin-top: 0; }
.two-column > aside.panel { display: block; }
.form-panel { max-width: 800px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { min-width: 0; }
.field.full, .full { grid-column: 1 / -1; }
label, .field-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; color: #42513d; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { width: 100%; min-height: 44px; padding: 10px 13px; color: var(--ink); border: 1px solid #bdc3ae; border-radius: 7px 9px 6px 8px / 8px 6px 9px 7px; background: #fffdf8; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #797d6d; opacity: 1; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { border-color: #5f7b4f; box-shadow: 0 0 0 3px rgba(107, 138, 79, .1); }
textarea { min-height: 110px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--sage-deep); margin: 0 7px 0 0; vertical-align: middle; flex-shrink: 0; }
input[type="file"] { padding: 9px !important; font-size: 11px !important; }
input[type="file"]::file-selector-button { border: 0; background: #e5ebda; color: var(--ink); border-radius: 4px; padding: 5px 9px; margin-right: 10px; cursor: pointer; }
.help-text, .helptext { display: block; color: #6b725f; font-size: 11px; line-height: 1.65; margin-top: 6px; }
.helptext ul { padding-left: 17px; margin: 5px 0; }
.errorlist { color: #963f2b; font-size: 12px; list-style: none; padding: 0; margin: 6px 0 12px; }
.errorlist li::before { content: "! "; font-weight: 700; }
.form-actions { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-top: 27px; padding-top: 22px; border-top: 1px dashed var(--line); }
.form-actions .text-muted { font-size: 11px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkbox-grid label, .choice-card { display: flex; gap: 7px; align-items: center; background: #f4f5e9; border: 1px solid #d3dac5; border-radius: 9px 12px 8px 10px; padding: 13px; font-size: 12px; font-weight: 400; margin: 0; cursor: pointer; }
.choice-card:has(input:checked), .checkbox-grid label:has(input:checked) { background: #e8efdd; border-color: #8d9e7c; }
.choice-card .choice-label { flex: 1; }
.choice-card small { display: block; color: var(--muted); font-size: 10px; }
.choice-card img { width: 35px; height: 47px; object-fit: cover; border-radius: 2px; }
.choice-options > div { display: flex; flex-wrap: wrap; gap: 12px; }
.choice-options label { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 17px; border: 1px solid #c5ceb7; border-radius: 9px 13px 8px 11px; background: #f4f5e9; cursor: pointer; font-size: 13px; font-weight: 400; }
.choice-options label:has(input:checked) { background: #e0ead3; border-color: #82966c; }
.book-choices { display: flex; flex-direction: column; gap: 10px; }
.book-choices .choice-card { min-height: 50px; line-height: 1.55; }
.offer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-column > .panel + .panel { margin-top: 0; }
.form-panel form > p { margin-bottom: 20px; }
fieldset { margin: 0; padding: 0; border: none; min-width: 0; }
legend { font-family: var(--font-story); font-size: 20px; font-weight: 600; padding: 0; margin-bottom: 15px; }
.lookup-row { display: flex; align-items: flex-start; gap: 10px; }
.lookup-row input { flex: 1; }
.lookup-row .button { flex-shrink: 0; }
.lookup-controls { gap: 9px; flex-wrap: nowrap; }
.lookup-controls input { flex: 1; min-width: 0; }
.lookup-controls button { flex-shrink: 0; }
.lookup-results { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
.lookup-results:empty { display: none; }
.lookup-results button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 13px; background: #f0f3e5; border: 1px solid #d0d9bd; border-radius: 7px 11px 8px 10px; font-size: 12px; }
.lookup-results button:hover { border-color: #8ea078; background: #e6edd7; }
.lookup-results button strong { display: block; color: #415336; }
.lookup-results button small { color: #6d775f; font-size: 10px; }
.lookup-results img { width: 33px; height: 44px; object-fit: cover; border-radius: 2px; }
.tip-panel > .icon { width: 30px; height: 30px; color: #bd8166; margin: 0 0 16px; transform: rotate(-8deg); }
.tip-panel h2 { line-height: 1.25; }
.tip-panel .handwritten { margin-top: 25px; font-size: 15px; }
.checkbox-label { display: flex; align-items: center; padding: 12px 0; gap: 6px; font-weight: 400; }
.lookup-status { font-size: 12px; margin-top: 10px; color: #5c714c; }
.photo-preview { width: 100px; height: 130px; object-fit: cover; margin-top: 12px; border-radius: 6px; border: 1px solid var(--line); }
.messages { margin: 20px auto; padding: 0; list-style: none; }
.message { font-size: 13px; padding: 13px 18px; background: #eaf0df; border: 1px solid #bccbab; border-radius: 9px 12px 8px 11px; margin-bottom: 9px; }
.message.error { background: #f9e8dd; border-color: #d8aa95; color: #843e28; }
.message.warning { background: #f7edcd; border-color: #cbb675; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 24px 0; flex-wrap: wrap; }
.tab { position: relative; text-decoration: none; padding: 12px 2px; color: #626d58; font-size: 13px; }
.tab.active { color: var(--ink); font-weight: 600; }
.tab.active::after { content: ""; position: absolute; bottom: -2px; left: 0; right: 0; height: 3px; background: var(--ink); border-radius: 40% 60% 20% 50%; transform: rotate(-1deg); }
.tab-count { display: inline-block; margin-left: 5px; font-size: 10px; background: #e7eadb; border-radius: 9px; padding: 1px 6px; }

.detail-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 65px; padding-top: 35px; align-items: start; }
.book-detail-art { background: #e8ead9; border-radius: 28px 22px 24px 20px / 20px 30px 18px 25px; padding: 48px 35px; display: grid; place-items: center; position: relative; }
.book-detail-art .book-cover { width: 240px; height: 330px; }
.book-detail-art .cover-title { font-size: 31px; }
.book-detail-art .cover-placeholder::before { font-size: 68px; }
.book-detail-art .cover-placeholder::after { font-size: 105px; bottom: 70px; }
.book-detail-art .cover-author { font-size: 11px; }
.book-detail-art .handwritten { margin-top: 25px; font-size: 13px; }
.book-detail-content { padding-top: 12px; }
.book-detail-content h1 { margin-bottom: 10px; }
.book-detail-content .book-author { font-size: 16px; margin-bottom: 20px; }
.detail-author { font-family: var(--font-story); font-style: italic; font-size: 19px; color: #738061; margin-bottom: 20px; }
.detail-owner { font-size: 12px; gap: 11px; margin: 27px 0; }
.detail-owner .owner-avatar { width: 37px; height: 37px; font-size: 17px; }
.detail-owner strong { font-size: 12px; color: #4f6044; }
.detail-owner p { margin: 0; font-size: 10px; color: #788168; }
.book-detail-content .detail-meta { padding: 15px 0; border-block: 1px dashed var(--line); margin: 25px 0; display: flex; flex-direction: column; gap: 11px; font-size: 12px; }
.book-detail-content .detail-meta > div { display: flex; gap: 9px; align-items: center; }
.book-detail-content .detail-meta .icon { width: 17px; height: 17px; color: #819168; }
.book-detail-content h2 { font-size: 21px; margin-bottom: 12px; }
.book-detail-content .preserve-lines { font-size: 13px; color: #667259; line-height: 1.85; }
.preserve-lines { white-space: pre-line; overflow-wrap: anywhere; }
.report-link { display: inline-block; margin-top: 22px; color: #7c7868; font-size: 10px; }
.more-books { margin-top: 60px; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.tag { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #ced4bf; border-radius: 11px 13px 10px 12px; padding: 4px 10px; background: #f3f3e5; color: #506046; font-size: 10px; }
.tag-coral { background: #f5e4d8; color: #814731; border-color: #e2c6b4; }
.tag-lavender { background: #eae3ef; color: #61516b; border-color: #d6c9de; }
.breadcrumb { font-size: 11px; color: var(--muted); padding-top: 28px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { display: flex; gap: 18px; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.summary-list li:last-child { border-bottom: none; }
.summary-list span:first-child { color: var(--muted); }
.summary-list span:last-child { text-align: right; }
dl.summary-list { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); column-gap: 18px; row-gap: 0; font-size: 12px; }
dl.summary-list dt, dl.summary-list dd { padding: 10px 0; border-bottom: 1px dashed var(--line); margin: 0; overflow-wrap: anywhere; }
dl.summary-list dt { color: var(--muted); }
dl.summary-list dd { text-align: right; }
dl.summary-list dt:last-of-type, dl.summary-list dd:last-of-type { border-bottom: 0; }
.notice { padding: 15px 18px; background: #edf0df; border: 1px dashed #acb696; border-radius: 9px 14px 10px 12px; font-size: 12px; color: #4e6241; }
.notice p:last-child { margin-bottom: 0; }
.notice-warning { background: #f8efd6; color: #725b2e; border-color: #ccb676; }
.notice-info { background: #edf0ed; border-color: #b2c0b9; color: #415c50; }

.exchange-card { display: block; padding: 24px; margin-bottom: 16px; background: var(--paper-light); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: border-color .2s, transform .2s; }
a.exchange-card:hover { border-color: #99aa88; transform: translateY(-2px); }
.exchange-card h3 { margin: 0 0 6px; }
.exchange-card p { font-size: 12px; color: var(--muted); margin: 0; }
.exchange-list .exchange-card { display: flex; align-items: center; gap: 17px; margin: 0; }
.exchange-card-main { flex: 1; min-width: 0; }
.exchange-card-main h2 { font-size: 24px; line-height: 1.3; margin: 0 0 5px; }
.exchange-card-main p { font-size: 12px; }
.exchange-mode-icon { display: grid; place-items: center; flex-shrink: 0; width: 47px; height: 47px; border-radius: 45% 53% 47% 52%; background: #e4ebd7; color: #687f53; }
.exchange-mode-icon .icon { width: 24px; height: 24px; }
.two-column.exchange-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; margin-top: 25px; }
.exchange-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.exchange-status { display: inline-flex; padding: 5px 11px; border-radius: 13px 10px 12px 9px; font-size: 10px; font-weight: 600; background: #e8ebdf; color: #4a5f42; white-space: nowrap; }
.status-proposed { background: #f4e6bb; color: #715f2f; }
.status-accepted { background: #e1ead4; color: #49603c; }
.status-completed { background: #dbe8da; color: #355e3e; }
.status-cancelled { background: #eae6dd; color: #6e695d; }
.status-issue { background: #f2ddcf; color: #87482f; }
.exchange-books { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; align-items: center; }
.mini-cover { width: 42px; height: 58px; object-fit: cover; background: #dce3cc; border-radius: 2px 4px 4px 2px; box-shadow: 2px 3px 3px rgba(53, 76, 64, .1); }
.mini-cover.cover-placeholder { padding: 5px; font-size: 7px; }
.mini-cover.cover-placeholder::before, .mini-cover.cover-placeholder::after { display: none; }
.mini-cover .cover-title { font-size: 8px; }
.mini-cover .cover-author { display: none; }
.exchange-books:has(.exchange-book) { display: block; margin-bottom: 0; }
.exchange-book { display: flex; align-items: flex-start; gap: 13px; min-width: 0; padding: 15px 0; border-bottom: 1px dashed var(--line); }
.exchange-book:last-child { border-bottom: 0; padding-bottom: 0; }
.exchange-book:first-child { padding-top: 0; }
.exchange-book > div:last-child { min-width: 0; flex: 1; }
.exchange-book .mini-cover { display: grid; place-items: center; flex-shrink: 0; width: 55px; height: 76px; overflow: hidden; background: #e1e8d3; }
.exchange-book .mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.exchange-book strong { font-family: var(--font-story); font-size: 16px; line-height: 1.35; display: block; }
.exchange-book p { margin: 4px 0 7px; font-size: 11px; }
.exchange-book .help-text { font-size: 11px; margin: 8px 0 0; }
.book-swap-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.book-swap-list h3 { font-size: 18px; }
.swap-book { display: flex; gap: 11px; align-items: center; margin: 13px 0; padding-bottom: 13px; border-bottom: 1px dashed var(--line); }
.swap-book:last-child { border-bottom: 0; }
.swap-book p { margin: 0; }
.swap-book-title { font-family: var(--font-story); font-weight: 600; font-size: 15px; }
.timeline { display: flex; justify-content: space-between; gap: 8px; padding: 25px 0; margin-bottom: 20px; }
ol.timeline { list-style: none; padding-inline: 0; }
.step { flex: 1; position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; color: #727866; font-size: 10px; }
.step::before { content: ""; display: block; width: 20px; height: 20px; border: 1px solid #c3c9b5; border-radius: 49% 52% 46% 51%; background: var(--paper); position: relative; z-index: 1; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 10px; width: 100%; left: 50%; border-top: 1px dashed #bac4aa; }
.step.current { color: var(--ink); font-weight: 600; }
.step.current::before { background: var(--butter); border-color: #a78e45; box-shadow: 0 0 0 4px rgba(239, 213, 138, .2); }
.step.done::before { background: var(--sage-deep); border-color: var(--sage-deep); }
.thread { display: flex; flex-direction: column; gap: 13px; margin: 20px 0; max-height: 450px; overflow-y: auto; padding: 4px; }
.thread-message { max-width: 90%; padding: 14px 16px; background: #eeefe2; border-radius: 4px 14px 13px 12px; align-self: flex-start; overflow-wrap: anywhere; }
.thread-message.mine { background: #e1e9d7; align-self: flex-end; border-radius: 14px 4px 12px 13px; }
.thread-message p { white-space: pre-wrap; margin: 4px 0 0; font-size: 12px; }
.thread-message small { color: #69755d; font-size: 9px; }
.thread-message strong { font-size: 10px; }
.postal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.postal-grid .panel { padding: 22px; margin: 0; }
.postal-section { margin-top: 40px; }
.postal-section .postal-grid { margin: 22px 0; }
.postal-section address { font-style: normal; padding: 15px; background: #eff2e5; border-radius: 8px 11px 7px 10px; }
.postal-section .notice + .notice { margin-top: 18px; }
.conversation-panel { margin-top: 30px; }
.issue-panel { margin-top: 24px; background: #f8f2e5; box-shadow: none; }
.issue-panel summary { cursor: pointer; font-family: var(--font-story); font-size: 19px; min-height: 30px; }
.issue-panel[open] summary { margin-bottom: 16px; }
.issue-panel textarea { margin-bottom: 14px; }
.narrow-panel { max-width: 700px; }
.address { font-style: normal; white-space: pre-line; font-size: 13px; padding: 13px; background: #f1f2e7; border-radius: 8px; }
.tracking-code { font-family: monospace; overflow-wrap: anywhere; font-size: 12px; }
.inline-form { display: inline; }
.action-list { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.action-list form { margin: 0; }

.auth-page { max-width: 1050px; margin: 55px auto 70px; display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 60px; }
.auth-card { background: var(--paper-light); border: 1px solid #cdd4bf; border-radius: 20px 27px 17px 23px; padding: 35px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 2.5rem; margin-bottom: 12px; }
.auth-card .page-intro { margin-bottom: 25px; }
.auth-card form > p { margin-bottom: 19px; }
.auth-card .button { width: 100%; margin-top: 6px; }
.auth-links { text-align: center; font-size: 12px; margin-top: 22px; color: var(--muted); }
.auth-links a { color: var(--ink); }
.auth-art { padding: 20px; }
.auth-art img { mix-blend-mode: multiply; }
.auth-art h2 { font-size: 2.1rem; text-align: center; margin-top: 15px; }
.auth-art p { font-family: var(--font-hand); text-align: center; font-size: 15px; color: #758061; }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.check-row input { margin-top: 3px; }
.check-row label { font-size: 12px; font-weight: 400; }
.steps-panel { padding: 30px; background: #eef0e0; border: 1px dashed #b0bca0; border-radius: 20px 27px 18px 23px; }
.steps-panel ol { margin: 20px 0 0; padding-left: 22px; }
.steps-panel li { margin: 15px 0; padding-left: 5px; font-size: 13px; }
.steps-panel li::marker { color: #7d925d; font-family: var(--font-story); font-size: 20px; }
.steps-panel strong { display: block; margin-bottom: 2px; }
.steps-panel p { color: var(--muted); font-size: 12px; }
.narrow { max-width: 680px; margin-inline: auto; }
.prose { max-width: 720px; padding-top: 45px; }
.prose h2 { margin-top: 35px; }
.prose p, .prose li { font-size: 14px; }

.site-footer { margin-top: 70px; padding: 26px 0 22px; border-top: 1px dashed #c9cbb8; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.footer-inner p { margin: 0; color: #72775f; font-size: 10px; }
.footer-inner a { color: #626e53; font-size: 10px; text-decoration: none; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-doodle { font-family: var(--font-hand); font-size: 12px; color: #78845d; transform: rotate(-2deg); }
.footer-doodle::before { content: "♡"; display: inline-block; color: var(--coral); margin-right: 7px; font-family: var(--font-hand); font-size: 18px; vertical-align: middle; transform: rotate(-12deg); }
.footer-brand { gap: 8px; }
.footer-brand .brand-name { font-size: 20px; }
.footer-brand .icon { width: 28px; height: 28px; color: #7c8b65; }
.footer-doodle:has(svg)::before { display: none; }
.footer-doodle .icon { width: 20px; height: 20px; margin-right: 5px; transform: rotate(10deg); }
.footer-small { display: flex; justify-content: space-between; gap: 20px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #e4e1d1; color: #7a7c68; font-size: 9px; }
.footer-small a { text-decoration: none; }
.footer-small a:hover { text-decoration: underline; }
dialog { color: var(--ink); background: var(--paper-light); border: 1px solid #9eae8c; border-radius: var(--radius); padding: 25px; width: min(520px, calc(100% - 32px)); box-shadow: 0 20px 80px rgba(38, 52, 35, .25); }
dialog::backdrop { background: rgba(37, 49, 36, .5); backdrop-filter: blur(3px); }
dialog h2 { font-size: 1.8rem; }
dialog video { width: 100%; background: #d8dfd1; border-radius: 10px; max-height: 350px; object-fit: cover; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 16px; }
.dialog-header h2 { margin-bottom: 5px; }
.modal { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; background: rgba(37, 49, 36, .45); padding: 20px; }
.modal-content { background: var(--paper-light); border-radius: var(--radius); padding: 30px; max-width: 560px; max-height: 90vh; overflow-y: auto; }

@keyframes settle-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1450px) {
  .container { width: min(1240px, calc(100% - 120px)); }
  .hero { padding-top: 66px; padding-bottom: 54px; }
  .hero-art img { max-height: 420px; }
  .cover-stage { height: 290px; }
  .book-cover { height: 230px; width: 162px; }
}
@media (max-width: 1100px) {
  .container { width: calc(100% - 56px); }
  .header-inner { gap: 20px; min-height: 88px; }
  .main-nav { gap: 18px; }
  .brand-name { font-size: 24px; }
  .brand-mark { width: 44px; height: 44px; }
  .header-actions { gap: 10px; }
  .header-actions .button { padding: 9px 15px; }
  .hero-title { font-size: 3.7rem; }
  .book-grid { gap: 27px 18px; }
  .cover-stage { height: 245px; min-height: 0; padding-inline: 15px; }
  .book-cover { height: 194px; width: 137px; }
  .detail-layout { gap: 35px; }
  .two-column { gap: 22px; grid-template-columns: minmax(0, 1.3fr) minmax(250px, .8fr); }
}
@media (max-width: 850px) {
  .header-inner { flex-wrap: wrap; gap: 10px 22px; padding-block: 17px 12px; }
  .main-nav { order: 3; justify-content: center; width: 100%; gap: 32px; padding-top: 7px; }
  .nav-link { font-size: 12px; padding-block: 7px; }
  .hero { padding-top: 38px; gap: 15px; }
  .hero-title { font-size: 3.1rem; }
  .hero-description { font-size: 13px; }
  .hero-art img { max-height: 310px; }
  .hero-note { font-size: 10px; right: 0; bottom: -12px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cover-stage { height: 250px; }
  .book-cover { height: 200px; width: 140px; }
  .two-column { grid-template-columns: minmax(0, 1fr); }
  .two-column > aside:not(.panel) { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .two-column > aside:not(.panel) > * { margin: 0; }
  .detail-layout { grid-template-columns: .8fr 1fr; gap: 28px; }
  .book-detail-art { padding: 35px 20px; }
  .book-detail-art .book-cover { width: 185px; height: 270px; }
  .book-detail-content h1 { font-size: 2.5rem; }
  .auth-page { gap: 25px; }
  .auth-card { padding: 28px; }
  .auth-art { padding: 5px; }
  .postal-grid { grid-template-columns: 1fr; }
  .intro-strip { gap: 25px; }
  .community-strip-details { gap: 14px; font-size: 9px; }
  .community-strip .community-chip { font-size: 10px; }
  .sharing-banner { padding: 24px; gap: 16px; flex-wrap: wrap; }
  .sharing-banner .button { margin-left: 56px; }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .container { width: calc(100% - 36px); }
  .header-inner { padding-top: 14px; gap: 10px; }
  .brand { gap: 7px; }
  .brand-name { font-size: 24px; }
  .brand-tagline { font-size: 8px; }
  .brand-mark { width: 40px; height: 40px; }
  .header-actions { gap: 8px; }
  .header-actions .button { min-height: 38px; padding: 8px 10px; font-size: 11px; }
  .header-actions .button svg { width: 14px; height: 14px; }
  .avatar { width: 33px; height: 33px; font-size: 14px; }
  .main-nav { justify-content: space-around; gap: 8px; }
  .nav-link { font-size: 11px; }
  .hero { grid-template-columns: 1fr; padding-top: 31px; padding-bottom: 18px; gap: 0; }
  .hero-copy { padding-bottom: 0; }
  .hero .eyebrow { font-size: 8px; letter-spacing: .12em; margin-bottom: 14px; }
  .hero-title { font-size: clamp(2.75rem, 10vw, 3.7rem); max-width: 450px; margin-bottom: 17px; }
  .hero-description { max-width: 400px; font-size: 13px; line-height: 1.8; margin-bottom: 22px; }
  .hero-actions { gap: 9px; }
  .hero-actions .button { padding: 10px 15px; font-size: 12px; }
  .community-chip { margin-top: 19px; font-size: 10px; }
  .hero-art { max-width: 340px; justify-self: center; margin-top: 10px; }
  .hero-art img { max-height: 230px; }
  .hero-note { right: -5px; bottom: 6px; font-size: 9px; }
  .hero-copy .hero-note { margin-top: 15px; font-size: 9px; }
  .illustration-note { right: -3px; bottom: -4px; font-size: 9px; }
  .illustration-note::before { font-size: 23px; }
  .community-strip { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 16px; margin-bottom: 31px; }
  .community-strip-details { width: 100%; justify-content: space-between; gap: 10px; font-size: 8px; }
  .community-strip-details > span { gap: 4px; }
  .community-strip-details .icon { width: 14px; height: 14px; }
  .intro-strip { margin-bottom: 31px; gap: 13px; padding: 15px 3px; justify-content: space-around; font-size: 9px; }
  .intro-strip span { flex-direction: column; gap: 3px; text-align: center; }
  .intro-strip svg { width: 17px; height: 17px; }
  .section-heading { gap: 12px; margin-bottom: 17px; align-items: center; }
  .section-title { font-size: 1.85rem; }
  .section-heading p { font-size: 11px; }
  .section-heading .text-hand { display: none; }
  .section-heading > .handwritten { display: none; }
  .heading-star { font-size: 22px; margin-left: 6px; }
  .section-kicker { font-size: 8px; }
  .age-tabs { gap: 6px; margin-top: 20px; margin-bottom: 13px; }
  .chip { padding: 7px 11px; min-height: 33px; font-size: 10px; }
  .filter-bar { flex-wrap: wrap; gap: 9px; padding-top: 7px; padding-bottom: 15px; }
  .filter-bar .search-field { flex-basis: 100%; }
  .filters { width: 100%; gap: 8px; }
  .filter-bar select { flex: 1; width: 100%; max-width: none; min-width: 0; font-size: 11px; }
  .filter-bar .button { padding: 9px 12px; font-size: 11px; }
  .results-caption { font-size: 10px; }
  .results-summary { font-size: 9px; margin-bottom: 16px; }
  .results-summary > .text-muted { display: none; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 14px; }
  .cover-stage { height: 218px; padding: 24px 12px 17px; border-radius: 11px 15px 10px 13px; }
  .book-cover { height: 167px; width: 118px; }
  .condition-badge { font-size: 8px; left: 8px; top: 8px; padding: 3px 7px; }
  .cover-title { font-size: 17px; }
  .cover-author { font-size: 7px; }
  .cover-placeholder { padding: 16px 9px 12px; }
  .cover-placeholder::before { font-size: 31px; }
  .cover-placeholder .cover-star { width: 16px; height: 16px; }
  .cover-placeholder .cover-book-icon { width: 32px; height: 30px; }
  .book-info { padding-top: 12px; }
  .book-title { font-size: 16px; }
  .book-author { font-size: 10px; margin-bottom: 9px; }
  .owner-row { font-size: 9px; gap: 5px; }
  .owner-row .owner-avatar { width: 20px; height: 20px; font-size: 9px; }
  .card-footer { gap: 6px; font-size: 8px; margin-top: 9px; padding-top: 8px; }
  .delivery-label { gap: 3px; }
  .delivery-label svg { width: 10px; height: 10px; }
  .sharing-banner { margin-top: 34px; padding: 23px 20px; gap: 15px; }
  .sharing-banner > .icon { width: 28px; height: 30px; }
  .sharing-banner > div { flex: 1; }
  .sharing-banner h2 { font-size: 21px; }
  .sharing-banner p { font-size: 10px; }
  .sharing-banner .button { margin-left: 43px; font-size: 10px; }
  .page-heading { padding-top: 31px; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
  .page-heading h1 { font-size: 2.6rem; }
  .page-intro { font-size: 12px; }
  .panel, .form-panel { padding: 22px 19px; }
  .panel h2 { font-size: 1.5rem; }
  .two-column > aside:not(.panel) { display: flex; flex-direction: column; gap: 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 19px; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .lookup-row { flex-wrap: wrap; }
  .lookup-row input { flex-basis: 100%; }
  .lookup-row .button { flex: 1; }
  .lookup-controls { flex-wrap: wrap; }
  .lookup-controls input { flex-basis: 100%; }
  .lookup-controls #lookup-button { flex: 1; }
  .lookup-controls #scan-button { width: 44px; }
  .form-actions { gap: 12px; }
  .form-actions .button { flex: 1; }
  .tabs { gap: 17px; margin: 20px 0; }
  .tab { font-size: 12px; }
  .detail-layout { grid-template-columns: 1fr; gap: 25px; padding-top: 22px; }
  .book-detail-art { max-width: 390px; width: 100%; justify-self: center; padding: 32px; }
  .book-detail-art .book-cover { width: 190px; height: 270px; }
  .book-detail-content { padding-top: 0; }
  .book-detail-content h1 { font-size: 2.6rem; }
  .exchange-card { padding: 20px 17px; }
  .exchange-card h3 { font-size: 19px; }
  .exchange-grid { gap: 14px; }
  .book-swap-list { gap: 16px; }
  .book-swap-list h3 { font-size: 17px; }
  .swap-book { gap: 7px; align-items: flex-start; }
  .swap-book-title { font-size: 13px; }
  .swap-book .mini-cover { width: 33px; height: 47px; }
  .swap-book p { font-size: 10px; }
  .exchange-status { font-size: 9px; padding: 4px 9px; }
  .timeline { gap: 4px; }
  .step { font-size: 9px; }
  .thread-message { max-width: 96%; }
  .action-list { gap: 10px; }
  .action-list .button { font-size: 11px; padding: 10px 13px; }
  .auth-page { grid-template-columns: 1fr; margin: 30px auto; gap: 20px; }
  .auth-card { padding: 28px 22px; }
  .auth-card h1 { font-size: 2.3rem; }
  .auth-art { max-width: 300px; margin-inline: auto; order: 2; }
  .auth-art img { max-height: 220px; width: 100%; object-fit: contain; }
  .auth-art h2 { font-size: 1.7rem; }
  .auth-art p { font-size: 12px; }
  .site-footer { margin-top: 45px; padding-block: 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { gap: 17px; }
  .footer-doodle { font-size: 11px; }
  .footer-small { flex-direction: column; gap: 8px; font-size: 8px; }
}
@media (max-width: 370px) {
  .container { width: calc(100% - 28px); }
  .brand-name { font-size: 21px; }
  .brand-mark { width: 34px; height: 34px; }
  .header-actions .button { padding-inline: 8px; font-size: 10px; }
  .header-actions .button svg { display: none; }
  .hero-title { font-size: 2.7rem; }
  .cover-stage { height: 194px; }
  .book-cover { height: 148px; width: 105px; }
  .book-title { font-size: 15px; }
}
@media (max-width: 620px) {
  /* Small screens keep the same storybook charm without tiny working text. */
  body { font-size: 15px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea,
  .filter-bar input, .filter-bar select { font-size: 16px; min-height: 46px; }
  input[type="file"] { font-size: 14px !important; }
  label, .field-label { font-size: 13px; }
  .help-text, .helptext, .lookup-status, .errorlist { font-size: 12px; line-height: 1.65; }
  .helptext ul { font-size: 12px; }
  .button, button[type="submit"], .button-small, .action-list .button, .header-actions .button { font-size: 13px; min-height: 44px; }
  .header-actions .button { font-size: 12px; }
  .hero-actions .button { font-size: 13px; }
  .nav-link { font-size: 12px; min-height: 44px; display: inline-flex; align-items: center; }
  .chip, .age-tabs .chip { min-height: 44px; font-size: 12px; padding-inline: 12px; }
  .tab { min-height: 44px; font-size: 13px; }
  .results-summary, .results-caption { font-size: 11px; }
  .book-author { font-size: 12px; line-height: 1.45; }
  .book-age { font-size: 11px; letter-spacing: .035em; }
  .owner-row { font-size: 12px; min-width: 0; }
  .card-footer { font-size: 11px; gap: 7px; }
  .book-card .card-footer { flex-wrap: wrap; align-items: flex-start; }
  .book-card .owner-row { flex: 1 1 100%; }
  .book-card .owner-row > span:last-child { overflow-wrap: anywhere; }
  .book-card .delivery-label { min-height: 18px; }
  .card-footer .delivery-label svg { width: 15px; height: 15px; }
  .condition-badge { font-size: 11px; padding: 4px 7px; }
  .tag, .exchange-status { font-size: 11px; }
  .page-intro, .panel p, .empty-state p { font-size: 13px; }
  .summary-list li, dl.summary-list { font-size: 12px; }
  .breadcrumb, .text-link { font-size: 12px; }
  .report-link { font-size: 12px; min-height: 44px; padding-block: 12px; }
  .notice, .message { font-size: 13px; }
  .community-strip .community-chip { font-size: 12px; }
  .community-strip-details { font-size: 11px; gap: 9px; flex-wrap: wrap; justify-content: flex-start; }
  .community-strip-details > span { gap: 5px; }
  .community-strip-details > span:last-child { flex-basis: 100%; }
  .community-strip-details .icon { width: 16px; height: 16px; }
  .section-kicker, .hero .eyebrow, .eyebrow { font-size: 11px; }
  .hero-description { font-size: 14px; }
  .hero-copy .hero-note { font-size: 11px; }
  .sharing-banner p { font-size: 12px; }
  .sharing-banner .button { font-size: 12px; margin-left: 0; }
  .sharing-banner > div { flex-basis: calc(100% - 45px); }
  .lookup-results button { font-size: 13px; }
  .lookup-results button small { font-size: 12px; }
  .choice-options label, .choice-card, .checkbox-grid label, .book-choices .choice-card { font-size: 13px; min-height: 50px; }
  .choice-options > div { gap: 9px; }
  .choice-options > div > div { flex: 1 1 auto; }
  .choice-options label { padding: 12px; }
  .offer-columns, .two-column.exchange-grid { grid-template-columns: 1fr; }
  .exchange-list .exchange-card { gap: 12px; flex-wrap: wrap; }
  .exchange-mode-icon { width: 38px; height: 38px; }
  .exchange-mode-icon .icon { width: 21px; height: 21px; }
  .exchange-card-main { flex-basis: calc(100% - 52px); }
  .exchange-card-main h2 { font-size: 21px; }
  .exchange-card-main p { font-size: 12px; }
  .exchange-list .exchange-status { margin-left: 50px; }
  .exchange-list .exchange-card > .icon:last-child { margin-left: auto; }
  .exchange-book strong { font-size: 17px; }
  .exchange-book p, .exchange-book .help-text { font-size: 12px; }
  .step { font-size: 11px; line-height: 1.5; }
  .thread-message p { font-size: 13px; }
  .thread-message strong, .thread-message small, .thread-message time { font-size: 12px; }
  .postal-section .section-title { font-size: 1.7rem; }
  .postal-section address { font-size: 14px; }
  .footer-inner p, .footer-inner a, .footer-small, .footer-small a { font-size: 11px; }
  .auth-links, .check-row, .check-row label { font-size: 13px; }
  .form-panel form > p { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
