/* 书架、封面、面包屑、书页、列表行：所有页面共用，颜色取当前设计的变量（--ink、--muted、--line 等）。
   可以点的东西只有四种样子：
   1. 封面（书架上的书，整块都能点）；
   2. 按钮（实心或描边）；
   3. 列表行（整行都能点，右边有“›”）；
   4. 带下划线的文字链接（面包屑、正文里的链接）。
   除此之外的文字不加下划线、不用颜色区分，看上去就是不能点的。 */

/* ---------- 顶栏：小鱼标 + 名字（点它回首页），导航里当前一栏加粗、下面一道线 ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { display: block; flex: none; width: 28px; height: 28px; }
.topnav a { position: relative; padding: 4px 0; color: var(--nav, var(--muted)); }
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.topnav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1.5px; background: var(--accent, currentColor); border-radius: 2px;
}
/* 键盘操作时，焦点要看得见 */
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 2px; }

/* ---------- 面包屑：首页 › 书名 › 这一章 ---------- */
.breadcrumb { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.breadcrumb ol { display: flex; align-items: center; min-width: 0; margin: 0; padding: 0; list-style: none; }
.breadcrumb li { display: flex; align-items: center; flex: none; min-width: 0; white-space: nowrap; }
.breadcrumb li + li::before { content: "›"; flex: none; margin: 0 8px; font-size: 15px; line-height: 1; }
.breadcrumb li:last-child { flex: 1 1 auto; overflow: hidden; }
.breadcrumb a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.breadcrumb a:hover { text-decoration-color: var(--accent, currentColor); }
.breadcrumb [aria-current] { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 封面：仿一本布面精装书 ----------
   布纹（横竖两层细纹）、左边书脊的压痕和高光、左上来光、下沿暗角；右边和下边露出几层书页；
   书名像烫印：浅暖白字，下沿一道很细的暗边。右下一幅很淡的线描小图（cover-art.html）。
   字号随封面宽度缩放（cqw），但有上下限：封面放大时字不再跟着变大。 */
.cover {
  position: relative; display: block; width: 100%; height: 0; padding-top: 133.33%;
  background-color: var(--c);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.01 1.1' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .22 0 0 0 -.09'/%3E%3C/filter%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1 .01' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .24 0 0 0 -.1'/%3E%3C/filter%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23h)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(0, 0, 0, .3) 0, rgba(0, 0, 0, .12) 3%, rgba(255, 255, 255, .16) 4.6%, rgba(0, 0, 0, .22) 5.6%, rgba(0, 0, 0, .06) 7.5%, rgba(0, 0, 0, 0) 12%),
    radial-gradient(120% 80% at 18% 0%, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .2) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0) 92%, rgba(0, 0, 0, .12) 100%);
  color: var(--on-c);
  border-radius: 2px 5px 5px 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .18),
    1px 1px 0 #F4EEE2, 2px 2px 0 #CFC6B5, 3px 3px 0 #F1EADC, 4px 4px 0 #C9BFAD,
    4px 5px 0 rgba(0, 0, 0, .08),
    8px 12px 22px rgba(30, 20, 10, .2), 2px 3px 6px rgba(30, 20, 10, .14);
  container-type: inline-size;
}
.cover-in {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
  display: flex; flex-direction: column;
  padding: 13% 10% 11% 15%;
}
/* 字号先写固定值，认识 cqw（随封面宽度缩放）的浏览器再用后一个 */
.cover-kind {
  display: flex; align-items: center; gap: 6%;
  font-size: 10px; font-size: clamp(9px, 4.6cqw, 13px); letter-spacing: .28em; opacity: .82;
}
.cover-kind::after { content: ""; flex: 0 0 18%; height: 1px; background: currentColor; opacity: .55; }   /* 状态后面一道细线 */
.cover-title {
  display: block; margin-top: 13%;
  font-family: var(--serif); font-size: 15px; font-size: clamp(11px, 10.5cqw, 30px); font-weight: 700; line-height: 1.38; letter-spacing: .05em;
  color: #FBF6EC;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .28), 0 0 1px rgba(0, 0, 0, .2);   /* 烫印：下沿一道很细的暗边 */
}
.cover-foot {
  display: flex; align-items: center; gap: 5%; margin-top: auto;
  font-family: var(--serif); font-size: 10px; font-size: clamp(9px, 4.6cqw, 14px); letter-spacing: .08em; opacity: .92;
}
.cover-foot img { display: block; flex: none; width: 14px; width: clamp(12px, 7.5cqw, 22px); height: 14px; height: clamp(12px, 7.5cqw, 22px); }
.cover-title > span { display: block; }   /* 书名在 books.yml 的 cover_lines 里指定在哪里换行 */
.cover-art {
  position: absolute; right: 9%; bottom: 17%; z-index: 0;
  width: 46%; height: auto;
  fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  color: var(--on-c); opacity: .3;
}

/* ---------- 首页书架 ---------- */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 16px; margin: 0; padding: 0; list-style: none; }
.shelf-item { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.shelf-item .cover { margin-bottom: 12px; transition: transform .15s, box-shadow .15s; }
.shelf-item:hover .cover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .18),
    1px 1px 0 #F4EEE2, 2px 2px 0 #CFC6B5, 3px 3px 0 #F1EADC, 4px 4px 0 #C9BFAD,
    4px 5px 0 rgba(0, 0, 0, .08),
    10px 18px 30px rgba(30, 20, 10, .24), 2px 4px 8px rgba(30, 20, 10, .16);
}
.shelf-item:active .cover { transform: scale(.98); }
.shelf-title { font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.45; }
.shelf-item:hover .shelf-title { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.shelf-meta { color: var(--muted); font-size: 12px; line-height: 1.5; }
.shelf-intro { display: none; }

/* ---------- 列表行：整行能点，右边一个“›” ---------- */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 2px 14px 0; color: inherit; text-decoration: none; }
.row-main { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.row-title { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.5; }
.row:hover .row-title { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.row-meta { color: var(--muted); font-size: 13px; }
.row-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--c); border-radius: 2px; vertical-align: 1px; }
.chev { flex: none; color: var(--muted); font-size: 22px; font-weight: 300; line-height: 1; transition: transform .15s, color .15s; }
.row:hover .chev, .toc a:hover .chev, .resume:hover .chev { color: var(--ink); transform: translateX(2px); }

/* ---------- 首页“上次读到” ---------- */
.resume {
  display: flex; align-items: center; gap: 14px;
  margin-top: 24px; padding: 14px 16px;
  background: var(--paper); color: inherit;
  border: 1px solid var(--line); border-left: 3px solid var(--accent, var(--c)); border-radius: 6px;
  text-decoration: none;
}
.resume[hidden] { display: none; }
.resume-main { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.resume-label { color: var(--muted); font-size: 13px; }
.resume-name { overflow: hidden; font-family: var(--serif); font-size: 17px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.resume-go { display: flex; flex: none; align-items: center; gap: 4px; color: var(--ink); font-size: 14px; }

/* ---------- 书页：封面和书名 → 数字 → 按钮 → 简介 → 目录 ---------- */
.book-page { padding-top: 24px; }
.book-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: start; }
.book-info h1 { margin: 0; color: var(--c); font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.35; }   /* 作品页标题用书色（《不存在的鱼》是阅读蓝） */
.book-author { margin: 8px 0 0; color: var(--muted); font-family: var(--serif); font-size: 15px; }
.book-intro { margin: 10px 0 0; color: var(--ink); font-family: var(--serif); font-size: 15px; line-height: 1.75; opacity: .86; }
.book-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 28px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.book-stats div + div { border-left: 1px solid var(--line); }
.book-stats dt { color: var(--muted); font-size: 12px; }
.book-stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.book-stats dd small { margin-left: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.book-stats .book-stats-date { font-size: 17px; line-height: 29px; }
.book-schedule { margin: 12px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.book-schedule.is-waiting { margin-top: 24px; padding: 16px; border: 1px dashed var(--line); border-radius: 4px; font-size: 14px; }
.book-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.book-actions .btn { padding: 12px 22px; font-size: 15px; text-align: center; }
.book-actions .btn-read { flex: 1 1 160px; }
.book-actions button.btn { font-family: inherit; cursor: pointer; }
.book-actions .btn.ghost { background: var(--paper); }   /* 书页按钮：书色实心 + 浅纸色描边 */
.book-restart { margin: 12px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.book-restart span { color: var(--ink); }
.book-restart[hidden] { display: none; }
.book-restart a { color: var(--muted); text-underline-offset: 4px; }
.book-about { font-family: var(--serif); font-size: 16px; line-height: 1.95; }
.book-about p { margin: 0 0 .9em; }
.book-about p:last-child { margin-bottom: 0; }
/* 简介和关于我里 *这样* 包起来的一句（如“作品筹备中”）：灰色说明，不用斜体（中文斜体是硬拉出来的） */
.book-about em, .about em { color: var(--muted); font-style: normal; }
.book-rights { margin: 40px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.toc .chev { margin-left: 2px; font-size: 20px; align-self: center; }
.toc .here { flex: none; padding: 0 7px; color: var(--c); border: 1px solid var(--c); border-radius: 2px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.toc .new { flex: none; white-space: nowrap; }

/* ---------- 关于我：首页一段 + “更多关于我”；单独页面放完整版和作品列表 ---------- */
.about-more { margin: 4px 0 0; font-size: 15px; }
.about-more a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.about-more a:hover { text-decoration-color: var(--accent, currentColor); }
.about-more a:hover .chev { color: var(--ink); transform: translateX(2px); }
.about-page { padding-top: 28px; }
.about-page .about { max-width: none; }
@media (max-width: 759px) {
  .page-about { background: var(--paper); }
  .about-page { padding-top: 24px; }
}

/* ---------- 内页的纸（书页、关于我；阅读页见 reader.css）：电脑上和顶栏一样宽，放在桌面色上；
   文字在纸中间，一行不超过 --page-col，左右留白随纸的宽度变化。手机上不加纸 ---------- */
:root { --page-col: 680px; }
.layout-book { background-color: var(--desk, var(--bg)); background-image: var(--desk-art, none); }   /* 书页的大背景：手机、电脑都和首页一样 */
@media (min-width: 1200px) { :root { --page-col: 760px; } }
@media (min-width: 760px) {
  .page-about { background-color: var(--desk, var(--bg)); background-image: var(--desk-art, none); }
  .page-paper {
    padding: 48px max(48px, calc((100% - var(--page-col)) / 2)) 56px;
    background: var(--paper);
    border-radius: 6px;
    box-shadow: 0 1px 2px var(--soft-shadow, rgba(0, 0, 0, .06)), 0 14px 40px var(--soft-shadow, rgba(0, 0, 0, .06));
  }
  .page-paper .section { margin-top: 48px; }
}
.about-head { display: flex; align-items: center; gap: 16px; margin: 0 0 28px; }
.about-mark { flex: none; width: 64px; height: 64px; border-radius: 50%; }
.about-head h1 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.3; }
.about-name { margin: 4px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.about-contact { margin: 28px 0 0; font-size: 15px; }
.about-contact a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 4px; }

/* ---------- 读者笔记：划线、选中文字后的菜单、写想法、想法卡片、笔记列表 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 划线用淡淡的底色，不用下划线（下划线留给链接） */
mark.hl {
  padding: 0 1px;
  background-color: rgba(214, 160, 40, .26);
  background-color: color-mix(in srgb, var(--c) 17%, transparent);
  color: inherit; border-radius: 2px; cursor: pointer;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* 夜间：书的颜色调出来的底色太暗，改用暖黄 */
:root[data-theme="dark"] mark.hl { background-color: rgba(214, 160, 40, .32); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) mark.hl { background-color: rgba(214, 160, 40, .32); } }
.hl-note {
  display: inline-block; width: 1.25em; height: 1.25em; margin: 0 2px; padding: 0;
  color: var(--c); background: none; border: 0; vertical-align: -.15em; cursor: pointer;
}
.hl-note svg { display: block; width: 100%; height: 100%; }
@keyframes p-flash {
  0%, 35% { background-color: rgba(214, 160, 40, .28); background-color: color-mix(in srgb, var(--c) 16%, transparent); }
  100% { background-color: transparent; }
}
.p-flash { border-radius: 4px; animation: p-flash 2.6s ease-out; }

.note-menu {
  position: fixed; z-index: 45;
  display: flex; padding: 4px;
  background: #2A2420; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.note-menu[hidden] { display: none; }
.note-menu button { padding: 9px 13px; background: none; color: #FFFFFF; border: 0; font: 14px/1 var(--sans); white-space: nowrap; cursor: pointer; }
.note-menu button + button { border-left: 1px solid rgba(255, 255, 255, .18); }
.note-menu button:hover { background: rgba(255, 255, 255, .1); }

.note-quote { max-height: 8.8em; margin: 8px 0 0; padding: 2px 0 2px 12px; overflow-y: auto; color: var(--muted); border-left: 3px solid var(--c); font-family: var(--serif); font-size: 15px; line-height: 1.75; }
.note-sheet textarea {
  display: block; width: 100%; min-height: 112px; margin-top: 14px; padding: 10px 12px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--serif); font-size: 16px; line-height: 1.7; resize: vertical;
}
.note-sheet textarea:focus { outline: 2px solid var(--c); outline-offset: 1px; }
.note-private { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.note-sheet-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.note-sheet-actions .btn { font-family: inherit; font-size: 14px; cursor: pointer; }
.note-del { margin-right: auto; padding: 4px 0; background: none; color: var(--muted); border: 0; font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.note-del[hidden] { display: none; }
.note-card-img { display: block; width: 100%; max-width: 300px; margin: 6px auto 10px; border: 1px solid var(--line); border-radius: 6px; }
.note-card-tip { text-align: center; }
.note-card-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.note-card-actions .btn { font-family: inherit; font-size: 14px; cursor: pointer; }
.note-card-actions [hidden] { display: none; }

/* 目录抽屉的两栏：目录 / 我的笔记 */
.drawer-tabs { display: flex; gap: 22px; margin-top: 6px; }
.drawer-tabs button { padding: 4px 0 6px; white-space: nowrap; background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.3; cursor: pointer; }
.drawer-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--c); }
.drawer-head .drawer-tabs small { display: inline; margin-left: 4px; color: var(--muted); font-family: var(--sans); font-size: 13px; font-weight: 400; }
.drawer-notes { flex: 1; padding: 4px 24px 24px; overflow-y: auto; }

/* 笔记列表 */
.notes-empty { margin: 16px 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.notes-group h3 { margin: 18px 0 4px; font-family: var(--serif); font-size: 15px; font-weight: 700; }
.notes-group:first-child h3 { margin-top: 8px; }
.note-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.note-item-quote { margin: 0; padding-left: 10px; border-left: 3px solid var(--c); font-family: var(--serif); font-size: 15px; line-height: 1.8; }
.note-item-text { margin: 8px 0 0; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.note-item-text::before { content: "想法："; color: var(--muted); }
.note-item-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.note-item-acts { display: flex; gap: 16px; }
.note-item-acts a, .note-item-acts button {
  padding: 4px 0; background: none; color: var(--ink); border: 0;
  font: inherit; font-size: 13px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; cursor: pointer;
}
.notes-foot { margin-top: 18px; }
.notes-foot-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.notes-foot .btn { font-family: inherit; font-size: 14px; cursor: pointer; }
.notes-foot p { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.notes-foot .notes-remind { color: var(--accent-ink, var(--ink)); font-size: 13px; }
/* 正文里的“备份笔记”“恢复笔记”：看起来是链接，实际是按钮 */
.notes-link { display: inline; margin: 0 2px; padding: 0; color: var(--ink); background: none; border: 0; font: inherit; text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 3px; cursor: pointer; }
.note-book-imgs figure { margin: 0 0 16px; text-align: center; }
.note-book-imgs .btn { display: inline-block; padding: 8px 18px; font-size: 14px; }
.note-restore-msg { min-height: 1.4em; margin: 8px 0 0; color: var(--accent-ink, var(--ink)); font-size: 13px; line-height: 1.6; }
.note-restore-msg:empty { min-height: 0; }

/* 第一次打开阅读页时的提示 */
.note-hint {
  position: fixed; z-index: 44; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  display: flex; align-items: flex-start; gap: 10px;
  width: calc(100vw - 32px); max-width: 420px; padding: 12px 10px 12px 16px;
  transform: translateX(-50%);
  background: #2A2420; color: #FFFFFF; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  font: 14px/1.6 var(--sans);
}
.note-hint button { flex: none; width: 28px; height: 28px; padding: 0; background: none; color: #FFFFFF; border: 0; font-size: 20px; line-height: 1; cursor: pointer; opacity: .8; }
.share-end .share-end-tip { margin: 14px 0 0; color: var(--muted); font-family: var(--sans); font-size: 13px; }

@media (min-width: 760px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 56px; }   /* 三本书铺满一行，和开头、其他栏目同宽 */
  .shelf-title { font-size: 18px; }
  .shelf-meta { font-size: 13px; }
  .shelf-item .cover { margin-bottom: 22px; }   /* 封面和书名之间留得开一些 */
  .shelf-intro { display: block; margin-top: 12px; color: var(--muted); font-family: var(--serif); font-size: 14px; line-height: 1.75; }   /* 书名、状态和下面的短介之间空开 */
  .book-page { padding-top: 36px; }
  .book-head { grid-template-columns: 180px minmax(0, 1fr); gap: 36px; }
  .book-info h1 { margin-top: 6px; font-size: 36px; }
  .book-author { font-size: 16px; }
  .book-intro { margin-top: 16px; font-size: 18px; }
  .book-stats { margin-top: 36px; padding: 18px 0; }
  .book-stats dd { font-size: 26px; }
  .book-actions { justify-content: center; }
  .book-actions .btn-read { flex: 0 1 auto; min-width: 240px; }
}
/* 很窄的手机：书页封面再小一点 */
@media (max-width: 359px) {
  .book-head { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .book-info h1 { font-size: 21px; }
  .shelf { gap: 24px 12px; }
  .shelf-title { font-size: 14px; }
}
/* 手机：写想法的框放在屏幕上方，弹出键盘时不被挡住 */
@media (max-width: 759px) {
  .share-panel.note-sheet {
    top: 0; bottom: auto;
    padding-top: calc(16px + env(safe-area-inset-top));
    border-width: 0 0 1px; border-radius: 0 0 16px 16px;
    animation: note-down .2s ease-out;
  }
  @keyframes note-down { from { transform: translateY(-24px); opacity: 0; } }
}
@media (min-width: 1000px) {
  .note-hint { bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-item .cover, .chev { transition: none; }
  .p-flash, .share-panel.note-sheet { animation: none; }
}
