/* ==========================================================================
   个人小说站 · 前台样式
   主色：丁香紫 Sheer Lilac #B793C0
   设计语言：色卡（色块 + 白色标签）、深紫墨色文字、细线分隔
   ========================================================================== */
:root {
  color-scheme: light;

  /* 丁香紫色阶（以 #B793C0 为 400） */
  --lilac-50:  #faf6fb;
  --lilac-100: #f4ecf6;
  --lilac-200: #e8daec;
  --lilac-300: #d4bedb;
  --lilac:     #b793c0;
  --lilac-500: #a27dac;
  --lilac-600: #8a6495;
  --lilac-700: #714d7b;
  --lilac-800: #56395e;
  --lilac-900: #36253b;

  /* 带紫调的中性色 */
  --ink:       #231a26;
  --ink-2:     #53475a;
  --muted:     #776b7c;
  --line:      #ebe3ee;
  --line-2:    #dacfde;
  --bg:        #fbf9fc;
  --surface:   #ffffff;
  --surface-2: #f6f1f8;

  /* 语义色（降低饱和度以配合主色） */
  --ok: #2f7a5b;      --ok-soft: #e4f3ec;
  --warn: #93600f;    --warn-soft: #fbf0d9;
  --danger: #b03a48;  --danger-soft: #fbe6e9;
  --info: var(--lilac-700); --info-soft: var(--lilac-100);

  /* 兼容旧变量名 */
  --accent: var(--lilac-700);
  --accent-2: var(--lilac-800);
  --accent-soft: var(--lilac-100);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(35, 26, 38, .06);
  --shadow: 0 1px 2px rgba(35, 26, 38, .05), 0 8px 24px rgba(35, 26, 38, .07);
  --shadow-lg: 0 20px 50px rgba(35, 26, 38, .18);
  --shadow-chip: 0 1px 2px rgba(35, 26, 38, .07), 0 8px 22px rgba(35, 26, 38, .08);
  --ring: 0 0 0 3px rgba(183, 147, 192, .4);

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1180px;
  --header-h: 64px;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lilac-200); color: var(--ink); }
a { color: var(--lilac-700); text-decoration: none; transition: color .15s; }
a:hover { color: var(--lilac-800); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: .86em; background: var(--surface-2); color: var(--lilac-800); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--lilac-600); outline-offset: 2px; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.spacer { flex: 1; }
.link { color: var(--lilac-700); font-weight: 600; }
.inline-form { display: inline; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.site-main { flex: 1; }
.page { padding: 40px 20px 64px; }
.page-narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.page-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--lilac-700); }
.page-kicker::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--lilac); }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.back-link:hover { color: var(--lilac-700); }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 4px solid var(--lilac);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: stretch; gap: 32px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .02em; }
.brand:hover { color: var(--ink); }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--lilac);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, .22);
}
.main-nav { flex: 1; display: flex; align-items: stretch; gap: 2px; }
.main-nav a { position: relative; display: flex; align-items: center; padding: 0 14px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.main-nav a:hover { color: var(--ink); }
.main-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--lilac); transform: scaleX(0); transition: transform .2s ease; }
.main-nav a:hover::after { transform: scaleX(.35); }
.main-nav a.active { color: var(--ink); }
.main-nav a.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--lilac-100); color: var(--ink); }
.badge-dot { position: absolute; top: 1px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid #fff; border-radius: 10px; background: var(--lilac-700); color: #fff; font-size: 10px; font-weight: 800; line-height: 15px; text-align: center; }

.dropdown { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 3px 14px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.user-btn:hover, .dropdown.open .user-btn { border-color: var(--lilac-300); box-shadow: var(--ring); }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--lilac); color: var(--ink); font-size: 13px; font-weight: 800; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 224px; padding: 0 6px 6px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.dropdown-menu::before { content: ""; display: block; height: 4px; margin: 0 -6px 6px; background: var(--lilac); }
.dropdown.open .dropdown-menu { display: block; animation: dropIn .16s ease; }
.dropdown-menu a, .dropdown-item { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-item:hover { background: var(--lilac-50); color: var(--ink); }
.dropdown-menu .admin-link { color: var(--lilac-700); font-weight: 700; }
.dropdown-sep { height: 1px; margin: 6px 6px; background: var(--line); }
.nav-toggle { display: none; align-self: center; width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.nav-toggle:hover { background: var(--lilac-100); }
.nav-toggle span { width: 20px; height: 2px; border-radius: 2px; background: var(--ink); }

.site-notice { background: var(--lilac-100); border-bottom: 1px solid var(--lilac-200); color: var(--lilac-900); font-size: 14px; }
.notice-inner { display: flex; align-items: baseline; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.notice-label { flex-shrink: 0; padding: 1px 8px; border-radius: 4px; background: var(--lilac); color: var(--ink); font-size: 12px; font-weight: 800; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 72px; background: var(--ink); color: #cbbfd0; border-top: 4px solid var(--lilac); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; padding-top: 40px; padding-bottom: 28px; font-size: 13px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.footer-brand:hover { color: #fff; }
.footer-brand .brand-mark { width: 30px; height: 30px; font-size: 15px; }
.footer-tagline { margin: 10px 0 0; color: #a99cae; }
.footer-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 22px; font-weight: 600; }
.footer-links a { color: var(--lilac-300); }
.footer-links a:hover { color: #fff; }
.footer-note { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .09); color: #93869a; font-size: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--lilac); color: var(--ink); }
.btn-primary:hover { background: var(--lilac-500); color: var(--ink); }
.btn-accent { background: var(--ink); color: #fff; }
.btn-accent:hover { background: var(--lilac-800); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--lilac-50); border-color: var(--lilac-300); color: var(--ink); }
.btn-outline { background: transparent; border-color: rgba(35, 26, 38, .45); color: var(--ink); }
.btn-outline:hover { background: rgba(255, 255, 255, .28); border-color: var(--ink); color: var(--ink); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #256349; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #922d39; color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- 表单 ---------- */
.form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field > span small { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a296a7; }
input:hover, select:hover, textarea:hover { border-color: var(--lilac-300); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lilac-600); box-shadow: var(--ring); }
input[disabled], select[disabled], textarea[disabled] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input[type=file] { padding: 7px; font-size: 14px; background: var(--surface-2); cursor: pointer; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 0; border-radius: 4px; background: var(--lilac); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23776b7c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}
input[type=range] { accent-color: var(--lilac-600); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { flex-shrink: 0; width: 17px; height: 17px; margin: 0; accent-color: var(--lilac-600); }
.check.danger { color: var(--danger); }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.check-row.indent { padding: 10px 0 0 26px; }
.radio-stack { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.form-row.between { justify-content: space-between; margin-bottom: 18px; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .field-full, .field-full { grid-column: 1 / -1; }
.search-form { display: flex; gap: 8px; }
.search-form input { min-width: 290px; }

/* ---------- 卡片 / 状态 ---------- */
.card { margin-bottom: 20px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card > h2 { margin-bottom: 18px; font-size: 17px; font-weight: 800; }
.card > h2::before, .card-head h2::before, .section-head h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 10px 2px 0;
  border-radius: 2px;
  background: var(--lilac);
  vertical-align: middle;
}
.empty-state { padding: 56px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty-state::before { content: ""; display: block; width: 44px; height: 58px; margin: 0 auto 18px; border-radius: 3px; background: linear-gradient(var(--lilac) 0 66%, #fff 66%); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-chip); }
.empty-state.small { padding: 24px; }
.empty-state.small::before { display: none; }
.empty-state p { margin-bottom: 16px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--lilac-100); color: var(--lilac-700); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

.alert { margin-bottom: 16px; padding: 12px 16px; border-left: 4px solid; border-radius: var(--radius-sm); font-size: 14px; }
.alert-warn { background: var(--warn-soft); color: #6f4a0b; border-color: #e0b35a; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.alert-info { background: var(--lilac-50); color: var(--lilac-800); border-color: var(--lilac); }

/* ---------- 提示条 ---------- */
.flash-stack { padding-top: 18px; }
.flash { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 12px 14px 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--lilac); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px; box-shadow: var(--shadow-sm); animation: fadeIn .2s ease; transition: opacity .2s; }
.flash > span { flex: 1; }
.flash-success { border-left-color: var(--ok); background: #f5fbf8; }
.flash-error { border-left-color: var(--danger); background: #fdf6f7; color: #7d2230; }
.flash-info { border-left-color: var(--lilac); background: var(--lilac-50); }
.flash-close { padding: 0 4px; border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; opacity: .5; cursor: pointer; }
.flash-close:hover { opacity: 1; }

/* ---------- 首页主视觉 ---------- */
.hero { position: relative; overflow: hidden; background: var(--lilac); color: var(--ink); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(900px 420px at 88% -10%, rgba(255, 255, 255, .3), transparent 62%), radial-gradient(700px 380px at -8% 115%, rgba(86, 57, 94, .2), transparent 60%); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 48px; padding-top: 76px; padding-bottom: 84px; }
.hero-solo { grid-template-columns: minmax(0, 1fr); }
.hero h1 { margin-bottom: 18px; font-family: var(--font-display); font-size: 58px; font-weight: 800; line-height: 1.06; letter-spacing: -.025em; color: var(--ink); overflow-wrap: anywhere; }
.hero-tagline { max-width: 32em; margin-bottom: 32px; font-size: 18px; color: var(--lilac-900); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; height: 400px; }
.fan-chip { position: absolute; left: 50%; top: 50%; width: 204px; margin: -148px 0 0 -102px; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(35, 26, 38, .08), 0 26px 54px rgba(35, 26, 38, .24); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.fan-chip, .fan-chip:hover { color: var(--ink); }
.fan-front { z-index: 3; transform: translateY(-8px); }
.fan-left { z-index: 1; transform: translate(-118px, 22px) rotate(-11deg); }
.fan-right { z-index: 2; transform: translate(118px, 22px) rotate(11deg); }
.hero-art:hover .fan-front { transform: translateY(-18px); }
.hero-art:hover .fan-left { transform: translate(-148px, 26px) rotate(-15deg); }
.hero-art:hover .fan-right { transform: translate(148px, 26px) rotate(15deg); }
/* 只有一本书：居中略微倾斜 */
.fan-single { z-index: 1; transform: translateY(-6px) rotate(-4deg); }
.hero-art:hover .fan-single { transform: translateY(-16px) rotate(-2deg); }
/* 两本书：第一本在右上层，第二本在左下层 */
.fan-pair-front { z-index: 2; transform: translate(66px, -6px) rotate(6deg); }
.fan-pair-back { z-index: 1; transform: translate(-66px, 16px) rotate(-7deg); }
.hero-art:hover .fan-pair-front { transform: translate(88px, -14px) rotate(8deg); }
.hero-art:hover .fan-pair-back { transform: translate(-88px, 18px) rotate(-10deg); }
.fan-cover { aspect-ratio: 1 / 1.02; background: var(--lilac-300); }
.fan-cover img { width: 100%; height: 100%; object-fit: cover; }
.fan-label { padding: 12px 14px 16px; line-height: 1.3; }
.fan-label b { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fan-label span { display: block; margin-top: 5px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fan-right .fan-label { text-align: right; }
.fan-label em { display: block; margin-top: 1px; font-size: 15px; font-style: normal; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 版块 ---------- */
.section { padding: 52px 20px 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.section-head h2 small { margin-left: 8px; font-family: var(--font-ui); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.link-more:hover { color: var(--lilac-700); }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px 24px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color .2s, box-shadow .2s; }
.feature:hover { border-color: var(--lilac-300); box-shadow: var(--shadow); }
.feature-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 10px; background: var(--lilac); color: var(--ink); }
.feature:nth-child(2) .feature-icon { background: var(--lilac-200); }
.feature:nth-child(3) .feature-icon { background: var(--ink); color: var(--lilac-300); }
.feature h3 { margin-bottom: 8px; font-size: 17px; font-weight: 800; }
.feature p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* ---------- 书籍色卡 ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 30px 22px; }
.book-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 4px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-chip); transition: transform .22s ease, box-shadow .22s ease; }
.book-card:hover { color: var(--ink); transform: translateY(-5px); box-shadow: 0 2px 4px rgba(35, 26, 38, .08), 0 24px 46px rgba(35, 26, 38, .17); }
.book-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--lilac-200); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.book-card:hover .book-cover img { transform: scale(1.035); }
.book-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.book-code { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.book-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 800; line-height: 1.35; }
.book-sub { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 2px; font-size: 12px; color: var(--muted); }
.book-sub span + span::before { content: "·"; margin-right: 8px; color: var(--line-2); }
.book-desc, .book-progress { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.book-progress { color: var(--lilac-700); font-weight: 700; }

.cover-tag { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 800; line-height: 1.4; letter-spacing: .04em; }
.tag-paid { background: var(--ink); color: #fff; }
.tag-free { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(35, 26, 38, .18); }
.tag-done { left: auto; right: 10px; background: var(--lilac); color: var(--ink); }

/* 无封面时的占位：竖排书名 + 细框，颜色取丁香紫系 */
.cover-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
  background: var(--lilac);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .3em;
  text-align: center;
  writing-mode: vertical-rl;
}
.cover-placeholder::before { content: ""; position: absolute; inset: 10px; border: 1px solid currentColor; opacity: .3; }
.cover-placeholder.small { padding: 6px; font-size: 13px; letter-spacing: .12em; }
.cover-placeholder.small::before { inset: 4px; }
.cover-placeholder.large { font-size: 34px; }
.tone-0 { background: var(--lilac); color: var(--ink); }
.tone-1 { background: var(--lilac-300); color: var(--lilac-900); }
.tone-2 { background: var(--lilac-700); color: var(--lilac-100); }
.tone-3 { background: var(--lilac-100); color: var(--lilac-800); }
.tone-4 { background: var(--lilac-900); color: var(--lilac-300); }

/* ---------- 继续阅读 ---------- */
.continue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.continue-card { display: flex; align-items: center; gap: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.continue-card:hover { color: var(--ink); border-color: var(--lilac-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.continue-cover { flex-shrink: 0; width: 58px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 3px; background: var(--lilac-200); box-shadow: var(--shadow-sm); }
.continue-cover img { width: 100%; height: 100%; object-fit: cover; }
.continue-body { flex: 1; min-width: 0; }
.continue-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-sub { margin: 2px 0 9px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-time { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 11px; color: var(--muted); }
.continue-time b { color: var(--lilac-700); font-weight: 800; }
.progress-bar { height: 5px; overflow: hidden; border-radius: 5px; background: var(--lilac-100); }
.progress-bar span { display: block; height: 100%; border-radius: 5px; background: var(--lilac); }

/* ---------- 书库 ---------- */
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--lilac); background: var(--lilac-50); color: var(--ink); }
.chip.active { border-color: var(--lilac); background: var(--lilac); color: var(--ink); font-weight: 700; }
.chip-warn { border-color: transparent; background: var(--warn-soft); color: var(--warn); }
.sort-group { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sort-group select { width: auto; padding: 7px 34px 7px 14px; border-radius: 999px; font-size: 13px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 30px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.tag::before { content: "#"; color: var(--lilac-600); }
.tag small { margin-left: 2px; font-weight: 500; color: var(--muted); }
.tag:hover { background: var(--lilac-100); color: var(--lilac-800); }
.tag.active { background: var(--lilac); color: var(--ink); }
.tag.active::before { color: var(--ink); }

/* ---------- 书籍详情 ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.crumbs a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.crumbs a:hover { color: var(--lilac-700); text-decoration-color: currentColor; }
.crumbs span:last-child { max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-heading { margin: 0 0 30px; font-family: var(--font-display); font-size: 42px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.book-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; gap: 48px; margin-bottom: 52px; }
.book-chip { overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(35, 26, 38, .06), 0 20px 44px rgba(35, 26, 38, .15); }
.book-chip-cover { aspect-ratio: 3 / 4; background: var(--lilac-200); }
.book-chip-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-chip-label { padding: 16px 20px 22px; line-height: 1.3; }
.book-chip-label b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: .03em; }
.book-chip-label span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.book-chip-label em { display: block; margin-top: 2px; font-size: 18px; font-style: normal; font-weight: 800; }
.book-hero-body { min-width: 0; }
.book-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.book-facts { margin: 0 0 22px; border-top: 1px solid var(--line); }
.book-facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.book-facts dt { font-weight: 600; color: var(--muted); }
.book-facts dd { margin: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.book-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.book-paynote { margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--lilac-100); border-radius: var(--radius-sm); background: var(--lilac-50); font-size: 13px; color: var(--ink-2); }
.book-section { margin-bottom: 44px; }
.book-description { padding: 26px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); font-family: var(--font-serif); font-size: 16px; line-height: 1.95; color: var(--ink-2); }
.book-description p { text-indent: 2em; }
.book-description p:last-child { margin-bottom: 0; }
.chapter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 2px 12px; margin: 0; padding: 8px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.chapter-list li a, .chapter-link-disabled { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); font-size: 14px; }
.chapter-list li a:hover { background: var(--lilac-50); color: var(--ink); }
.chapter-no { flex-shrink: 0; min-width: 40px; padding: 1px 4px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.chapter-list li a:hover .chapter-no, .chapter-list li.current .chapter-no { background: var(--lilac); color: var(--ink); }
.chapter-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.chapter-list li.current a { background: var(--lilac-100); font-weight: 700; }
.chapter-list li.current .chapter-meta { color: var(--lilac-700); font-weight: 700; }
.chapter-list li.draft a { opacity: .6; }
.chapter-list li.locked .chapter-link-disabled { color: var(--muted); cursor: not-allowed; }

/* ---------- 书架 ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 26px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 12px 14px; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab small { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--lilac); transform: scaleX(0); transition: transform .2s ease; }
.tab.active { color: var(--ink); }
.tab.active::after { transform: scaleX(1); }
.tab.active small { background: var(--lilac); color: var(--ink); }
.shelf-list { display: flex; flex-direction: column; gap: 12px; }
.shelf-item { display: flex; align-items: center; gap: 18px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.shelf-item:hover { border-color: var(--lilac-300); box-shadow: var(--shadow); }
.shelf-cover { flex-shrink: 0; width: 64px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 3px; background: var(--lilac-200); box-shadow: var(--shadow-sm); }
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; }
.shelf-body { flex: 1; min-width: 0; }
.shelf-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.shelf-title:hover { color: var(--lilac-700); }
.shelf-sub { margin: 3px 0 10px; font-size: 13px; color: var(--muted); }
.shelf-time { margin-top: 8px; font-size: 12px; color: var(--muted); }
.shelf-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.shelf-actions .btn { width: 100%; }
.note-list { display: flex; flex-direction: column; gap: 10px; }
.note-item { display: block; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--lilac); border-radius: var(--radius-sm); color: var(--ink); transition: box-shadow .15s, border-color .15s; }
.note-item:hover { color: var(--ink); border-color: var(--lilac-300); border-left-color: var(--lilac-600); box-shadow: var(--shadow); }
.note-head { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.note-head b { color: var(--ink); }
.note-quote { padding-left: 12px; border-left: 2px solid var(--lilac-200); font-family: var(--font-serif); font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.note-body { white-space: pre-wrap; line-height: 1.75; }
.note-time { margin-top: 10px; font-size: 12px; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { padding: 18px 12px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.stat:first-child { background: var(--lilac); border-color: var(--lilac); }
.stat:first-child span { color: var(--lilac-900); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table th { border-bottom-color: var(--line-2); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--lilac-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-sm th, .table-sm td { padding: 8px 10px; font-size: 13px; }
.table-sm th { font-size: 11px; }

/* ---------- 消息 / 工单 ---------- */
.message-list { display: flex; flex-direction: column; gap: 12px; }
.message-item { padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.message-item.unread { border-color: var(--lilac-300); box-shadow: inset 4px 0 0 var(--lilac); }
.message-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.message-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.message-meta { font-size: 12px; color: var(--muted); }
.message-body { line-height: 1.75; color: var(--ink-2); }
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ticket-item:hover { color: var(--ink); border-color: var(--lilac-300); box-shadow: var(--shadow); }
.ticket-main { min-width: 0; }
.ticket-subject { font-weight: 700; }
.ticket-meta { margin-top: 2px; font-size: 12px; color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.thread-msg { max-width: 84%; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; }
.thread-msg.from-user { align-self: flex-end; background: var(--lilac-100); border-color: var(--lilac-200); border-radius: 14px 14px 4px 14px; }
.thread-msg.from-admin { align-self: flex-start; }
.thread-meta { margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.thread-meta b { color: var(--ink); }
.thread-body { white-space: pre-wrap; line-height: 1.75; }

/* ---------- 登录 / 注册 / 结果页（色卡样式） ---------- */
.auth-wrap { display: flex; align-items: flex-start; justify-content: center; padding: 56px 20px 24px; }
.auth-card { width: 100%; max-width: 440px; overflow: hidden; border-radius: 6px; background: var(--surface); box-shadow: 0 2px 4px rgba(35, 26, 38, .05), 0 26px 64px rgba(35, 26, 38, .13); }
.auth-swatch { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; height: 132px; padding: 20px 24px; overflow: hidden; background: var(--lilac); color: var(--ink); }
.auth-swatch::before { content: ""; position: absolute; right: -50px; top: -70px; width: 210px; height: 210px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.auth-mark { position: relative; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .38); color: var(--ink); }
.auth-code { position: relative; font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: .22em; color: var(--lilac-900); text-align: right; }
.auth-swatch.is-danger { background: #d9a3ad; }
.auth-body { padding: 28px 32px 30px; }
.auth-card h1 { margin-bottom: 6px; font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.auth-sub { margin-bottom: 0; font-size: 14px; color: var(--muted); }
.auth-card .form { margin-top: 24px; }
.auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.auth-foot { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot a { font-weight: 700; }
.ban-reason { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 14px; }
.error-card .auth-swatch { height: 176px; }
.error-code { position: relative; font-family: var(--font-display); font-size: 92px; font-weight: 800; line-height: .82; letter-spacing: -.04em; color: var(--ink); }

/* ---------- 分页 ---------- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }
.page-link { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.page-link:hover { border-color: var(--lilac); background: var(--lilac-50); color: var(--ink); }
.page-link.current { border-color: var(--lilac); background: var(--lilac); color: var(--ink); font-weight: 800; }
.page-link.disabled { opacity: .4; pointer-events: none; }
.page-gap, .page-info { padding: 0 6px; font-size: 13px; color: var(--muted); }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(35, 26, 38, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-lg); animation: popIn .22s cubic-bezier(.2, .8, .2, 1); }
.modal-card > form { display: flex; flex-direction: column; min-height: 0; }
.modal-head { padding: 22px 26px 18px; background: var(--lilac); }
.modal-head h3 { margin: 4px 0 0; font-size: 19px; font-weight: 800; color: var(--ink); }
.modal-tag { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--lilac-900); }
.modal-time { margin-top: 2px; font-size: 12px; color: var(--lilac-900); }
.modal-body { padding: 20px 26px 8px; overflow: auto; line-height: 1.8; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 26px 22px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1040px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 60px; padding-bottom: 68px; }
  .hero-art { display: none; }
  .hero h1 { font-size: 46px; }
}
@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .book-hero { grid-template-columns: 230px minmax(0, 1fr); gap: 30px; }
  .book-heading { font-size: 34px; }
}
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .header-inner { gap: 12px; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; padding: 8px 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 8px; }
  .main-nav a::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; border-radius: 0 3px 3px 0; transform: scaleY(0); }
  .main-nav a:hover::after { transform: scaleY(0); }
  .main-nav a.active { background: var(--lilac-50); }
  .main-nav a.active::after { transform: scaleY(1); }
  .header-actions { margin-left: auto; }
  .nav-toggle { display: flex; }
  .user-name { display: none; }
  .user-btn { padding: 2px; }
  .brand { font-size: 17px; }
  .hero-inner { padding-top: 44px; padding-bottom: 52px; }
  .hero h1 { font-size: 38px; }
  .hero-tagline { font-size: 16px; margin-bottom: 26px; }
  .section { padding-top: 38px; }
  .section-head h2 { font-size: 21px; }
  .feature-row { grid-template-columns: 1fr; }
  .page { padding: 28px 16px 48px; }
  .page-head h1 { font-size: 28px; }
  .book-heading { font-size: 28px; margin-bottom: 22px; }
  .book-hero { grid-template-columns: 1fr; gap: 26px; }
  .book-chip { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: end; }
  .book-chip-label { padding: 14px 16px 16px; }
  .book-chip-label b { font-size: 16px; }
  .book-chip-label span { font-size: 13px; }
  .book-chip-label em { font-size: 16px; }
  .book-chip .cover-placeholder.large { padding: 10px; font-size: 18px; letter-spacing: .16em; }
  .book-chip .cover-placeholder.large::before { inset: 6px; }
  .book-facts > div { grid-template-columns: 80px minmax(0, 1fr); font-size: 14px; }
  .book-actions .btn-lg { flex: 1 1 auto; }
  .book-description { padding: 20px; font-size: 15px; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 20px 14px; }
  .book-meta { padding: 10px 11px 12px; }
  .chapter-list { grid-template-columns: 1fr; }
  .shelf-item { flex-wrap: wrap; }
  .shelf-actions { flex-direction: row; width: 100%; }
  .shelf-actions > * { flex: 1; }
  .search-form { width: 100%; }
  .search-form input { min-width: 0; }
  .auth-wrap { padding-top: 24px; }
  .auth-body { padding: 24px 22px 26px; }
  .thread-msg { max-width: 100%; }
  .table-wrap > .table { min-width: 620px; }
  .footer-inner { grid-template-columns: 1fr; }
  .site-footer { margin-top: 56px; }
}
