:root {
  color-scheme: light;
  --paper: #f3fbf8;
  --paper-deep: #dcefeb;
  --ink: #173234;
  --ink-soft: #607a7b;
  --teal: #2d7f80;
  --blue: #6aa4b3;
  --cinnabar: #b85b4a;
  --celadon: #cce7e0;
  --line: rgba(45, 127, 128, 0.18);
  --shadow: 0 18px 44px rgba(65, 128, 132, 0.14);
  --reader-font-size: 19px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 2%, rgba(128, 204, 201, 0.22), transparent 26rem),
    linear-gradient(180deg, #f7fffc 0%, #e6f5f1 100%);
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  letter-spacing: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.home-page {
  position: relative;
  min-height: 100%;
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 0%, rgba(118, 176, 224, 0.22), transparent 19rem),
    radial-gradient(circle at 88% 12%, rgba(194, 225, 231, 0.28), transparent 18rem),
    linear-gradient(180deg, #f4f9fd 0%, #eef6fa 55%, #f8fbfd 100%);
  color: #263342;
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
}

.home-shell {
  width: min(100% - 32px, 900px);
  margin: 0 auto;
  padding: max(124px, calc(104px + env(safe-area-inset-top))) 0 26px;
}

.compact-page .home-shell {
  width: min(100% - 32px, 940px);
  padding-top: max(26px, calc(18px + env(safe-area-inset-top)));
}

.home-masthead {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  left: 24px;
  right: 24px;
  min-height: 78px;
  overflow: hidden;
  z-index: 5;
}

.masthead-main {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.brand-lockup {
  display: inline-grid;
  width: max-content;
  gap: 5px;
  justify-items: center;
  justify-self: start;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  display: inline-grid;
  grid-template-columns: repeat(2, auto) 22px repeat(2, auto);
  gap: 3px;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0 0 4px;
  border-bottom: 1px solid rgba(92, 142, 200, 0.26);
  color: #273447;
  background: transparent;
  font-size: clamp(24px, 5.2vw, 34px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 18px rgba(83, 116, 152, 0.13);
}

.site-logo i {
  display: block;
  width: 18px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #6d9fd2, transparent);
}

.brand-copy {
  width: 100%;
  text-align: center;
}

.masthead-main p {
  margin: 0;
  color: #6d7c8e;
  font-size: clamp(15px, 4vw, 22px);
  line-height: 1.5;
}

.masthead-main .site-slogan {
  color: #4f83cf;
  font-size: clamp(12px, 2.4vw, 15px);
  letter-spacing: 0.04em;
}

.author-chip {
  display: grid;
  grid-template-columns: 56px auto;
  gap: 11px;
  align-items: center;
  color: #2c3a4c;
}

.author-avatar {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(112, 156, 198, 0.26);
  border-radius: 999px;
  background: linear-gradient(145deg, #f8fbff, #d7e8f5);
  color: #5c8ec8;
  box-shadow: 0 12px 28px rgba(79, 123, 168, 0.12);
  font-weight: 800;
}

.author-chip strong,
.author-chip small {
  display: block;
}

.author-chip small {
  margin-top: 4px;
  color: #7b8796;
}

.novel-card,
.home-card {
  border: 1px solid rgba(168, 190, 210, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 52px rgba(78, 118, 154, 0.12);
  backdrop-filter: blur(18px);
}

.novel-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 24px);
  padding: clamp(18px, 4vw, 34px);
}

.novel-identity {
  display: grid;
  grid-template-columns: minmax(132px, 38%) 1fr;
  gap: clamp(18px, 5vw, 42px);
  align-items: center;
}

.novel-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 32px rgba(56, 93, 132, 0.18);
}

.novel-info {
  min-width: 0;
}

.novel-info .tag-row {
  margin-bottom: 20px;
}

.novel-info h2 {
  margin: 0 0 14px;
  color: #202a38;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.16;
}

.novel-line {
  margin: 0 0 24px;
  color: #5d8ec7;
  font-size: clamp(15px, 2.6vw, 19px);
  line-height: 1.5;
}

.novel-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 20px;
  padding: 20px 0;
  border-top: 1px solid rgba(168, 190, 210, 0.42);
  border-bottom: 1px solid rgba(168, 190, 210, 0.42);
}

.novel-metrics dt {
  color: #6f7f91;
  font-size: 14px;
}

.novel-metrics dd {
  margin: 8px 0 0;
  color: #3b6fae;
  font-size: 22px;
}

.latest-line {
  margin: 0 0 20px;
  color: #657586;
  line-height: 1.8;
}

.latest-line span,
.latest-line strong {
  display: block;
  white-space: nowrap;
}

.latest-line strong {
  color: #2d3746;
  font-weight: 500;
}

.novel-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.novel-actions > * {
  min-width: 0;
}

.read-button,
.novel-actions .follow-button {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  white-space: nowrap;
  font-weight: 800;
  font-size: clamp(15px, 3.5vw, 18px);
}

.read-button {
  color: #fff;
  background: linear-gradient(135deg, #83b5eb, #4f83cf);
  box-shadow: 0 12px 24px rgba(79, 131, 207, 0.22);
}

.novel-actions .follow-button {
  margin: 0;
  color: #4f83cf;
  background: #edf5ff;
}

.home-card {
  margin-top: 28px;
  padding: clamp(20px, 5vw, 34px);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.card-title > span,
.card-title--split > div > span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #6b9bd0;
  box-shadow: 0 0 0 5px rgba(107, 155, 208, 0.1);
}

.card-title h2 {
  margin: 0;
  color: #202a38;
  font-size: clamp(24px, 6vw, 34px);
}

.card-title--split {
  justify-content: space-between;
}

.card-title--split > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-title--split > a {
  color: #7a8796;
}

.intro-card p {
  margin-bottom: 12px;
  color: #4b5665;
  font-size: clamp(17px, 4vw, 20px);
  line-height: 1.9;
}

.update-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.update-list li {
  border-top: 1px solid rgba(168, 190, 210, 0.34);
}

.update-list li:first-child {
  border-top: 0;
}

.update-list a,
.update-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  color: #2d3746;
  background: transparent;
  text-align: left;
}

.update-list button {
  opacity: 0.66;
}

.update-list strong {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 500;
}

.update-list time {
  color: #7a8796;
}

.update-list .is-new strong::after {
  content: "NEW";
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #5c8ec8;
  background: #eaf3ff;
  font-size: 12px;
  vertical-align: middle;
}

.update-list p {
  max-height: 0;
  margin: 0;
  padding-left: 0;
  overflow: hidden;
  color: #667385;
  line-height: 1.8;
  opacity: 0;
  transition:
    max-height 180ms ease,
    margin 180ms ease,
    opacity 160ms ease;
}

.update-list li:hover p,
.update-list li:focus-within p {
  max-height: 8em;
  margin: -2px 0 18px;
  opacity: 1;
}

.notice-body {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 26px;
  align-items: center;
}

.notice-body p {
  margin: 0;
  color: #4d5968;
  font-size: 18px;
  line-height: 1.85;
}

.notice-illustration {
  position: relative;
  height: 110px;
}

.notice-illustration::before {
  content: "";
  position: absolute;
  left: 44px;
  bottom: 18px;
  width: 18px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(180deg, #b7d4ee, #edf5ff);
  transform: rotate(-8deg);
}

.notice-illustration::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: 10px;
  width: 88px;
  height: 18px;
  border-radius: 50%;
  background: rgba(83, 116, 152, 0.12);
}

.notice-illustration span {
  position: absolute;
  left: 18px;
  top: 14px;
  width: 82px;
  height: 64px;
  background:
    radial-gradient(circle at 16px 18px, #b5d3ee 0 7px, transparent 8px),
    radial-gradient(circle at 42px 8px, #d6e8f7 0 8px, transparent 9px),
    radial-gradient(circle at 64px 26px, #a9cdeb 0 7px, transparent 8px);
}

.home-tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 32px), 900px);
  padding: 10px 12px;
  border: 1px solid rgba(168, 190, 210, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 38px rgba(78, 118, 154, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.home-tabbar a {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: #52606f;
  font-size: 13px;
  white-space: nowrap;
}

.home-tabbar span {
  font-size: 22px;
  line-height: 1;
}

.home-tabbar .is-active {
  color: #4f83cf;
  font-weight: 800;
}

.simple-page-head {
  margin-bottom: 14px;
}

.simple-page-head a {
  color: #5c8ec8;
  font-weight: 800;
}

.simple-page-head h1 {
  margin: 8px 0 8px;
  color: #273447;
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.08;
}

.simple-page-head p {
  margin: 0;
  color: #6d7c8e;
  font-size: 17px;
  line-height: 1.7;
}

.catalog-head {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.back-link {
  color: #5c8ec8;
  font-weight: 800;
}

.catalog-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.catalog-title-row h1 {
  margin: 0;
  color: #273447;
  font-size: clamp(34px, 9vw, 54px);
  line-height: 1;
}

.catalog-title-row span {
  padding: 7px 12px;
  border: 1px solid rgba(92, 142, 200, 0.2);
  border-radius: 999px;
  color: #5c8ec8;
  background: rgba(255, 255, 255, 0.58);
  font-weight: 800;
  white-space: nowrap;
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.catalog-stats div,
.catalog-toolbar,
.continue-reading {
  border: 1px solid rgba(168, 190, 210, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 36px rgba(78, 118, 154, 0.1);
}

.catalog-stats div {
  padding: 12px;
}

.catalog-stats dt {
  color: #7a8796;
  font-size: 12px;
}

.catalog-stats dd {
  margin: 5px 0 0;
  color: #2d3746;
  font-weight: 800;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 260px);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
}

.volume-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.volume-tabs::-webkit-scrollbar {
  display: none;
}

.volume-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: #607083;
  background: rgba(237, 245, 255, 0.65);
  font-weight: 800;
  white-space: nowrap;
}

.volume-tabs .is-active {
  color: #fff;
  background: #5c8ec8;
}

.volume-tabs small {
  min-width: 20px;
  border-radius: 999px;
  padding: 2px 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.24);
  font-size: 11px;
  text-align: center;
}

.volume-tabs__empty {
  padding: 9px 12px;
  color: #7a8796;
  font-weight: 800;
}

.chapter-search {
  position: relative;
}

.chapter-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.chapter-search input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(168, 190, 210, 0.45);
  border-radius: 999px;
  padding: 0 14px;
  color: #2d3746;
  background: #fff;
}

.continue-reading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
}

.continue-reading > span {
  color: #7a8796;
  font-size: 13px;
}

.continue-reading a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.continue-reading strong,
.continue-reading small {
  display: block;
}

.continue-reading small {
  color: #5c8ec8;
  white-space: nowrap;
}

.volume-card {
  margin-top: 14px;
}

.volume-card.is-locked {
  opacity: 0.66;
}

.volume-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.volume-head span,
.volume-head small {
  color: #7a8796;
  font-size: 13px;
}

.volume-head h2 {
  margin: 4px 0 0;
  color: #273447;
  font-size: 24px;
}

.catalog-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.catalog-list li {
  border-top: 1px solid rgba(168, 190, 210, 0.3);
}

.catalog-list li:first-child {
  border-top: 0;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.catalog-list a {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
}

.catalog-row button {
  min-height: 32px;
  border: 1px solid rgba(92, 142, 200, 0.2);
  border-radius: 999px;
  padding: 0 10px;
  color: #5c8ec8;
  background: rgba(237, 245, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chapter-summary {
  display: none;
  margin: -2px 0 14px 88px;
  color: #657586;
  font-size: 14px;
  line-height: 1.75;
}

.catalog-list li.is-open .chapter-summary {
  display: block;
}

.catalog-list span {
  color: #7a8796;
  font-variant-numeric: tabular-nums;
}

.catalog-list strong {
  color: #2d3746;
  font-weight: 600;
}

.catalog-list time {
  color: #8a95a3;
  font-size: 13px;
}

.catalog-empty {
  padding: 20px 0;
  color: #7a8796;
}

.extra-filter {
  display: flex;
  gap: 8px;
  margin: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.extra-filter::-webkit-scrollbar {
  display: none;
}

.extra-filter button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid rgba(92, 142, 200, 0.2);
  border-radius: 999px;
  padding: 0 13px;
  color: #5f7186;
  background: rgba(237, 245, 255, 0.7);
  font-weight: 800;
}

.extra-filter .is-active {
  border-color: rgba(92, 142, 200, 0.34);
  color: #fff;
  background: #5c8ec8;
  box-shadow: 0 10px 22px rgba(92, 142, 200, 0.18);
}

.extras-stage {
  border: 1px solid rgba(92, 142, 200, 0.16);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(246, 252, 255, 0.92), rgba(255, 255, 255, 0.76)),
    radial-gradient(circle at 12% 0%, rgba(116, 174, 211, 0.15), transparent 34%);
  box-shadow: 0 12px 28px rgba(102, 148, 175, 0.1);
}

.extras-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 96px;
}

.extra-card {
  display: grid;
  overflow: hidden;
  min-height: 0;
  border: 1px solid rgba(92, 142, 200, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(82, 130, 158, 0.12);
  scroll-margin-top: 18px;
}

.extra-card--article {
  min-height: auto;
}

.extra-card--profile {
  position: relative;
  justify-self: center;
  width: min(100%, 1080px);
  min-height: 0;
  background:
    radial-gradient(circle at 96% 5%, rgba(92, 142, 200, 0.12), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 248, 252, 0.92)),
    linear-gradient(90deg, rgba(92, 142, 200, 0.18), transparent 42%);
}

.extra-card--profile-photo {
  grid-template-columns: 268px minmax(0, 1fr);
}

.extra-card--profile .extra-card__media {
  display: block;
  min-height: 0;
  padding: 18px;
  background: linear-gradient(180deg, rgba(232, 243, 252, 0.58), rgba(255, 255, 255, 0.42));
}

.extra-card--profile .extra-card__media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(56, 99, 126, 0.12);
}

.extra-card--profile .extra-card__body {
  position: relative;
  gap: 12px;
  align-content: start;
  padding: 36px 34px 28px 34px;
}

.extra-card--image .extra-card__body,
.extra-card--gallery .extra-card__body {
  border-top: 1px solid rgba(92, 142, 200, 0.14);
}

.extra-card__media {
  display: block;
  min-height: min(58vh, 560px);
  background: rgba(241, 248, 252, 0.78);
}

.extra-card__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(58vh, 560px);
  object-fit: contain;
}

.extra-card--image .extra-card__media img {
  max-height: 680px;
}

.extra-card__body {
  display: grid;
  gap: 11px;
  align-content: start;
  padding: 22px 24px;
}

.extra-card__body span {
  color: #5c8ec8;
  font-size: 13px;
  font-weight: 900;
}

.extra-card__kicker {
  justify-self: start;
  border: 1px solid rgba(92, 142, 200, 0.18);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(238, 247, 253, 0.72);
  line-height: 1;
}

.extra-card__badge {
  position: absolute;
  top: 22px;
  right: 26px;
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(92, 142, 200, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  color: #5c8ec8;
  background: rgba(244, 250, 255, 0.84);
  font-size: 13px;
  font-weight: 900;
}

.extra-card__body h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.22;
  letter-spacing: 0;
}

.extra-card--profile .extra-card__body h2 {
  padding-right: 112px;
  font-size: clamp(34px, 4.6vw, 46px);
  line-height: 1.08;
}

.extra-card__body time {
  color: #78879a;
  font-size: 14px;
  line-height: 1.6;
}

.extra-card--profile .extra-card__body time {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  color: #8190a4;
  font-size: 14px;
  font-weight: 800;
}

.extra-card--profile .extra-card__body time b {
  color: #5c8ec8;
  font-size: 12px;
  font-weight: 900;
}

.extra-card__body p {
  margin: 4px 0 0;
  max-width: 44em;
  color: #526172;
  font-size: 17px;
  line-height: 1.95;
}

.extra-card__link {
  justify-self: start;
  margin-top: 4px;
  color: #4c85c5;
  font-weight: 800;
}

.extra-profile-preview,
.extra-profile {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
}

.extra-profile-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 780px;
  margin-top: 2px;
}

.extra-profile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.extra-profile-preview div,
.extra-profile div {
  min-width: 0;
  border: 1px solid rgba(92, 142, 200, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.extra-profile-preview div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: center;
  min-height: 58px;
  padding: 10px 16px;
  background: rgba(232, 243, 252, 0.72);
  border-color: rgba(92, 142, 200, 0.22);
}

.extra-profile-preview div::before {
  display: none;
}

.extra-profile-preview dt,
.extra-profile dt {
  margin: 0 0 4px;
  color: #6f8298;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.extra-profile-preview dd,
.extra-profile dd {
  margin: 0;
  color: #2d3746;
  font-size: 14px;
  line-height: 1.58;
  text-align: left;
}

.extra-profile-preview dd {
  overflow-wrap: normal;
  word-break: keep-all;
}

.extra-profile-status {
  margin: 0;
  max-width: 780px;
  border: 1px solid rgba(92, 142, 200, 0.14);
  border-radius: 8px;
  padding: 12px 16px;
  color: #526172;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(239, 248, 253, 0.72)),
    linear-gradient(135deg, transparent 68%, rgba(92, 142, 200, 0.11));
  font-size: 15px;
  line-height: 1.7;
}

.extra-profile-status::before {
  content: "“";
  margin-right: 10px;
  color: rgba(92, 142, 200, 0.55);
  font-size: 24px;
  font-weight: 900;
  vertical-align: -8px;
}

.extra-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

.extra-card--profile .extra-card__link {
  justify-self: start;
  margin-top: 0;
}

.extra-expand-button {
  justify-self: start;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #6aa5e5, #407fd0);
  box-shadow: 0 12px 24px rgba(64, 127, 208, 0.24);
  font-weight: 900;
}

.extra-profile-detail[hidden] {
  display: none;
}

.extra-profile-empty {
  margin: 0;
  border: 1px dashed rgba(89, 143, 210, 0.3);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.48);
}

@media (max-width: 640px) {
  .home-shell {
    width: min(100% - 28px, 900px);
    padding-top: max(82px, calc(68px + env(safe-area-inset-top)));
  }

  .compact-page .home-shell {
    width: min(100% - 28px, 900px);
    padding-top: max(18px, calc(12px + env(safe-area-inset-top)));
  }

  .home-masthead {
    left: 14px;
    right: 14px;
    min-height: 62px;
  }

  .masthead-main {
    gap: 10px;
  }

  .site-logo {
    grid-template-columns: repeat(2, auto) 22px repeat(2, auto);
    gap: 3px;
    font-size: clamp(21px, 6vw, 28px);
  }

  .site-logo i {
    width: 18px;
  }

  .author-chip {
    grid-template-columns: 48px;
    justify-items: center;
    gap: 6px;
    text-align: center;
  }

  .author-avatar {
    width: 42px;
    height: 42px;
  }

  .author-chip small {
    display: none;
  }

  .novel-card {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    padding: 11px;
  }

  .novel-identity {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
  }

  .novel-cover {
    align-self: start;
  }

  .novel-info {
    display: block;
  }

  .novel-info .tag-row {
    margin-bottom: 8px;
  }

  .home-page .tag-row span {
    padding: 5px 10px;
  }

  .novel-info h2 {
    margin-bottom: 4px;
    font-size: clamp(20px, 5.8vw, 23px);
  }

  .novel-line {
    margin-bottom: 8px;
    font-size: clamp(12px, 3.2vw, 14px);
    line-height: 1.45;
    white-space: nowrap;
  }

  .novel-metrics {
    grid-column: 1 / -1;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
  }

  .novel-metrics dt {
    font-size: 12px;
  }

  .novel-metrics dd {
    margin-top: 4px;
    font-size: 15px;
  }

  .latest-line {
    grid-column: 1 / -1;
    margin-bottom: 8px;
    font-size: clamp(12px, 3.35vw, 13px);
    line-height: 1.55;
  }

  .novel-actions {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .read-button,
  .novel-actions .follow-button {
    min-height: 38px;
    font-size: clamp(13px, 4vw, 18px);
  }

  .notice-body {
    grid-template-columns: 86px 1fr;
    gap: 18px;
  }

  .notice-body .read-button {
    grid-column: 1 / -1;
  }

  .notice-illustration {
    height: 86px;
  }

  .home-card {
    margin-top: 14px;
    padding: 16px;
  }

  .card-title {
    gap: 10px;
    margin-bottom: 12px;
  }

  .card-title h2 {
    font-size: clamp(20px, 5.2vw, 24px);
  }

  .intro-card p {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.75;
  }

  .update-list a,
  .update-list button {
    gap: 10px;
    padding: 12px 0;
  }

  .update-list strong {
    font-size: 15px;
  }

  .update-list time {
    font-size: 12px;
  }

  .update-list li.is-open p,
  .update-list li:first-child p,
  .update-list li:hover p,
  .update-list li:focus-within p {
    max-height: 7em;
    margin: -2px 0 12px;
    opacity: 1;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    padding: 9px;
  }

  .catalog-title-row {
    align-items: start;
  }

  .catalog-title-row h1 {
    font-size: clamp(27px, 8.5vw, 36px);
  }

  .catalog-stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .catalog-stats div {
    padding: 9px 10px;
  }

  .catalog-stats dt {
    font-size: 11px;
  }

  .catalog-stats dd {
    font-size: 15px;
  }

  .catalog-list a {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
  }

  .catalog-list time {
    grid-column: 2;
    margin-top: -4px;
    font-size: 12px;
  }

  .catalog-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .catalog-row button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .chapter-summary {
    margin: -4px 0 9px 72px;
    font-size: 12px;
    line-height: 1.55;
  }

  .volume-card {
    margin-top: 10px;
  }

  .volume-card.home-card {
    padding: 14px 16px;
  }

  .volume-head {
    margin-bottom: 6px;
  }

  .volume-head h2 {
    font-size: 21px;
  }

  .continue-reading,
  .continue-reading a {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .continue-reading {
    gap: 6px;
    margin-bottom: 10px;
    padding: 11px 12px;
  }

  .extra-filter {
    margin-left: -2px;
    margin-right: -2px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .extra-filter button {
    min-width: 0;
    width: 100%;
    min-height: 34px;
    padding: 0;
    font-size: clamp(12px, 3.35vw, 14px);
  }

  .extras-stage {
    padding: 10px;
  }

  .extras-board {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .extra-card--article {
    grid-column: auto;
  }

  .extra-card__body {
    gap: 8px;
    padding: 14px;
  }

  .extra-card__body h2 {
    font-size: 18px;
    line-height: 1.25;
  }

  .extra-card__body time {
    font-size: 12px;
  }

  .extra-card__body p {
    max-width: none;
    font-size: 14px;
    line-height: 1.72;
  }

  .extra-profile-preview,
  .extra-profile {
    grid-template-columns: 1fr;
  }

  .extra-card--profile-photo {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: stretch;
  }

  .extra-card--profile .extra-card__media {
    display: grid;
    align-items: start;
    padding: 12px 0 12px 12px;
  }

  .extra-card--profile .extra-card__media img {
    width: 80px;
    height: 120px;
    max-height: none;
    margin: 0 auto;
    object-fit: cover;
  }

  .extra-card--profile .extra-card__body {
    gap: 8px;
    padding: 12px;
    padding-right: 14px;
  }

  .extra-card__badge {
    top: 12px;
    right: 12px;
    min-height: 28px;
    padding: 0 10px;
  }

  .extra-card--profile .extra-card__body h2 {
    padding-right: 78px;
    font-size: 22px;
  }

  .extra-profile-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .extra-profile-preview div {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 7px 6px;
  }

  .extra-profile-preview dt,
  .extra-profile dt {
    font-size: 10px;
  }

  .extra-profile-preview dd,
  .extra-profile dd {
    font-size: 12px;
    line-height: 1.45;
  }

  .extra-profile-status {
    padding: 9px 11px;
    font-size: 13px;
    line-height: 1.55;
  }

  .extra-profile-actions {
    gap: 8px;
  }

  .extra-expand-button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 13px;
  }

  .extra-card--profile .extra-card__link {
    font-size: 13px;
  }

  .extra-profile-preview div::before {
    display: none;
  }
}

@media (max-width: 380px) {
  .extra-filter button {
    min-height: 34px;
    padding: 0;
  }

  .extra-card__body {
    padding: 15px 14px;
  }

  .extra-card--profile .extra-card__body h2 {
    padding-right: 72px;
    font-size: 21px;
  }

  .extra-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .extra-profile-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .extra-profile-actions {
    gap: 10px;
  }

  .extra-expand-button,
  .extra-card--profile .extra-card__link {
    justify-content: center;
    text-align: center;
  }

  .novel-card {
    grid-template-columns: 1fr;
  }

  .novel-identity {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .latest-line {
    font-size: clamp(12px, 3.55vw, 14px);
  }
}

.site-shell {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.hero--compact {
  min-height: 52svh;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: -2;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(243, 251, 248, 0.02), rgba(243, 251, 248, 0.32) 48%, var(--paper) 95%),
    linear-gradient(90deg, rgba(247, 255, 252, 0.72), rgba(247, 255, 252, 0.14) 46%, rgba(247, 255, 252, 0.54));
  z-index: -1;
}

.topbar {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: #17474a;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.85);
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__links > a:not(.icon-link) {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.icon-link,
.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(247, 255, 252, 0.56);
  box-shadow: 0 10px 28px rgba(76, 145, 151, 0.14);
  backdrop-filter: blur(12px);
}

.hero__content {
  width: min(100%, 760px);
  padding: 0 24px 78px;
}

.hero--compact .hero__content {
  padding: 0 24px 34px;
}

.eyebrow,
.tiny-label {
  display: block;
  margin: 0 0 10px;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  color: #163f42;
  font-size: clamp(40px, 12vw, 82px);
  line-height: 0.96;
  font-weight: 800;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.15;
}

.hero__copy {
  max-width: 25em;
  color: #315c5f;
  font-size: 18px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}

.primary-action,
.ghost-action,
.follow-button,
.text-action,
.reader-toolbar a,
.reader-toolbar button,
.page-turn,
.comment-dock button,
.admin-panel button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.primary-action {
  padding: 14px 22px;
  color: #f8fffc;
  background: var(--teal);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.ghost-action {
  padding: 13px 20px;
  border: 1px solid rgba(45, 127, 128, 0.18);
  background: rgba(247, 255, 252, 0.62);
  color: var(--teal);
  backdrop-filter: blur(10px);
}

.follow-button {
  margin-top: 14px;
  padding: 10px 15px;
  border: 1px solid rgba(45, 127, 128, 0.2);
  color: var(--teal);
  background: rgba(248, 255, 252, 0.58);
  backdrop-filter: blur(10px);
}

.follow-button.is-active {
  color: #f8fffc;
  background: var(--cinnabar);
  border-color: transparent;
}

.book-dashboard {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  width: min(calc(100% - 28px), 720px);
  margin: -20px auto 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(248, 255, 252, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 2;
}

.book-cover {
  width: 108px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(46, 107, 111, 0.18);
}

.book-dashboard__body {
  min-width: 0;
}

.book-dashboard h2 {
  margin-bottom: 8px;
  font-size: 25px;
}

.book-dashboard__summary {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 12px;
}

.home-page .tag-row span {
  display: inline-grid;
  min-width: 0;
  place-items: center;
  padding: 5px 12px;
  border: 1px solid rgba(45, 127, 128, 0.16);
  border-radius: 999px;
  color: #5c8ec8;
  background: #eaf3ff;
  font-size: clamp(9px, 2.8vw, 13px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .home-page .novel-info .tag-row span {
    padding-inline: 10px;
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 14px;
}

.metric-grid div {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.metric-grid dt {
  color: var(--ink-soft);
  font-size: 11px;
}

.metric-grid dd {
  margin: 3px 0 0;
  color: var(--teal);
  font-size: 15px;
  font-weight: 800;
}

.dashboard-actions {
  display: grid;
  gap: 10px;
}

.dashboard-actions .primary-action,
.dashboard-actions .follow-button {
  display: grid;
  min-height: 44px;
  place-items: center;
  margin: 0;
  text-align: center;
}

.section {
  width: min(100% - 36px, 920px);
  margin: 44px auto 0;
}

.section__heading {
  margin-bottom: 22px;
}

.work-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 255, 252, 0.68);
}

.work-card__mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(45, 127, 128, 0.25);
  border-radius: 50%;
  color: var(--cinnabar);
  font-weight: 800;
}

.work-card p,
.timeline span {
  color: var(--ink-soft);
  line-height: 1.9;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.meta-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
}

.meta-list dt {
  color: var(--ink-soft);
  font-size: 12px;
}

.meta-list dd {
  margin: 5px 0 0;
  font-weight: 700;
}

.text-action {
  color: var(--cinnabar);
  font-weight: 800;
}

.intro-text {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.95;
}

.update-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 255, 252, 0.72);
}

.update-card + .update-card {
  margin-top: 10px;
}

.update-card--muted {
  opacity: 0.74;
}

.update-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.update-card__head span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.update-card__head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.update-card__head a {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 999px;
  color: #f8fffc;
  background: var(--teal);
  font-size: 14px;
  font-weight: 800;
}

.update-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.85;
}

.timeline {
  display: grid;
  gap: 14px;
  padding: 0 0 72px;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 6px;
  padding-left: 16px;
  border-left: 2px solid rgba(45, 127, 128, 0.28);
}

.timeline time {
  color: var(--cinnabar);
  font-weight: 800;
}

.chapter-list,
.interaction-grid {
  display: grid;
  gap: 10px;
}

.chapter-list a,
.chapter-list button,
.interaction-grid div {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(248, 255, 252, 0.68);
  text-align: left;
}

.chapter-list button {
  opacity: 0.62;
  cursor: default;
}

.chapter-list span,
.interaction-grid span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.chapter-list small {
  color: var(--ink-soft);
}

.chapter-list strong,
.interaction-grid strong {
  font-size: 17px;
}

.reader-page {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 0%, rgba(118, 176, 224, 0.2), transparent 19rem),
    radial-gradient(circle at 88% 12%, rgba(194, 225, 231, 0.26), transparent 18rem),
    linear-gradient(180deg, #f4f9fd 0%, #eef6fa 55%, #f8fbfd 100%);
  color: #263342;
}

.reader-page.reader-theme-cyan {
  --paper: #f4f9fd;
  --paper-deep: #e6f1f6;
  --ink: #263342;
  --ink-soft: #6f8192;
  --line: rgba(106, 164, 179, 0.23);
  --teal: #5c8ec8;
  --blue: #6aa4d8;
  --cinnabar: #5d93d8;
}

.reader-page.reader-theme-paper {
  --paper: #fbf7ed;
  --paper-deep: #efe4cf;
  --ink: #382f26;
  --ink-soft: #84796b;
  --line: rgba(142, 112, 70, 0.22);
  --teal: #9b7b4c;
  --blue: #ad8a57;
  --cinnabar: #a46f52;
  background:
    radial-gradient(circle at 14% 4%, rgba(218, 198, 159, 0.23), transparent 18rem),
    linear-gradient(180deg, #fbf7ed 0%, #f4ecdd 100%);
}

.reader-page.reader-theme-mint {
  --paper: #effaf6;
  --paper-deep: #d8efe6;
  --ink: #1d3430;
  --ink-soft: #657e77;
  --line: rgba(45, 127, 128, 0.2);
  --teal: #2d7f80;
  --blue: #61aeb3;
  --cinnabar: #4f9ba0;
  background:
    radial-gradient(circle at 18% 2%, rgba(128, 204, 201, 0.22), transparent 26rem),
    linear-gradient(180deg, #f7fffc 0%, #e6f5f1 100%);
}

.reader-page.reader-theme-night,
.reader-page.is-dark {
  color-scheme: dark;
  --paper: #121918;
  --paper-deep: #1d2826;
  --ink: #e9e2d0;
  --ink-soft: #aaa08d;
  --line: rgba(233, 226, 208, 0.13);
  --teal: #86b8be;
  --blue: #8fbcc8;
  --cinnabar: #b7a171;
  background: #121918;
}

.reader-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(16px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.reader-header a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  font-size: 30px;
}

.reader-header span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.reader-header strong {
  display: block;
  font-size: 16px;
}

.reader-header .icon-button,
.theme-menu__button {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}

.theme-menu {
  position: relative;
  display: grid;
  justify-items: end;
}

.theme-menu__button {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.reader-toolbar {
  position: sticky;
  top: 63px;
  z-index: 7;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
  width: min(100% - 24px, 620px);
  margin: 10px auto 0;
  padding: 0;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.reader-chrome-quiet .reader-header,
.reader-chrome-quiet .reader-toolbar {
  opacity: 0.18;
}

.reader-chrome-quiet .reader-header:hover,
.reader-chrome-quiet .reader-toolbar:hover,
.reader-chrome-quiet .reader-header:focus-within,
.reader-chrome-quiet .reader-toolbar:focus-within {
  opacity: 1;
}

.reader-toolbar__left,
.reader-toolbar__right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reader-toolbar__left {
  justify-content: flex-start;
}

.reader-toolbar__right {
  justify-content: flex-end;
}

.reader-toolbar a,
.reader-toolbar button {
  display: grid;
  flex: 0 0 auto;
  min-width: 0;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  box-shadow: 0 10px 24px rgba(18, 25, 24, 0.07);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}

.catalog-button {
  gap: 7px;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
}

.catalog-mark {
  position: relative;
  width: 14px;
  height: 14px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.catalog-mark::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px solid currentColor;
  transform: translateY(-50%);
}

.font-stepper {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 42px 42px 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  box-shadow: 0 10px 24px rgba(18, 25, 24, 0.07);
  backdrop-filter: blur(16px);
}

.reader-toolbar .font-stepper button {
  height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.font-stepper span {
  display: grid;
  min-width: 42px;
  place-items: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.reader-toolbar .font-stepper button + button {
  border-left: 1px solid var(--line);
}

.reader-toolbar button[aria-pressed="true"] {
  border-color: rgba(45, 127, 128, 0.18);
  color: var(--teal);
  background: rgba(45, 127, 128, 0.08);
}

.reader-themes {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  box-shadow: 0 10px 24px rgba(18, 25, 24, 0.07);
  backdrop-filter: blur(16px);
}

.reader-themes[hidden] {
  display: none;
}

.theme-swatch {
  position: relative;
  display: grid;
  width: 42px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: none;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.theme-swatch[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--teal) 72%, white);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--teal) 18%, transparent),
    0 8px 16px color-mix(in srgb, var(--teal) 12%, transparent);
}

.theme-swatch span {
  position: relative;
  z-index: 1;
  padding: 2px 4px;
  border-radius: 999px;
  color: rgba(38, 51, 66, 0.86);
  background: rgba(255, 255, 255, 0.54);
  transform: scale(0.92);
}

.theme-swatch--cyan {
  background: linear-gradient(135deg, #f4f9fd 0%, #b8d8ed 100%);
}

.theme-swatch--paper {
  background: linear-gradient(135deg, #fbf7ed 0%, #d5b983 100%);
}

.theme-swatch--mint {
  background: linear-gradient(135deg, #effaf6 0%, #91cfc8 100%);
}

.theme-swatch--night {
  background: linear-gradient(135deg, #121918 0%, #52696b 100%);
}

.theme-swatch--night span {
  color: #e9e2d0;
  background: rgba(18, 25, 24, 0.48);
}

.reader-shell {
  width: min(100%, 740px);
  margin: 0 auto;
}

.chapter {
  height: calc(100svh - 250px);
  min-height: 330px;
  padding: 30px clamp(24px, 7vw, 60px) 14px;
  overflow: hidden;
  touch-action: pan-y;
}

.chapter-page {
  height: 100%;
  overflow: hidden;
}

.chapter-page p {
  position: relative;
  margin: 0 0 1.35em;
  color: var(--ink);
  font-size: var(--reader-font-size);
  line-height: 2.12;
  text-align: justify;
}

.chapter-page p:last-child {
  margin-bottom: 0;
}

.chapter-empty {
  display: grid;
  min-height: 100%;
  place-content: center;
  gap: 14px;
  text-align: center;
}

.chapter-empty h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 8vw, 42px);
}

.chapter-empty p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.chapter-empty a {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 800;
}

.chapter-page--measure {
  position: fixed;
  top: -10000px;
  left: -10000px;
  z-index: -1;
  height: auto;
  max-height: none;
  overflow: visible;
  pointer-events: none;
  visibility: hidden;
}

.chapter-progress {
  margin: 0 auto 24px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.danmaku-layer {
  pointer-events: none;
  position: fixed;
  inset: 112px 0 130px;
  z-index: 5;
  overflow: hidden;
}

.danmaku-item {
  position: absolute;
  right: -40vw;
  max-width: 68vw;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #f8fffc;
  background: rgba(45, 127, 128, 0.66);
  box-shadow: 0 10px 22px rgba(18, 25, 24, 0.18);
  font-size: 13px;
  white-space: nowrap;
  animation: float-danmaku 9s linear forwards;
  backdrop-filter: blur(10px);
}

@keyframes float-danmaku {
  to {
    transform: translateX(-150vw);
  }
}

.page-turns {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 9;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(520px, calc(100% - 28px));
  transform: translateX(-50%);
}

.page-turn {
  display: grid;
  height: 52px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--teal) 76%, #1f4f74);
  border-radius: 999px;
  color: #f8fffc;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 88%, #244f87), color-mix(in srgb, var(--teal) 92%, #163d67));
  box-shadow:
    0 16px 32px color-mix(in srgb, var(--teal) 34%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}

.page-turn:not(:disabled):active {
  transform: translateY(1px);
  box-shadow:
    0 10px 20px color-mix(in srgb, var(--teal) 30%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.page-turn:disabled {
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  box-shadow: none;
  opacity: 0.58;
  cursor: default;
}

.not-found-card {
  display: grid;
  gap: 18px;
  min-height: 58svh;
  place-content: center;
  text-align: center;
}

.not-found-card h1 {
  margin: 0;
  color: #273447;
  font-size: clamp(44px, 16vw, 86px);
  line-height: 1;
}

.not-found-card p {
  margin: 0;
  color: #637388;
  font-size: 17px;
  line-height: 1.8;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.not-found-actions a {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #83b5eb, #4f83cf);
  font-weight: 800;
}

.not-found-actions a + a {
  color: #4f83cf;
  background: #edf5ff;
}

.comment-dock {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 12;
  display: grid;
  width: min(520px, calc(100% - 28px));
  grid-template-columns: 1fr 48px;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  box-shadow: 0 12px 34px rgba(18, 25, 24, 0.16);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.comment-dock[hidden] {
  display: none;
}

.comment-dock label {
  min-width: 0;
}

.comment-dock span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.comment-dock select,
.comment-dock input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
}

.comment-dock button {
  color: #f8fffc;
  background: var(--cinnabar);
  font-weight: 800;
}

.comment-dock small {
  grid-column: 1 / -1;
  color: #6f8798;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px;
  line-height: 1.35;
}

.admin-shell {
  width: min(100% - 28px, 840px);
  margin: 0 auto;
  padding: 18px 0 60px;
}

.admin-shell--wide {
  width: min(100% - 28px, 1180px);
}

.is-hidden {
  display: none !important;
}

.admin-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 0 22px;
}

.admin-header a {
  color: var(--cinnabar);
  font-weight: 800;
}

.admin-header div {
  text-align: right;
}

.admin-export {
  min-height: 40px;
  border: 1px solid rgba(184, 91, 74, 0.28);
  border-radius: 8px;
  padding: 0 14px;
  color: #f8fffc;
  background: var(--cinnabar);
  font-weight: 800;
}

.admin-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-preview-link {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(45, 127, 128, 0.2);
  border-radius: 8px;
  padding: 0 16px;
  color: #2d7f80;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.admin-preview-link.is-disabled {
  opacity: 0.46;
  pointer-events: none;
}

.admin-toast {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: none;
  margin-bottom: 14px;
  border: 1px solid rgba(45, 127, 128, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--teal);
  background: rgba(232, 248, 243, 0.96);
  box-shadow: 0 14px 30px rgba(65, 128, 132, 0.14);
  font-weight: 800;
}

.admin-toast.is-visible {
  display: block;
}

.admin-toast[data-tone="error"] {
  color: var(--cinnabar);
  border-color: rgba(184, 91, 74, 0.3);
  background: rgba(255, 241, 238, 0.96);
}

.admin-header span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.admin-summary div,
.moderation-item,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 255, 252, 0.68);
}

.admin-summary div {
  padding: 14px;
}

.admin-summary span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.admin-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.admin-panel {
  padding: 16px;
  margin-bottom: 18px;
}

.admin-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-panel h1 {
  margin: 0;
  font-size: 24px;
}

.admin-panel button {
  padding: 10px 13px;
  color: #f8fffc;
  background: var(--teal);
}

.admin-view {
  display: grid;
  gap: 18px;
}

.book-list {
  display: grid;
  gap: 12px;
}

.book-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.book-actions {
  display: grid;
  gap: 8px;
  min-width: 112px;
}

.book-actions .danger {
  background: var(--cinnabar);
}

.book-item.is-active {
  border-color: rgba(45, 127, 128, 0.38);
  box-shadow: 0 14px 34px rgba(65, 128, 132, 0.12);
}

.book-item span,
.book-item small {
  color: var(--ink-soft);
  font-size: 12px;
}

.book-item h2 {
  margin: 6px 0;
  font-size: clamp(22px, 5vw, 30px);
}

.book-item p {
  margin: 0 0 6px;
  color: var(--teal);
}

.admin-bookbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 255, 252, 0.76);
  box-shadow: var(--shadow);
}

.admin-bookbar h1 {
  margin: 2px 0 0;
  font-size: clamp(24px, 6vw, 38px);
  line-height: 1.2;
}

.admin-bookbar span {
  color: var(--ink-soft);
  font-size: 13px;
}

.admin-back,
.admin-preview {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.66);
  font-weight: 800;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 8px 0;
  background: linear-gradient(180deg, rgba(243, 251, 248, 0.96), rgba(243, 251, 248, 0.82));
  backdrop-filter: blur(12px);
}

.admin-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.56);
  font-weight: 800;
}

.admin-tabs button.is-active {
  color: #f8fffc;
  background: var(--teal);
}

.chapter-workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(620px, 1.28fr);
  gap: 14px;
  align-items: start;
}

.chapter-browser,
.chapter-editor {
  position: sticky;
  top: 68px;
}

.chapter-editor {
  position: static;
}

.admin-chapter-list {
  display: grid;
  gap: 8px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 2px;
}

.admin-chapter-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
}

.admin-chapter-list button:hover {
  border-color: rgba(45, 127, 128, 0.42);
  background: rgba(223, 243, 238, 0.82);
}

.admin-chapter-list span,
.admin-chapter-list small {
  color: var(--ink-soft);
  font-size: 12px;
}

.chapter-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  margin-bottom: 10px;
}

.chapter-filters input {
  grid-column: 1 / -1;
}

.admin-inline-note {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.bulk-import,
.comment-filters {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.bulk-import {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(45, 127, 128, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.bulk-import small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.bulk-preview {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(45, 127, 128, 0.2);
  border-radius: 8px;
  padding: 12px;
  background: rgba(248, 255, 252, 0.72);
}

.bulk-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bulk-preview__head div {
  display: flex;
  gap: 8px;
}

.bulk-preview__head button {
  border: 0;
  border-radius: 8px;
  padding: 8px 11px;
  color: #f8fffc;
  background: var(--teal);
  font-weight: 800;
}

.bulk-preview__head button:last-child {
  background: var(--ink-soft);
}

.bulk-preview__list {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}

.bulk-preview__list article {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.68);
}

.bulk-preview__list span,
.bulk-preview__list small {
  color: var(--ink-soft);
  font-size: 12px;
}

.comment-filters {
  grid-template-columns: minmax(220px, 1fr) 140px minmax(260px, 1.1fr);
}

.txt-import {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px dashed rgba(45, 127, 128, 0.34);
  border-radius: 8px;
  background: rgba(223, 243, 238, 0.48);
}

.txt-import__button {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  padding: 0 16px;
  color: #f8fffc;
  background: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

.txt-import__button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.txt-import strong,
.txt-import small {
  display: block;
}

.txt-import strong {
  margin-bottom: 3px;
}

.txt-import small {
  color: var(--ink-soft);
  line-height: 1.5;
}

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

.editor-stats span {
  display: block;
  border: 1px solid rgba(45, 127, 128, 0.16);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--teal);
  background: rgba(223, 243, 238, 0.46);
  font-size: 13px;
  font-weight: 800;
}

.cover-uploader {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
}

.cover-uploader img {
  width: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(65, 128, 132, 0.12);
}

.extra-image {
  display: block;
  width: min(100%, 720px);
  max-height: 520px;
  object-fit: contain;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.extra-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.extra-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.extra-item small {
  color: var(--ink-soft);
}

.extra-item p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.admin-hint {
  color: var(--ink-soft);
  font-size: 13px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid rgba(45, 127, 128, 0.16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(240, 250, 247, 0.58);
}

.profile-editor[hidden] {
  display: none;
}

.profile-editor legend {
  padding: 0 8px;
  color: var(--teal);
  font-weight: 900;
}

.admin-form span {
  color: var(--ink-soft);
  font-size: 12px;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.chapter-filters input,
.chapter-filters select,
.comment-filters input,
.comment-filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  resize: vertical;
}

.admin-form--single {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.admin-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px;
}

.admin-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.admin-form__wide,
.admin-form button {
  grid-column: 1 / -1;
}

.moderation-list {
  display: grid;
  gap: 10px;
}

.moderation-item {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.moderation-item p {
  margin: 0;
  line-height: 1.7;
}

.moderation-item small {
  color: var(--ink-soft);
}

.moderation-actions {
  display: flex;
  gap: 8px;
}

.moderation-actions button {
  background: var(--blue);
}

.moderation-actions button:last-child {
  background: var(--cinnabar);
}

@media (min-width: 720px) {
  .hero {
    min-height: 82vh;
  }

  .hero--compact {
    min-height: 56vh;
  }

  .hero__content {
    padding-left: 7vw;
    padding-bottom: 84px;
  }

  .hero--compact .hero__content {
    padding-bottom: 46px;
  }

  .book-dashboard {
    grid-template-columns: 148px 1fr;
    gap: 22px;
    padding: 18px;
  }

  .book-cover {
    width: 148px;
  }

  .dashboard-actions {
    grid-template-columns: 168px 168px;
  }

  .work-card {
    grid-template-columns: 90px 1fr;
    padding: 28px;
  }

  .comment-dock {
    left: 50%;
    right: auto;
    width: min(640px, calc(100% - 24px));
    transform: translateX(-50%);
  }

  .page-turns {
    width: min(640px, calc(100% - 24px));
  }
}

@media (max-width: 980px) {
  .chapter-workbench {
    grid-template-columns: 1fr;
  }

  .chapter-browser {
    position: static;
  }

  .admin-chapter-list {
    max-height: 320px;
  }
}

@media (max-width: 520px) {
  .reader-toolbar {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .reader-toolbar__right {
    justify-content: flex-end;
  }

  .reader-toolbar a,
  .reader-toolbar button {
    height: 38px;
    padding: 0 12px;
  }

  .font-stepper {
    grid-template-columns: 38px 40px 38px;
  }

  .reader-toolbar .font-stepper button {
    height: 36px;
    padding: 0 10px;
  }

  .chapter {
    height: calc(100svh - 246px);
    padding-top: 24px;
  }
}

@media (max-width: 420px) {
  .admin-header {
    align-items: flex-start;
    gap: 14px;
  }

  .admin-summary {
    gap: 8px;
  }

  .admin-summary div {
    padding: 12px 10px;
  }

  .admin-summary strong {
    font-size: 24px;
  }

  .admin-panel__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .profile-editor {
    grid-template-columns: 1fr;
  }

  .book-item,
  .admin-bookbar {
    grid-template-columns: 1fr;
  }

  .book-item button,
  .admin-preview,
  .admin-back {
    width: 100%;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .chapter-workbench {
    grid-template-columns: 1fr;
  }

  .chapter-browser {
    position: static;
  }

  .admin-chapter-list {
    max-height: 260px;
  }

  .txt-import {
    grid-template-columns: 1fr;
  }

  .moderation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .compact-page .home-shell {
    padding-top: max(16px, calc(12px + env(safe-area-inset-top)));
  }

  .home-page .novel-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 11px;
  }

  .home-page .novel-identity {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
  }

  .home-page .novel-cover {
    width: 82px;
    max-width: 82px;
    height: 123px;
    aspect-ratio: auto;
    align-self: start;
    object-fit: cover;
  }

  .home-page .novel-info {
    min-width: 0;
    display: block;
  }

  .home-page .novel-info .tag-row {
    display: flex;
    margin-bottom: 6px;
  }

  .home-page .novel-info h2 {
    margin: 0 0 4px;
    font-size: clamp(20px, 5.8vw, 23px);
    line-height: 1.12;
    white-space: nowrap;
  }

  .home-page .novel-line {
    margin: 0;
    font-size: clamp(12px, 3.15vw, 14px);
    line-height: 1.45;
  }

  .home-page .novel-metrics,
  .home-page .latest-line,
  .home-page .novel-actions {
    grid-column: 1 / -1;
  }

  .home-page .novel-metrics {
    margin: 0;
    padding: 8px 0;
  }

  .home-page .latest-line {
    margin: 0;
  }

  .home-page .novel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-page .read-button {
    min-height: 40px;
    font-size: 16px;
  }

  .simple-page-head,
  .catalog-head {
    margin-bottom: 12px;
  }

  .simple-page-head h1,
  .catalog-title-row h1 {
    font-size: clamp(30px, 9vw, 36px);
  }

  .simple-page-head p {
    font-size: 14px;
    line-height: 1.55;
  }

  .catalog-title-row span {
    padding: 6px 10px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .home-page .novel-identity {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .home-page .novel-cover {
    width: 76px;
    max-width: 76px;
    height: 114px;
  }

  .home-page .novel-line {
    font-size: 12px;
  }
}

/* Mobile-first rewrite for the public reader-facing pages. */
html {
  background: #dfeff7;
}

body.mobile-site {
  width: 100%;
  max-width: 430px;
  min-height: 100svh;
  margin: 0 auto;
  overflow-x: hidden;
  color: #243041;
  background:
    radial-gradient(circle at 18% -4%, rgba(152, 201, 232, 0.34), transparent 34%),
    linear-gradient(180deg, #f3f9fd 0%, #edf7fb 42%, #f8fbfd 100%);
  box-shadow: 0 0 0 1px rgba(133, 170, 197, 0.2), 0 22px 70px rgba(71, 107, 137, 0.24);
}

.mobile-site .mobile-shell {
  width: 100%;
  min-height: 100svh;
  padding: max(14px, env(safe-area-inset-top)) 12px calc(86px + env(safe-area-inset-bottom));
}

.mobile-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 12px;
}

.mobile-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #263346;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.mobile-logo i {
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #6aa0d8 42%, transparent);
}

.mobile-brand p {
  max-width: 16em;
  margin: 0;
  overflow: hidden;
  color: #5d8ec7;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-book-card,
.mobile-panel,
.mobile-tool-card {
  border: 1px solid rgba(151, 184, 210, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(73, 115, 150, 0.13);
  backdrop-filter: blur(16px);
}

.mobile-book-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.mobile-book-main {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.mobile-site .novel-cover {
  width: 104px;
  height: 156px;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(37, 60, 82, 0.18);
}

.mobile-book-copy {
  min-width: 0;
  padding-top: 1px;
}

.mobile-book-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mobile-site .tag-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  min-width: 0;
}

.mobile-site .tag-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 8em;
  height: 25px;
  border: 1px solid rgba(92, 142, 200, 0.22);
  border-radius: 999px;
  padding: 0 10px;
  overflow: hidden;
  color: #5c8ec8;
  background: rgba(232, 243, 252, 0.92);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-status-dot {
  flex: 0 0 auto;
  color: #4d789b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-book-copy h1 {
  margin: 0 0 7px;
  overflow: hidden;
  color: #202b3a;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: clamp(25px, 7vw, 32px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-site .novel-line {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: #5b8cca;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-site .latest-line {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #6c7d8f;
  font-size: 12px;
  line-height: 1.4;
}

.mobile-site .latest-line strong {
  overflow: hidden;
  color: #253142;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-site .mobile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mobile-site .mobile-metrics div {
  min-width: 0;
  border: 1px solid rgba(151, 184, 210, 0.24);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(239, 247, 253, 0.7);
}

.mobile-site .mobile-metrics dt {
  margin: 0;
  color: #738397;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.mobile-site .mobile-metrics dd {
  margin: 6px 0 0;
  overflow: hidden;
  color: #3f76b7;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 9px;
}

.mobile-site .read-button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #78b5ea, #4f83cf);
  box-shadow: 0 12px 24px rgba(79, 131, 207, 0.25);
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-site .novel-actions .read-button {
  width: auto;
  min-width: 104px;
  max-width: 128px;
}

.mobile-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(92, 142, 200, 0.18);
  border-radius: 999px;
  padding: 0 15px;
  color: #4f83cf;
  background: rgba(237, 245, 255, 0.78);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-panel {
  margin-top: 12px;
  padding: 14px;
}

.mobile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mobile-section-title h2 {
  margin: 0;
  color: #253142;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
}

.mobile-section-title a {
  color: #5c8ec8;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-site .intro-card p {
  margin: 0 0 8px;
  color: #536273;
  font-size: 14px;
  line-height: 1.78;
}

.mobile-site .intro-card p:last-child {
  margin-bottom: 0;
}

.mobile-site .update-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-site .update-list li {
  border-top: 1px solid rgba(151, 184, 210, 0.24);
}

.mobile-site .update-list li:first-child {
  border-top: 0;
}

.mobile-site .update-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0 5px;
}

.mobile-site .update-list strong {
  overflow: hidden;
  color: #253142;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-site .update-list time {
  color: #8794a4;
  font-size: 11px;
  white-space: nowrap;
}

.mobile-site .update-list p {
  display: -webkit-box;
  max-height: none;
  margin: 0 0 10px;
  overflow: hidden;
  color: #657586;
  font-size: 12px;
  line-height: 1.55;
  opacity: 1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 4px 2px 0;
}

.mobile-page-head > a {
  color: #5c8ec8;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-page-head > span {
  justify-self: end;
  border: 1px solid rgba(92, 142, 200, 0.2);
  border-radius: 999px;
  padding: 5px 10px;
  color: #5c8ec8;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.mobile-page-head h1 {
  grid-column: 1 / -1;
  margin: 0;
  overflow: hidden;
  color: #243041;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: clamp(31px, 9vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-catalog .catalog-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 4px 0 0;
}

.mobile-catalog .catalog-stats div {
  min-width: 0;
  border: 1px solid rgba(151, 184, 210, 0.24);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.mobile-catalog .catalog-stats dt {
  color: #738397;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.mobile-catalog .catalog-stats dd {
  margin: 6px 0 0;
  overflow: hidden;
  color: #263346;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-tool-card {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
}

.mobile-catalog .catalog-toolbar {
  grid-template-columns: 1fr;
}

.mobile-catalog .volume-tabs,
.mobile-extras .extra-filter {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 2px;
  scrollbar-width: none;
}

.mobile-catalog .volume-tabs::-webkit-scrollbar,
.mobile-extras .extra-filter::-webkit-scrollbar {
  display: none;
}

.mobile-catalog .volume-tabs a,
.mobile-extras .extra-filter button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(92, 142, 200, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  color: #5f7186;
  background: rgba(237, 245, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-catalog .volume-tabs .is-active,
.mobile-extras .extra-filter .is-active {
  border-color: transparent;
  color: #fff;
  background: #5c8ec8;
}

.mobile-catalog .volume-tabs small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  margin-left: 4px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 10px;
}

.mobile-catalog .chapter-search input {
  height: 36px;
  border-color: rgba(151, 184, 210, 0.34);
  border-radius: 999px;
  padding: 0 13px;
  font-size: 13px;
}

.mobile-catalog .continue-reading {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.mobile-catalog .continue-reading > span {
  color: #738397;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-catalog .continue-reading a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.mobile-catalog .continue-reading strong {
  overflow: hidden;
  color: #263346;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-catalog .continue-reading small {
  color: #5c8ec8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-catalog .volume-card {
  margin-top: 0;
}

.mobile-catalog .volume-head {
  align-items: center;
  margin-bottom: 8px;
}

.mobile-catalog .volume-head span {
  color: #5c8ec8;
  font-size: 12px;
  font-weight: 900;
}

.mobile-catalog .volume-head h2 {
  margin: 2px 0 0;
  color: #263346;
  font-size: 20px;
  white-space: nowrap;
}

.mobile-catalog .volume-head small {
  color: #8794a4;
  font-size: 12px;
  white-space: nowrap;
}

.mobile-catalog .catalog-list a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  padding: 11px 0;
}

.mobile-catalog .catalog-list span,
.mobile-catalog .catalog-list time {
  color: #8794a4;
  font-size: 12px;
  white-space: nowrap;
}

.mobile-catalog .catalog-list strong {
  overflow: hidden;
  color: #263346;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-catalog .catalog-list time {
  grid-column: 2;
  margin-top: -6px;
}

.mobile-catalog .catalog-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.mobile-catalog .catalog-row button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.mobile-catalog .chapter-summary {
  margin: -2px 0 10px 67px;
  color: #657586;
  font-size: 12px;
  line-height: 1.58;
}

.mobile-extras .simple-page-head {
  margin-bottom: 12px;
}

.mobile-extras .extras-stage {
  margin-bottom: 12px;
}

.mobile-extras .extras-board {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-bottom: 0;
}

.mobile-extras .extra-card {
  width: 100%;
  min-height: 0;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(73, 115, 150, 0.12);
}

.mobile-extras .extra-card__body {
  gap: 8px;
  padding: 13px;
}

.mobile-extras .extra-card__kicker,
.mobile-extras .extra-card__badge {
  position: static;
  justify-self: start;
  min-height: 25px;
  padding: 0 9px;
  font-size: 11px;
}

.mobile-extras .extra-card__body h2 {
  overflow: hidden;
  color: #243041;
  font-size: 20px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-extras .extra-card__body time {
  color: #7d8b9d;
  font-size: 12px;
  line-height: 1.35;
}

.mobile-extras .extra-card__body p {
  margin: 0;
  color: #536273;
  font-size: 13px;
  line-height: 1.7;
}

.mobile-extras .extra-card--profile-photo {
  grid-template-columns: 92px minmax(0, 1fr);
}

.mobile-extras .extra-card--profile .extra-card__media {
  display: grid;
  align-items: stretch;
  min-height: 0;
  padding: 10px 0 10px 10px;
  background: transparent;
}

.mobile-extras .extra-card--profile .extra-card__media img {
  width: 82px;
  height: 118px;
  max-height: none;
  border-radius: 8px;
  object-fit: cover;
}

.mobile-extras .extra-card--profile .extra-card__body {
  padding: 11px 12px 11px 8px;
}

.mobile-extras .extra-card--profile .extra-card__body h2 {
  padding-right: 0;
  font-size: 22px;
  line-height: 1.1;
}

.mobile-extras .extra-profile-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  max-width: none;
}

.mobile-extras .extra-profile-preview div {
  min-height: 0;
  padding: 6px;
}

.mobile-extras .extra-profile-preview dt,
.mobile-extras .extra-profile dt {
  margin-bottom: 3px;
  font-size: 10px;
}

.mobile-extras .extra-profile-preview dd,
.mobile-extras .extra-profile dd {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-extras .extra-profile-status {
  max-width: none;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.55;
}

.mobile-extras .extra-profile-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 0;
}

.mobile-extras .extra-expand-button,
.mobile-extras .extra-card--profile .extra-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-extras .extra-profile {
  grid-template-columns: 1fr;
  gap: 6px;
}

.mobile-extras .extra-profile div {
  padding: 8px 9px;
}

.mobile-extras .extra-card--image .extra-card__media img,
.mobile-extras .extra-card--gallery .extra-card__media img {
  max-height: 260px;
  object-fit: contain;
}

.mobile-extras .extra-card__media {
  min-height: 0;
}

.mobile-site .home-tabbar {
  left: 50%;
  right: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 406px);
  height: 58px;
  max-width: 406px;
  border-radius: 8px;
  padding: 0 8px;
  transform: translateX(-50%);
}

.mobile-site .home-tabbar a {
  gap: 3px;
  font-size: 12px;
}

.mobile-site .home-tabbar span {
  font-size: 20px;
}

@media (max-width: 360px) {
  .mobile-site .mobile-shell {
    padding-inline: 10px;
  }

  .mobile-book-main {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 10px;
  }

  .mobile-site .novel-cover {
    width: 94px;
    height: 141px;
  }

  .mobile-book-copy h1 {
    font-size: 24px;
  }

  .mobile-site .mobile-metrics div {
    padding-inline: 7px;
  }

  .mobile-extras .extra-card--profile-photo {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .mobile-extras .extra-card--profile .extra-card__media img {
    width: 74px;
    height: 108px;
  }
}

/* WorkBuddy 番外详情：列表负责扫读，详情承接完整档案与长内容。 */
body.wb-extras .ex-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

body.wb-extras .ex-group.ex-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.wb-extras .ex-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

body.wb-extras .ex-card:active {
  transform: scale(.985);
}

body.wb-extras .ex-grid .ex-card {
  min-height: 132px;
}

body.wb-extras .ex-grid .ex-ctitle {
  margin-right: 36px;
  font-size: 12.5px;
}

body.wb-extras .ex-grid .ex-excerpt {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

body.wb-extra-detail {
  min-height: 100vh;
  background: #eef5fb;
}

body.wb-extra-detail .topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: var(--topbar-h);
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

body.wb-extra-detail .topbar .title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 3px;
}

body.wb-extra-detail .topbar .back {
  position: absolute;
  top: 50%;
  left: 8px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: translateY(-50%);
  color: var(--blue-deep);
}

body.wb-extra-detail .topbar .back svg {
  width: 21px;
  height: 21px;
}

body.wb-extra-detail .extras-detail {
  padding: 14px 12px 34px;
}

body.wb-extra-detail .ex-detail-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 28px rgba(48, 84, 126, .08);
}

body.wb-extra-detail .ex-detail-kicker {
  display: inline-block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

body.wb-extra-detail .ex-detail-card h1 {
  margin: 6px 0 5px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.3;
}

body.wb-extra-detail .ex-detail-card header > p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

body.wb-extra-detail .ex-detail-visual {
  margin: 16px 0;
  overflow: hidden;
  border-radius: 11px;
  background: #eef4f7;
}

body.wb-extra-detail .ex-detail-visual img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: contain;
}

body.wb-extra-detail .ex-detail-copy {
  color: var(--ink);
  font-size: 16px;
  line-height: 2;
}

body.wb-extra-detail .ex-detail-copy p {
  margin: 0 0 1.1em;
  text-indent: 2em;
}

body.wb-extra-detail .ex-detail-copy p:last-child {
  margin-bottom: 0;
}

body.wb-extra-detail .ex-detail-read {
  display: inline-flex;
  margin-top: 20px;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--blue-deep);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 600;
}

body.wb-extra-detail .ex-detail-profile > header {
  display: flex;
  gap: 14px;
  align-items: center;
}

body.wb-extra-detail .ex-detail-photo,
body.wb-extra-detail .ex-detail-photo img,
body.wb-extra-detail .ex-detail-photo-fallback {
  display: grid;
  width: 80px;
  height: 106px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background: #cdd8e8;
  font-size: 28px;
  object-fit: cover;
}

body.wb-extra-detail .ex-detail-profile > header > div:last-child {
  min-width: 0;
}

body.wb-extra-detail .ex-detail-profile > header h1 {
  margin-top: 4px;
}

body.wb-extra-detail .ex-detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 10px;
}

body.wb-extra-detail .ex-detail-facts div,
body.wb-extra-detail .ex-detail-record div {
  min-width: 0;
}

body.wb-extra-detail .ex-detail-facts div {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  background: #f8fbff;
}

body.wb-extra-detail dt {
  color: var(--ink-3);
  font-size: 10px;
}

body.wb-extra-detail dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

body.wb-extra-detail .ex-detail-record {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 18px 0 0;
}

body.wb-extra-detail .ex-detail-record div {
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

body.wb-extra-detail .ex-detail-record dd {
  font-size: 13px;
  font-weight: 400;
}

body.wb-extra-detail .ex-detail-empty {
  min-height: 180px;
  text-align: center;
}

body.wb-extra-detail .ex-detail-empty p {
  color: var(--ink-2);
  font-size: 13px;
}

/* WorkBuddy public reading path: catalog is for finding a chapter, reader is for staying in it. */
body.wb-catalog {
  min-height: 100svh;
  background: #eef5fb;
}

body.wb-catalog .app {
  min-height: 100svh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(rgba(242, 248, 253, .86), rgba(242, 248, 253, .94)),
    url("../assets/workbuddy-bg-home.jpg") center top / cover fixed;
}

body.wb-catalog .topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: var(--topbar-h);
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .84);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

body.wb-catalog .topbar .title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 3px;
}

body.wb-catalog .topbar .back {
  position: absolute;
  top: 50%;
  left: 8px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: translateY(-50%);
  color: var(--blue-deep);
}

body.wb-catalog .topbar .back svg {
  width: 21px;
  height: 21px;
}

body.wb-catalog .catalog-page {
  padding: max(18px, calc(12px + env(safe-area-inset-top, 0px))) 12px 22px;
}

body.wb-catalog .catalog-hero {
  padding: 0 4px 16px;
}

body.wb-catalog .catalog-hero p {
  margin: 0 0 4px;
  color: #5c8ec8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

body.wb-catalog .catalog-hero h1 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-catalog .catalog-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 11.5px;
  white-space: nowrap;
}

body.wb-catalog .catalog-hero-meta i {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #9bb5cf;
}

body.wb-catalog .catalog-tools,
body.wb-catalog .continue-reading,
body.wb-catalog .volume-card {
  border: 1px solid rgba(151, 184, 210, .34);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(48, 84, 126, .08);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}

body.wb-catalog .catalog-tools {
  display: grid;
  gap: 10px;
  padding: 10px;
}

body.wb-catalog .catalog-tools .continue-reading {
  margin: 0;
  border: 0;
  border-top: 1px solid #e7eff6;
  border-radius: 0;
  padding: 10px 1px 1px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.wb-catalog .volume-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: none;
}

body.wb-catalog .volume-tabs::-webkit-scrollbar { display: none; }

body.wb-catalog .volume-tabs a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 31px;
  border: 1px solid #d7e4f1;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--ink-2);
  background: #f7fbff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

body.wb-catalog .volume-tabs a.is-active {
  border-color: #5c8ec8;
  color: #fff;
  background: #5c8ec8;
}

body.wb-catalog .volume-tabs small {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  margin-left: 5px;
  place-items: center;
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, .22);
  font-size: 9px;
}

body.wb-catalog .chapter-search {
  position: relative;
  display: block;
}

body.wb-catalog .chapter-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: #8fa1b6;
}

body.wb-catalog .chapter-search input {
  width: 100%;
  height: 37px;
  border: 1px solid #dce7f1;
  border-radius: 10px;
  padding: 0 12px 0 34px;
  outline: 0;
  color: var(--ink);
  background: #f9fcff;
  font-size: 13px;
}

body.wb-catalog .chapter-search input:focus { border-color: #8db2dc; }

body.wb-catalog .continue-reading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  padding: 11px 12px;
}

body.wb-catalog .continue-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  padding-left: 1px;
  color: #fff;
  background: #5c8ec8;
  font-size: 10px;
}

body.wb-catalog .continue-reading a { min-width: 0; }

body.wb-catalog .continue-reading small,
body.wb-catalog .continue-reading strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-catalog .continue-reading small {
  color: var(--ink-3);
  font-size: 10.5px;
}

body.wb-catalog .continue-reading strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

body.wb-catalog .continue-arrow { color: #76a5d5; font-size: 22px; }

body.wb-catalog .catalog-directory { margin-top: 16px; }

body.wb-catalog .catalog-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 9px;
}

body.wb-catalog .catalog-directory-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

body.wb-catalog .catalog-directory-head button {
  border: 0;
  padding: 4px 0;
  color: #5c8ec8;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

body.wb-catalog .catalog-list {
  display: grid;
  gap: 9px;
}

body.wb-catalog .catalog-list .volume-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(151, 184, 210, .34);
  border-radius: 14px;
  padding: 0;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 9px 24px rgba(48, 84, 126, .07);
}

body.wb-catalog .volume-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 14px 13px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

body.wb-catalog .volume-index {
  display: grid;
  width: 31px;
  height: 25px;
  place-items: center;
  border-radius: 999px;
  color: #4f83c3;
  background: #eaf2ff;
  font-size: 10px;
  font-weight: 700;
}

body.wb-catalog .volume-toggle strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-catalog .volume-toggle small {
  color: #7192b4;
  font-size: 11px;
  white-space: nowrap;
}

body.wb-catalog .volume-toggle i {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #7899ba;
  border-bottom: 1.5px solid #7899ba;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

body.wb-catalog .volume-card.is-open .volume-toggle i { transform: rotate(225deg) translateY(-1px); }

body.wb-catalog .volume-chapters {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #edf2f7;
  padding: 10px 12px 12px;
}

body.wb-catalog .volume-card.is-open .volume-chapters { display: grid; }

body.wb-catalog .chapter-tile {
  display: grid;
  min-width: 0;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid #edf2f7;
  border-radius: 9px;
  padding: 10px 8px;
  color: var(--ink);
  background: #fbfdff;
}

body.wb-catalog .chapter-tile:active { background: #f1f7fd; transform: scale(.985); }

body.wb-catalog .chapter-tile > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #e0e9f1;
  border-radius: 50%;
  color: #7693ae;
  background: #fff;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

body.wb-catalog .chapter-tile strong {
  overflow: hidden;
  color: #445467;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-catalog .chapter-tile.is-latest {
  border-color: #bdd4ec;
  background: #f3f8ff;
}

body.wb-catalog .chapter-tile.is-latest > span {
  border-color: #a9c9eb;
  color: #4f83c3;
  background: #edf5ff;
}

body.wb-catalog .chapter-tile.is-read:not(.is-current) {
  border-color: #eff3f5;
  background: #fcfdfe;
}

body.wb-catalog .chapter-tile.is-read:not(.is-current) strong { color: #778896; }

body.wb-catalog .chapter-tile.is-current {
  border-color: #9ec5dc;
  background: #edf7fc;
}

body.wb-catalog .chapter-tile em {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 6px;
  color: #4c7fa0;
  background: #dceff9;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

body.wb-catalog .chapter-tile.is-new em { color: #b7742e; background: #fff0dc; }

body.wb-catalog .catalog-empty { padding: 36px 0; color: var(--ink-3); font-size: 13px; text-align: center; }

body.wb-reader {
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  color: #273447;
  background: #eff6fb;
  font-family: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  box-shadow: 0 0 0 1px rgba(133, 170, 197, .18), 0 22px 70px rgba(71, 107, 137, .16);
}

body.wb-reader.reader-theme-cyan {
  --paper: #eff6fb;
  --ink: #273447;
  --ink-soft: #718196;
  --line: #dbe8f2;
  --teal: #5c8ec8;
  --blue: #75a7da;
}

body.wb-reader .reader-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  width: 100%;
  min-height: 58px;
  align-items: center;
  border-bottom: 1px solid rgba(173, 199, 220, .46);
  padding: env(safe-area-inset-top, 0px) 9px 0;
  background: rgba(250, 253, 255, .88);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

body.wb-reader .reader-header > a {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #648bb6;
}

body.wb-reader .reader-header > a svg { width: 21px; height: 21px; }

body.wb-reader .reader-heading {
  min-width: 0;
  text-align: center;
}

body.wb-reader .reader-header span,
body.wb-reader .reader-header strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-reader .reader-header span {
  color: #7f91a4;
  font-size: 10px;
  line-height: 1.2;
}

body.wb-reader .reader-header strong {
  margin-top: 2px;
  color: #273447;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

body.wb-reader .theme-menu { justify-self: end; }
body.wb-reader .theme-menu__button {
  width: 42px;
  min-width: 42px;
  height: 32px;
  border: 1px solid #d4e2ee;
  border-radius: 9px;
  padding: 0;
  color: #5f82a7;
  background: #f8fbff;
  box-shadow: none;
  font-size: 11px;
}

body.wb-reader .reader-toolbar {
  position: sticky;
  z-index: 15;
  top: calc(58px + env(safe-area-inset-top, 0px));
  display: flex;
  width: 100%;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin: 0;
  border-bottom: 1px solid rgba(220, 233, 244, .9);
  padding: 7px 12px;
  background: rgba(250, 253, 255, .72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}

body.wb-reader .reader-toolbar__left,
body.wb-reader .reader-toolbar__right {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

body.wb-reader .reader-toolbar a,
body.wb-reader .reader-toolbar button {
  display: inline-flex;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6e4ef;
  border-radius: 8px;
  padding: 0 8px;
  color: #667c94;
  background: rgba(255, 255, 255, .9);
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

body.wb-reader .catalog-button { gap: 5px; }
body.wb-reader .catalog-mark { width: 13px; height: 13px; border-width: 1.5px; }
body.wb-reader .catalog-mark::before { border-top-width: 1.5px; }
body.wb-reader .reader-toolbar button[aria-pressed="true"] { color: #4e7fae; background: #edf5fc; }

body.wb-reader .font-stepper {
  display: grid;
  grid-template-columns: 30px 30px 30px;
  overflow: hidden;
  border: 1px solid #d6e4ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
}

body.wb-reader .reader-toolbar .font-stepper button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

body.wb-reader .font-stepper span {
  display: grid;
  place-items: center;
  border-right: 1px solid #d6e4ef;
  border-left: 1px solid #d6e4ef;
  color: #5c8ec8;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

body.wb-reader.reader-chrome-quiet .reader-header,
body.wb-reader.reader-chrome-quiet .reader-toolbar { opacity: .72; }

body.wb-reader .reader-themes {
  top: calc(100% + 7px);
  right: 0;
  gap: 4px;
  min-height: 0;
  border: 1px solid #d5e2ed;
  border-radius: 10px;
  padding: 5px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 24px rgba(48, 84, 126, .12);
}

body.wb-reader .theme-swatch { width: 37px; height: 28px; border-radius: 6px; }

body.wb-reader .reader-shell { width: 100%; max-width: 430px; margin: 0 auto; }

body.wb-reader .chapter {
  height: calc(100svh - 207px);
  min-height: 360px;
  padding: 28px 24px 10px;
  overflow: hidden;
  touch-action: pan-y;
}

body.wb-reader .chapter-page p {
  margin-bottom: 1.28em;
  color: var(--ink);
  font-size: var(--reader-font-size);
  line-height: 2.04;
}

body.wb-reader .chapter-progress {
  margin: 0 0 20px;
  color: #94a4b5;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px;
}

body.wb-reader .danmaku-layer { inset: 114px 0 86px; }
body.wb-reader .danmaku-layer { width: min(430px, 100%); left: 50%; right: auto; transform: translateX(-50%); }
body.wb-reader .danmaku-item { color: #f8fbff; background: rgba(83, 129, 178, .64); font-family: "Noto Sans SC", sans-serif; font-size: 12px; }

body.wb-reader .page-turns {
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  width: min(406px, calc(100% - 24px));
}

body.wb-reader .page-turn {
  height: 48px;
  border: 1px solid #4e7fba;
  border-radius: 12px;
  color: #fff;
  background: #5c8ec8;
  box-shadow: 0 10px 22px rgba(75, 127, 181, .22);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

body.wb-reader .page-turn--next { background: #3f76b7; }
body.wb-reader .page-turn:disabled { border-color: #dbe6f0; color: #9dadbd; background: #eff5fa; box-shadow: none; }

body.wb-reader .comment-dock {
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  width: min(406px, calc(100% - 24px));
  border: 1px solid #cdddea;
  border-radius: 12px;
  padding: 7px;
  background: rgba(255, 255, 255, .97);
}

body.wb-reader .comment-dock input { height: 38px; border-radius: 8px; font-size: 13px; }
body.wb-reader .comment-dock button { border-radius: 8px; background: #5c8ec8; font-size: 12px; }

@media (max-width: 360px) {
  body.wb-catalog .catalog-hero h1 { font-size: 25px; }
  body.wb-catalog .catalog-hero-meta { gap: 6px; font-size: 10.5px; }
  body.wb-catalog .volume-toggle { gap: 7px; padding-inline: 11px; }
  body.wb-catalog .volume-toggle strong { font-size: 14px; }
  body.wb-catalog .volume-chapters { gap: 6px; padding-inline: 9px; }
  body.wb-catalog .chapter-tile { gap: 5px; padding: 9px 6px; }
  body.wb-catalog .chapter-tile strong { font-size: 11px; }
  body.wb-reader .reader-toolbar { padding-inline: 8px; }
  body.wb-reader .reader-toolbar a,
  body.wb-reader .reader-toolbar button { padding-inline: 6px; font-size: 10px; }
  body.wb-reader .chapter { padding-inline: 20px; }
}

@media (max-width: 360px) {
  body.wb-extra-detail .ex-detail-card {
    padding: 18px 14px;
  }

  body.wb-extra-detail .ex-detail-card h1 {
    font-size: 21px;
  }

  body.wb-extra-detail .ex-detail-facts {
    gap: 6px;
  }

  body.wb-extra-detail .ex-detail-facts div {
    padding: 8px 7px;
  }
}

/* Mobile polish pass: tighter rhythm for real phone reading. */
.mobile-site .mobile-shell {
  padding-top: max(10px, env(safe-area-inset-top));
  padding-inline: 10px;
}

.mobile-brand {
  padding-bottom: 9px;
}

.mobile-logo {
  font-size: 23px;
}

.mobile-brand p {
  font-size: 10px;
}

.mobile-book-card {
  gap: 10px;
  padding: 10px;
}

.mobile-book-main {
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 10px;
}

.mobile-site .novel-cover {
  width: 98px;
  height: 147px;
}

.mobile-book-topline {
  margin-bottom: 8px;
}

.mobile-site .tag-row span {
  height: 23px;
  padding: 0 9px;
  font-size: 11px;
}

.mobile-status-dot {
  font-size: 11px;
}

.mobile-book-copy h1 {
  margin-bottom: 6px;
  font-size: clamp(24px, 6.5vw, 29px);
}

.mobile-site .novel-line {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.42;
}

.mobile-site .latest-line {
  display: flex;
  gap: 7px;
  align-items: baseline;
  font-size: 11px;
}

.mobile-site .latest-line strong {
  min-width: 0;
  font-size: 14px;
}

.mobile-site .mobile-metrics {
  gap: 6px;
}

.mobile-site .mobile-metrics div {
  padding: 7px 8px;
}

.mobile-site .mobile-metrics dt {
  font-size: 10px;
}

.mobile-site .mobile-metrics dd {
  margin-top: 5px;
  font-size: 16px;
}

.mobile-site .read-button,
.mobile-secondary-link {
  min-height: 32px;
}

.mobile-site .read-button {
  padding-inline: 13px;
  font-size: 13px;
}

.mobile-secondary-link {
  padding-inline: 13px;
  font-size: 13px;
}

.mobile-panel {
  margin-top: 10px;
  padding: 12px;
}

.mobile-section-title {
  margin-bottom: 8px;
}

.mobile-section-title h2 {
  font-size: 19px;
}

.mobile-site .intro-card p {
  font-size: 13px;
  line-height: 1.72;
}

.mobile-site .update-list a {
  padding: 9px 0 4px;
}

.mobile-site .update-list p {
  margin-bottom: 9px;
}

.mobile-page-head {
  gap: 4px 10px;
  margin-bottom: 9px;
  padding-top: 1px;
}

.mobile-page-head > a {
  font-size: 12px;
}

.mobile-page-head > span {
  padding: 4px 9px;
  font-size: 11px;
}

.mobile-page-head h1 {
  font-size: clamp(29px, 8.4vw, 35px);
}

.mobile-catalog .catalog-stats {
  gap: 5px;
  margin-top: 3px;
}

.mobile-catalog .catalog-stats div {
  padding: 6px 7px;
}

.mobile-catalog .catalog-stats dt {
  font-size: 9px;
}

.mobile-catalog .catalog-stats dd {
  margin-top: 5px;
  font-size: 13px;
}

.mobile-tool-card {
  gap: 7px;
  margin-bottom: 10px;
  padding: 8px;
}

.mobile-catalog .catalog-toolbar {
  grid-template-columns: minmax(102px, 0.9fr) minmax(0, 1fr);
  align-items: center;
}

.mobile-catalog .volume-tabs {
  min-width: 0;
}

.mobile-catalog .volume-tabs a,
.mobile-extras .extra-filter button {
  min-height: 29px;
  padding-inline: 10px;
  font-size: 12px;
}

.mobile-extras .extra-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}

.mobile-extras .extra-filter button {
  width: 100%;
  min-width: 0;
  padding-inline: 0;
}

.mobile-catalog .volume-tabs small {
  min-width: 17px;
  height: 17px;
  font-size: 9px;
}

.mobile-catalog .chapter-search input {
  height: 32px;
  padding-inline: 12px;
  font-size: 12px;
}

.mobile-catalog .continue-reading {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 11px;
}

.mobile-catalog .continue-reading > span,
.mobile-catalog .continue-reading small {
  font-size: 11px;
}

.mobile-catalog .continue-reading strong {
  font-size: 13px;
}

.mobile-catalog .volume-head {
  margin-bottom: 5px;
}

.mobile-catalog .volume-head h2 {
  font-size: 19px;
}

.mobile-catalog .catalog-list a {
  grid-template-columns: 55px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
}

.mobile-catalog .catalog-list span,
.mobile-catalog .catalog-list time {
  font-size: 11px;
}

.mobile-catalog .catalog-list strong {
  font-size: 14px;
}

.mobile-catalog .catalog-row button {
  min-height: 27px;
  padding-inline: 8px;
  font-size: 10px;
}

.mobile-catalog .chapter-summary {
  margin-left: 63px;
  font-size: 11px;
  line-height: 1.52;
}

.mobile-extras .extras-stage {
  margin-bottom: 10px;
}

.mobile-extras .extras-board {
  gap: 10px;
}

.mobile-extras .extra-card__body {
  gap: 7px;
  padding: 12px;
}

.mobile-extras .extra-card__body h2 {
  font-size: 19px;
}

.mobile-extras .extra-card--profile-photo {
  grid-template-columns: 88px minmax(0, 1fr);
}

.mobile-extras .extra-card--profile .extra-card__media {
  padding: 9px 0 9px 9px;
}

.mobile-extras .extra-card--profile .extra-card__media img {
  width: 78px;
  height: 112px;
}

.mobile-extras .extra-card--profile .extra-card__body {
  padding: 10px 11px 10px 7px;
}

.mobile-extras .extra-card--profile .extra-card__body h2 {
  font-size: 21px;
}

.mobile-extras .extra-profile-status {
  padding: 7px 9px;
}

.mobile-extras .extra-expand-button,
.mobile-extras .extra-card--profile .extra-card__link {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 11px;
}

.mobile-site .home-tabbar {
  width: min(calc(100% - 20px), 410px);
  height: 56px;
  bottom: max(8px, env(safe-area-inset-bottom));
}

@media (max-width: 360px) {
  .mobile-book-main {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .mobile-site .novel-cover {
    width: 88px;
    height: 132px;
  }

  .mobile-catalog .catalog-toolbar {
    grid-template-columns: minmax(96px, 0.86fr) minmax(0, 1fr);
  }

  .mobile-extras .extra-card--profile-photo {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .mobile-extras .extra-card--profile .extra-card__media img {
    width: 70px;
    height: 104px;
  }
}

/* Homepage replica pass based on the provided mobile mockup. */
.mobile-home {
  background:
    radial-gradient(circle at 86% 3%, rgba(255, 255, 255, 0.95), transparent 19%),
    radial-gradient(circle at 14% 11%, rgba(117, 165, 211, 0.2), transparent 27%),
    linear-gradient(180deg, #eaf5fd 0%, #f4f9fd 28%, #e8f3fb 100%);
}

.mobile-home .mobile-shell {
  padding: 12px 15px calc(92px + env(safe-area-inset-bottom));
}

.mobile-home .mobile-brand {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  grid-template-areas:
    "logo author"
    "slogan author";
  column-gap: 12px;
  min-height: 66px;
  padding: 6px 16px 10px;
  overflow: hidden;
}

.mobile-home .mobile-brand::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 18px;
  width: 34px;
  height: 62px;
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(54, 105, 171, 0.34), rgba(54, 105, 171, 0));
  transform: rotate(-28deg);
}

.mobile-home .mobile-logo {
  grid-area: logo;
  gap: 7px;
  padding-left: 22px;
  color: #142137;
  font-size: 29px;
  line-height: 1.05;
  text-shadow: 0 8px 20px rgba(76, 119, 160, 0.12);
}

.mobile-home .mobile-logo i {
  width: 16px;
  background: linear-gradient(90deg, #a8c8e8, #5d92d4, #a8c8e8);
}

.mobile-home .mobile-brand > p {
  grid-area: slogan;
  max-width: none;
  padding-left: 25px;
  margin-top: 4px;
  color: #3f79c6;
  font-size: 14px;
  line-height: 1;
  text-align: left;
  text-overflow: clip;
}

.mobile-author {
  grid-area: author;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-self: start;
  align-items: center;
  margin-top: 0;
  color: #1d2b40;
}

.mobile-author span {
  grid-row: 1 / 3;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #bcd8f3, #4f7dce);
  box-shadow: 0 8px 22px rgba(67, 112, 181, 0.22);
  font-size: 19px;
  font-weight: 900;
}

.mobile-author strong,
.mobile-author small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-author strong {
  font-size: 14px;
  line-height: 1.2;
}

.mobile-author small {
  color: #5e6c80;
  font-size: 11px;
}

.mobile-home .mobile-book-card,
.mobile-home .mobile-panel {
  border: 1px solid rgba(182, 205, 225, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.86)),
    radial-gradient(circle at 100% 100%, rgba(116, 160, 203, 0.13), transparent 34%);
  box-shadow: 0 18px 46px rgba(91, 128, 164, 0.15);
}

.mobile-home .mobile-book-card {
  gap: 0;
  padding: 12px;
}

.mobile-home .mobile-book-main {
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.mobile-home .novel-cover {
  width: 120px;
  height: 180px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(24, 40, 64, 0.22);
}

.mobile-home .mobile-book-copy {
  padding: 0;
}

.mobile-home .mobile-book-topline {
  justify-content: flex-start;
  margin-bottom: 7px;
}

.mobile-home .tag-row span {
  height: 25px;
  max-width: 130px;
  border-color: rgba(96, 146, 210, 0.22);
  padding: 0 13px;
  color: #477dc7;
  background: rgba(237, 246, 255, 0.92);
  font-size: 12px;
}

.mobile-home .mobile-status-dot {
  display: none;
}

.mobile-home .mobile-book-copy h1 {
  margin-bottom: 7px;
  color: #172338;
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: 0;
}

.mobile-home .novel-line {
  display: block;
  margin-bottom: 8px;
  color: #4d80c3;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-home .mobile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 8px;
  border-top: 1px solid rgba(164, 190, 217, 0.58);
  border-bottom: 1px solid rgba(164, 190, 217, 0.58);
  padding: 7px 0;
}

.mobile-home .mobile-metrics div {
  border: 0;
  border-radius: 0;
  padding: 0 6px;
  background: transparent;
  box-shadow: inset -1px 0 rgba(164, 190, 217, 0.5);
}

.mobile-home .mobile-metrics div:last-child {
  box-shadow: none;
}

.mobile-home .mobile-metrics dt {
  color: #68798c;
  font-size: 10px;
}

.mobile-home .mobile-metrics dd {
  margin-top: 5px;
  color: #172338;
  font-size: 14px;
  font-weight: 700;
}

.mobile-home .latest-line {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  color: #657489;
  font-size: 11px;
}

.mobile-home .latest-line strong {
  color: #172338;
  font-size: 12px;
}

.mobile-home .mobile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(94px, 0.76fr);
  gap: 8px;
  margin: 0;
}

.mobile-home .read-button,
.mobile-home .shelf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-home .read-button {
  width: 100%;
  max-width: none;
  border: 0;
  padding: 0 12px;
  color: #fff;
  background: linear-gradient(135deg, #7eb5ec, #4279ce);
  box-shadow: 0 12px 22px rgba(67, 121, 206, 0.26);
}

.mobile-home .read-button::before {
  content: "▮▮";
  margin-right: 7px;
  letter-spacing: -4px;
  transform: skewY(-8deg);
}

.mobile-home .shelf-button {
  border: 1px solid rgba(93, 142, 203, 0.22);
  padding: 0 10px;
  color: #4f7ec4;
  background: rgba(255, 255, 255, 0.76);
}

.mobile-home .shelf-button span {
  margin-right: 5px;
  font-size: 18px;
  line-height: 1;
}

.mobile-home .mobile-panel {
  margin-top: 14px;
  padding: 18px;
}

.mobile-home .mobile-section-title {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.mobile-home .section-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(104, 151, 208, 0.22);
  border-radius: 999px;
  color: #4f83cf;
  background: linear-gradient(145deg, #f5fbff, #dbefff);
  box-shadow: 0 8px 18px rgba(74, 120, 170, 0.12);
  font-size: 16px;
}

.mobile-home .mobile-section-title h2 {
  color: #172338;
  font-size: 24px;
  line-height: 1.1;
}

.mobile-home .mobile-section-title a {
  color: #52667d;
  font-size: 13px;
  font-weight: 500;
}

.mobile-home .intro-card p {
  color: #303d50;
  font-size: 15px;
  line-height: 1.9;
  text-align: justify;
}

.mobile-home .updates-card .update-list {
  border: 1px solid rgba(181, 205, 228, 0.62);
  border-radius: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.5);
}

.mobile-home .update-list li {
  position: relative;
  border-color: rgba(181, 205, 228, 0.58);
  padding-left: 16px;
  min-width: 0;
  max-width: 100%;
}

.mobile-home .update-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 7px;
  height: 7px;
  border: 3px solid rgba(143, 184, 230, 0.32);
  border-radius: 999px;
  background: #6b9fe0;
}

.mobile-home .update-list a {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 0 3px;
  min-width: 0;
  max-width: 100%;
}

.mobile-home .update-list strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #172338;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-home .update-list time {
  color: #6d788a;
  font-size: 12px;
}

.mobile-home .update-list p {
  display: block;
  margin: 0 0 12px;
  max-width: 100%;
  overflow: hidden;
  color: #5f6c7d;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-home .update-list .is-new strong::after {
  content: "NEW";
  display: inline-flex;
  align-items: center;
  height: 19px;
  margin-left: 8px;
  border-radius: 999px;
  padding: 0 8px;
  color: #fff;
  background: linear-gradient(135deg, #79a8ed, #4d78cf);
  font-size: 10px;
  vertical-align: 2px;
}

.mobile-home .home-tabbar {
  grid-template-columns: repeat(4, 1fr);
  height: 62px;
  border-color: rgba(181, 205, 228, 0.66);
}

.mobile-home .home-tabbar a {
  font-size: 12px;
}

.mobile-home .home-tabbar span {
  font-size: 20px;
}

@media (max-width: 360px) {
  .mobile-home .mobile-shell {
    padding-inline: 10px;
  }

  .mobile-home .mobile-brand {
    padding-inline: 10px;
  }

  .mobile-home .mobile-logo {
    padding-left: 16px;
    font-size: 28px;
  }

  .mobile-home .mobile-brand > p {
    padding-left: 18px;
    font-size: 13px;
  }

  .mobile-home .mobile-book-main {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 13px;
  }

  .mobile-home .novel-cover {
    width: 112px;
    height: 168px;
  }

  .mobile-home .mobile-book-copy h1 {
    font-size: 27px;
  }

  .mobile-home .novel-line {
    font-size: 14px;
  }

  .mobile-home .mobile-metrics dd {
    font-size: 15px;
  }

  .mobile-home .mobile-actions {
    grid-template-columns: 1fr;
  }

  .mobile-home .shelf-button {
    display: none;
  }
}

/* ============================================================
   WorkBuddy restore: home + extras
   Scope: index.html(.wb-home) and extras.html(.wb-extras)
   ============================================================ */
body.hp-page {
  --paper: #eef1f6;
  --paper-2: #ffffff;
  --blue: #3b6ef5;
  --blue-deep: #2f5bd8;
  --blue-soft: #e8f0fe;
  --ink: #1f2733;
  --ink-2: #5b6573;
  --ink-3: #9aa3b0;
  --line: #e6ebf2;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Helvetica Neue", sans-serif;
  --topbar-h: 50px;
  --tabbar-h: 58px;
  --content-max: 430px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  margin: 0;
  min-height: 100vh;
  background-color: #e9eef5;
  background-image: url("../assets/workbuddy-bg-home.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.hp-page *,
body.hp-page *::before,
body.hp-page *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body.hp-page a {
  color: var(--blue-deep);
  text-decoration: none;
}

body.hp-page img {
  display: block;
  max-width: 100%;
}

body.hp-page button {
  font: inherit;
}

body.hp-page .app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  /* The supplied artwork is a 9:16 mobile backdrop. Keep it inside the phone canvas. */
  background-color: #e9eef5;
  background-image: url("../assets/workbuddy-bg-home.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
}

body.hp-page .hp {
  position: relative;
  width: 100%;
  max-width: var(--content-max);
  min-height: 100vh;
  margin: 0 auto;
  padding: 8px 12px 24px;
}

body.wb-home .hp-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 6px 4px;
}

body.wb-home .hp-brand > a:first-child {
  display: block;
  min-width: 0;
}

body.wb-home .hp-logo {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

body.wb-home .hp-brand-r {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
  margin-top: 6px;
}

body.wb-home .hp-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #74a0ff, #3b6ef5);
  box-shadow: 0 4px 12px rgba(59, 110, 245, .35);
  font-size: 20px;
  font-weight: 700;
}

body.wb-home .hp-author-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
}

body.wb-home .hp-name {
  max-width: 82px;
  overflow: hidden;
  color: #1a2332;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-home .hp-role {
  margin-top: 2px;
  color: #94a0b2;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

body.wb-home .hp-hero {
  display: flex;
  align-items: stretch;
  gap: 12px;
  border: 1px solid rgba(228, 233, 240, .75);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 24px -10px rgba(26, 35, 50, .12);
}

body.wb-home .hp-cover-wrap {
  position: relative;
  flex: 0 0 47%;
  max-width: 190px;
  overflow: hidden;
  border-radius: 10px;
  background: #e8ecf2;
  aspect-ratio: 3 / 4;
}

body.wb-home .hp-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.wb-home .hp-info {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

body.wb-home .hp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

body.wb-home .hp-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 8px;
  color: #3b6ef5;
  background: #eaf0fe;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .3px;
  line-height: 1.3;
  white-space: nowrap;
}

body.wb-home .hp-book-title {
  margin: 0;
  color: #1a2332;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.25;
  white-space: nowrap;
}

body.wb-home .hp-tagline {
  display: -webkit-box;
  margin: 4px 0 7px;
  overflow: hidden;
  color: #5d6a7e;
  font-size: 12.5px;
  letter-spacing: .2px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.wb-home .hp-stats {
  display: flex;
  align-items: stretch;
  margin: 0 0 6px;
  border-top: 1px solid #f0f3f8;
  border-bottom: 1px solid #f0f3f8;
  padding: 7px 0;
}

body.wb-home .hp-stat {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  text-align: center;
}

body.wb-home .hp-stat + .hp-stat::before {
  content: "";
  position: absolute;
  top: 16%;
  bottom: 16%;
  left: 0;
  width: 1px;
  background: #f0f3f8;
}

body.wb-home .hp-stat-label {
  display: block;
  margin-bottom: 3px;
  color: #94a0b2;
  font-size: 11px;
  letter-spacing: .5px;
}

body.wb-home .hp-stat-val {
  margin: 0;
  overflow: hidden;
  color: #1a2332;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-home .hp-meta {
  margin: 0 0 3px;
  color: #94a0b2;
  font-size: 11px;
  line-height: 1.45;
}

body.wb-home .hp-meta b {
  color: #5d6a7e;
  font-weight: 600;
}

body.wb-home .hp-current {
  margin: 0 0 4px;
  overflow: hidden;
  color: #3b6ef5;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-home .hp-actions {
  display: flex;
  justify-content: flex-start;
  gap: 9px;
  margin-top: 7px;
}

body.wb-home .hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
}

body.wb-home .hp-btn-read {
  flex: 0 0 auto;
  padding: 9px 19px;
  color: #fff;
  background: #3b6ef5;
  box-shadow: 0 6px 18px -8px rgba(59, 110, 245, .55);
}

body.wb-home .hp-read-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  transform: translateY(1px);
}

body.wb-home .hp-section {
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid rgba(228, 233, 240, .75);
  border-radius: 15px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 8px 28px -12px rgba(26, 35, 50, .12);
}

body.wb-home .hp-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px 0;
}

body.wb-home .hp-sec-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #1a2332;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.35;
}

body.wb-home .hp-sec-ico {
  color: #3b6ef5;
  font-size: 16px;
  line-height: 1;
}

body.wb-home .hp-sec-more {
  color: #94a0b2;
  font-size: 12.5px;
  letter-spacing: .3px;
  white-space: nowrap;
}

body.wb-home .hp-intro-body {
  padding: 10px 15px 15px;
}

body.wb-home .hp-intro-body p {
  margin: 0 0 .85em;
  color: #5d6a7e;
  font-size: 13.5px;
  letter-spacing: .2px;
  line-height: 1.95;
}

body.wb-home .hp-intro-body p:last-child {
  margin-bottom: 0;
}

body.wb-home .hp-up-list {
  padding: 4px 12px 12px;
}

body.wb-home .hp-up-item {
  display: block;
  border-bottom: 1px solid #f5f7fa;
  padding: 11px 3px;
}

body.wb-home .hp-up-item:last-child {
  border-bottom: 0;
}

body.wb-home .hp-up-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

body.wb-home .hp-up-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 1px;
  border-radius: 999px;
  background: #3b6ef5;
}

body.wb-home .hp-up-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #1a2332;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

body.wb-home .hp-new {
  flex: 0 0 auto;
  margin-left: 4px;
  border-radius: 99px;
  padding: 1.5px 7px;
  color: #3b6ef5;
  background: #eaf0fe;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.25;
}

body.wb-home .hp-up-date {
  flex: 0 0 auto;
  margin-left: 6px;
  color: #b0b9ca;
  font-size: 11.5px;
  line-height: 1.4;
}

body.wb-home .hp-up-preview {
  margin: 0;
  padding-left: 14px;
  overflow: hidden;
  color: #94a0b2;
  font-size: 12px;
  letter-spacing: .2px;
  line-height: 1.65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-home .hp-up-summary-row {
  display: flex;
  justify-content: flex-start;
  padding-left: 14px;
}

body.wb-home .hp-up-toggle {
  border: 0;
  padding: 0;
  color: #7792ae;
  background: transparent;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
}

body.wb-home .hp-up-preview:not([hidden]) {
  display: block;
  margin-top: 5px;
  overflow: visible;
  white-space: normal;
  line-height: 1.7;
}

body.hp-page .hp-tabbar,
body.hp-page .tabbar {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  display: flex;
  width: 100%;
  max-width: var(--content-max);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  border-top: 1px solid #e4e9f0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

body.hp-page .hp-tabbar a,
body.hp-page .tabbar a {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9aa3b0;
  font-size: 11px;
  letter-spacing: 1px;
}

body.hp-page .hp-tabbar a svg,
body.hp-page .tabbar a svg {
  width: 22px;
  height: 22px;
}

body.hp-page .hp-tabbar a.active,
body.hp-page .tabbar a.active {
  color: #3b6ef5;
}

body.hp-page .hp-tabbar a.active svg,
body.hp-page .tabbar a.active svg {
  fill: #3b6ef5;
  stroke: #3b6ef5;
}

body.wb-extras .topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: var(--topbar-h);
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

body.wb-extras .topbar .title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 3px;
}

body.wb-extras .topbar .back {
  position: absolute;
  top: 50%;
  left: 8px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: translateY(-50%);
  color: var(--blue-deep);
}

body.wb-extras .topbar .back svg {
  width: 21px;
  height: 21px;
}

body.wb-extras .extras-page {
  padding: 0 0 30px;
}

/* 一级页由底部导航负责定位，不重复占用顶部空间。 */
body.wb-extras .ex-filter {
  top: 0;
  display: flex;
  width: fit-content;
  max-width: calc(100% - 24px);
  gap: 2px;
  margin: max(8px, calc(5px + env(safe-area-inset-top, 0px))) auto 8px;
  overflow-x: auto;
  border: 1px solid rgba(194, 213, 230, .7);
  border-radius: 15px;
  padding: 5px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 20px rgba(59, 99, 139, .08);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  transition: transform .2s ease, opacity .2s ease;
  will-change: transform;
}

body.wb-extras .ex-filter.is-condensed {
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(-100% - 2px));
}

body.wb-extras .ex-pill {
  min-height: 30px;
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  color: #718397;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

body.wb-extras .ex-pill.on,
body.wb-extras .ex-pill.is-active {
  background: #5c8ec8;
  box-shadow: 0 4px 10px rgba(80, 132, 190, .18);
}

body.wb-extras .ex-pill i {
  display: none;
}

/* 分类胶囊脱离整条工具栏后，为首张卡预留起始空间；滚动时内容再从其下方经过。 */
body.wb-extras .ex-stream {
  padding-top: 8px;
}

body.wb-extras .ex-b-blue,
body.wb-extras .c-blue {
  --mc: #3b6ef5;
  --ms: #e8f0fe;
}

body.wb-extras .ex-b-teal,
body.wb-extras .c-teal {
  --mc: #14b8a6;
  --ms: #d9f2ec;
}

body.wb-extras .ex-b-amber,
body.wb-extras .c-amber {
  --mc: #f59e0b;
  --ms: #fdeccb;
}

body.wb-extras .ex-b-purple,
body.wb-extras .c-purple {
  --mc: #8b5cf6;
  --ms: #efe9fd;
}

body.wb-extras .ex-b-rose,
body.wb-extras .c-rose {
  --mc: #ec4899;
  --ms: #fce4ef;
}

body.wb-extras .ex-filter {
  position: sticky;
  z-index: 39;
  top: var(--topbar-h);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  background: rgba(255, 255, 255, .82);
  scrollbar-width: none;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

body.wb-extras .ex-filter::-webkit-scrollbar {
  display: none;
}

body.wb-extras .ex-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink-2);
  background: var(--paper-2);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

body.wb-extras .ex-pill i {
  color: var(--ink-3);
  font-size: 10px;
  font-style: normal;
}

body.wb-extras .ex-pill.on,
body.wb-extras .ex-pill.is-active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

body.wb-extras .ex-pill.on i,
body.wb-extras .ex-pill.is-active i {
  color: rgba(255, 255, 255, .85);
}

body.wb-extras .ex-stream {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
}

body.wb-extras .ex-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: none;
  backdrop-filter: saturate(140%) blur(3px);
  -webkit-backdrop-filter: saturate(140%) blur(3px);
}

body.wb-extras .ex-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--mc, #3b6ef5);
  background: var(--ms, #e8f0fe);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .5px;
  line-height: 1.4;
}

body.wb-extras .ex-badge-tr {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
}

body.wb-extras .ex-ctitle {
  margin: 0 64px 2px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  line-height: 1.4;
}

body.wb-extras .ex-meta {
  display: block;
  margin: 1px 0 5px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.5;
}

body.wb-extras .ex-excerpt {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

body.wb-extras .ex-text.ex-wide {
  padding: 16px 14px;
}

body.wb-extras .ex-char {
  display: flex;
  height: 120px;
  padding: 0;
}

body.wb-extras .ex-photo-wrap {
  position: relative;
  flex: 0 0 90px;
  width: 90px;
  background: #cdd8e8;
}

body.wb-extras .ex-photo-wrap img,
body.wb-extras .ex-photo-fb {
  display: grid;
  width: 90px;
  height: 120px;
  place-items: center;
  color: #fff;
  background: #cdd8e8;
  font-size: 26px;
  object-fit: contain;
}

body.wb-extras .ex-char-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px 12px;
}

body.wb-extras .ex-char-main .ex-ctitle {
  margin-right: 42px;
  padding-right: 0;
  font-size: 13.5px;
  letter-spacing: .3px;
  line-height: 1.2;
  white-space: nowrap;
}

body.wb-extras .ex-tagline {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.wb-extras .ex-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
}

body.wb-extras .ex-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

body.wb-extras .ex-stat .k {
  color: var(--ink-3);
  font-size: 9px;
  line-height: 1.25;
}

body.wb-extras .ex-stat .v {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-rel {
  padding: 0;
}

body.wb-extras .ex-rel > img,
body.wb-extras .ex-rel-fb {
  display: flex;
  width: 100%;
  height: 168px;
  align-items: center;
  justify-content: center;
  color: #a9742a;
  background: #fdeccb;
  font-size: 13px;
  object-fit: cover;
}

body.wb-extras .ex-rel .ex-cap {
  margin: 0;
  padding: 10px 14px 14px;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.55;
}

@media (max-width: 360px) {
  body.wb-home .hp {
    padding-inline: 10px;
  }

  body.wb-home .hp-brand {
    padding-inline: 2px 4px;
  }

  body.wb-home .hp-logo {
    width: 178px;
  }

  body.wb-home .hp-avatar {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  body.wb-home .hp-name {
    max-width: 66px;
    font-size: 13px;
  }

  body.wb-home .hp-role {
    font-size: 10px;
  }

  body.wb-home .hp-hero {
    gap: 10px;
    padding: 10px;
  }

  body.wb-home .hp-book-title {
    font-size: 17px;
  }

  body.wb-home .hp-tagline {
    font-size: 11.5px;
  }

  body.wb-home .hp-stat-label {
    font-size: 10px;
  }

  body.wb-home .hp-stat-val {
    font-size: 13px;
  }

  body.wb-home .hp-btn-read {
    padding-inline: 15px;
    font-size: 12.5px;
  }
}

/* Final override: the extras filter is a compact floating category capsule. */
body.wb-extras .ex-filter {
  position: sticky;
  z-index: 39;
  top: 0;
  display: flex;
  width: fit-content;
  max-width: calc(100% - 24px);
  gap: 2px;
  margin: max(8px, calc(5px + env(safe-area-inset-top, 0px))) auto 8px;
  overflow-x: auto;
  border: 1px solid rgba(194, 213, 230, .7);
  border-radius: 15px;
  padding: 5px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 20px rgba(59, 99, 139, .08);
  scrollbar-width: none;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  transition: transform .2s ease, opacity .2s ease;
  will-change: transform;
}

body.wb-extras .ex-filter::-webkit-scrollbar { display: none; }
body.wb-extras .ex-filter.is-condensed { pointer-events: none; opacity: 0; transform: translateY(calc(-100% - 2px)); }

body.wb-extras .ex-pill {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 30px;
  align-items: center;
  gap: 0;
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  color: #718397;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

body.wb-extras .ex-pill.on,
body.wb-extras .ex-pill.is-active {
  border-color: transparent;
  color: #fff;
  background: #5c8ec8;
  box-shadow: 0 4px 10px rgba(80, 132, 190, .18);
}

body.wb-extras .ex-pill i { display: none; }

body.wb-extras .ex-stream { padding: 8px 10px 10px; }

/* Homepage color restraint: only the primary reading button keeps the vivid blue. */
body.wb-home .hp-brand-r { margin-top: 0; padding-right: 4px; }
body.wb-home .hp-pill { color: #5c8ec8; background: #edf5fc; }
body.wb-home .hp-current,
body.wb-home .hp-sec-ico { color: #5c8ec8; }
body.wb-home .hp-up-dot { background: #5c8ec8; }
body.wb-home .hp-new { color: #5c8ec8; background: #edf5fc; }
body.wb-home .hp-tabbar a.active { color: #5c8ec8; }
body.wb-home .hp-tabbar a.active svg { fill: #5c8ec8; stroke: #5c8ec8; }

/* Public rhythm tokens: front pages share one restrained 4px scale. */
body.hp-page {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --accent-muted: #5c8ec8;
  --accent-soft: #edf5fc;
}

body.wb-home .hp-reading-progress {
  margin: 1px 0 0;
  overflow: hidden;
  color: #7b91a8;
  font-size: 10.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-home .hp-reading-progress::before {
  content: "阅读进度";
  margin-right: 5px;
  color: #9aa9b8;
}

body.wb-extras .ex-world {
  display: grid;
  gap: 5px;
  min-height: 0;
}

body.wb-extras .ex-world-terms {
  display: grid;
  gap: 4px;
  margin-top: 1px;
}

body.wb-extras .ex-world-terms span {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 6px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-world-terms b {
  overflow: hidden;
  color: #5c8ec8;
  font-weight: 600;
  text-overflow: ellipsis;
}

body.wb-extra-detail .ex-detail-person-link,
body.wb-extra-detail .ex-detail-person-muted {
  display: inline;
  color: inherit;
  font: inherit;
}

body.wb-extra-detail .ex-detail-person-link {
  border-bottom: 1px solid rgba(92, 142, 200, .38);
  color: #426f9e;
}

body.wb-extra-detail .ex-detail-related {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

body.wb-extra-detail .ex-detail-related h2,
body.wb-extra-detail .ex-relation-timeline h2 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 14px;
}

body.wb-extra-detail .ex-detail-related > div {
  display: grid;
  gap: 7px;
}

body.wb-extra-detail .ex-detail-related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 9px;
  padding: 9px 10px;
  color: var(--ink);
  background: #f8fbff;
  font-size: 12px;
}

body.wb-extra-detail .ex-detail-related b {
  overflow: hidden;
  color: #6f8297;
  font-size: 11px;
  font-weight: 400;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extra-detail .ex-world-glossary {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

body.wb-extra-detail .ex-world-glossary div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

body.wb-extra-detail .ex-world-glossary div:first-child { border-top: 0; }
body.wb-extra-detail .ex-world-glossary dt { color: #5c8ec8; font-size: 12px; font-weight: 600; }
body.wb-extra-detail .ex-world-glossary dd { margin: 0; color: var(--ink-2); font-size: 12px; font-weight: 400; line-height: 1.65; }

/* Compliance footer stays present without competing with the reading path. */
body.hp-page .site-record {
  margin: 16px 0 2px;
  padding: 0 12px;
  color: #9aa8b7;
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

body.hp-page .site-record a {
  color: inherit;
}

body.hp-page .site-record a:active {
  color: #5c8ec8;
}

body.wb-extra-detail .site-record--detail {
  margin: 0;
  padding: 2px 12px 26px;
}

.site-record--plain {
  margin-top: 18px;
  color: #8d9bab;
  font-size: 12px;
  text-align: center;
}

.site-record--plain a { color: inherit; }

/* Compact mobile controls retain the visual scale while meeting a reliable touch target. */
body.wb-home .hp-btn-read {
  min-height: 36px;
  padding-block: 10px;
}

body.wb-catalog .volume-tabs a,
body.wb-extras .ex-pill {
  min-height: 36px;
}

body.wb-catalog .catalog-directory-head button {
  min-height: 36px;
  padding-block: 5px;
}

body.wb-catalog .continue-reading a {
  display: flex;
  min-height: 36px;
  flex-direction: column;
  justify-content: center;
}

body.hp-page .site-record a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
}

body.wb-reader .reader-toolbar button,
body.wb-reader .reader-toolbar .catalog-button {
  min-height: 36px;
}

body.wb-reader .font-stepper button {
  min-width: 36px;
}

/* Character cards use their horizontal room as a compact game profile instead of a vertical form. */
body.wb-extras .ex-char-main {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: center;
  gap: 8px;
  padding: 9px 12px;
}

body.wb-extras .ex-char-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

body.wb-extras .ex-char-main .ex-ctitle {
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

body.wb-extras .ex-game-id {
  overflow: hidden;
  color: #5c8ec8;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-tagline {
  display: block;
  overflow: hidden;
  min-height: 13px;
  color: #8a9aac;
  font-size: 10.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-stats {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-self: end;
  gap: 4px 12px;
}

body.wb-extras .ex-stat {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
}

body.wb-extras .ex-stat .k {
  flex: 0 0 auto;
  color: #9aa8b8;
  font-size: 9px;
  line-height: 1.2;
}

body.wb-extras .ex-stat .v {
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-stat--identity { min-width: 0; }

/* Character-card reading order: begin immediately after the portrait, then use each row horizontally. */
body.wb-extras .ex-char-main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  align-content: initial;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
}

body.wb-extras .ex-char-title-row {
  justify-content: flex-start;
}

body.wb-extras .ex-stats {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  align-self: auto;
  gap: 8px 16px;
  margin-top: 8px;
}

body.wb-extras .ex-stat {
  display: grid;
  min-width: 0;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 5px;
}

body.wb-extras .ex-stat .k,
body.wb-extras .ex-stat .v {
  display: block;
  text-align: left;
  white-space: nowrap;
}

/* World notes stay text-led; relationship cards communicate a pair before any optional map. */
body.wb-extras .ex-group-worldview .ex-text {
  min-height: 104px;
  border-color: rgba(192, 212, 231, .72);
  background: rgba(255, 255, 255, .9);
}

body.wb-extras .ex-group-worldview .ex-text::before {
  position: absolute;
  top: 17px;
  left: 14px;
  width: 3px;
  height: 36px;
  border-radius: 3px;
  background: #8fb2da;
  content: "";
}

body.wb-extras .ex-group-worldview .ex-ctitle,
body.wb-extras .ex-group-worldview .ex-meta,
body.wb-extras .ex-group-worldview .ex-excerpt { margin-left: 10px; }

body.wb-extras .ex-relation {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px 14px;
  border-color: rgba(231, 205, 153, .8);
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 250, 239, .9));
}

body.wb-extras .ex-relation-people {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-right: 48px;
}

body.wb-extras .ex-relation-people strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-relation-people strong:last-child { text-align: right; }

body.wb-extras .ex-relation-link {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(217, 179, 98, .55);
  border-radius: 999px;
  padding: 0 8px;
  color: #a97823;
  background: #fff9eb;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-relation-status,
body.wb-extras .ex-relation-chapter {
  overflow: hidden;
  color: #738396;
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wb-extras .ex-relation-chapter { color: #9aa8b8; font-size: 9.5px; }

body.wb-extra-detail .ex-detail-relation header h1 i {
  margin: 0 6px;
  color: #a97823;
  font-size: .56em;
  font-style: normal;
  font-weight: 600;
}

body.wb-extra-detail .ex-relation-progress {
  margin: 0 0 14px;
  padding: 9px 11px;
  border-left: 3px solid #d9b362;
  color: #89744b;
  background: #fff9eb;
  font-size: 11px;
  line-height: 1.45;
}

body.wb-extra-detail .ex-relation-timeline {
  margin-top: 20px;
  padding: 0 0 0 13px;
  border-left: 1px solid #e7d4a8;
}

body.wb-extra-detail .ex-relation-timeline h2 {
  margin: 0 0 10px;
  color: #a97823;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* Desktop authoring: publish readiness stays visible without becoming a blocking dialog. */
.publish-check {
  border: 1px solid #d9e7f2;
  border-radius: 6px;
  padding: 12px 14px;
  background: #f9fcff;
}

.publish-check.has-warning { border-color: #ead9a8; background: #fffdf6; }

.publish-check__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #36536a;
  font-size: 13px;
}

.publish-check__head span {
  color: #5c8ec8;
  font-size: 12px;
  font-weight: 600;
}

.publish-check.has-warning .publish-check__head span { color: #ad7a28; }

.publish-check ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.publish-check li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: #668094;
  font-size: 12px;
  white-space: nowrap;
}

.publish-check li span { font-weight: 700; }
.publish-check li.is-ready span { color: #4e9d81; }
.publish-check li.is-missing span { color: #c28b35; }
.publish-check li small { overflow: hidden; color: #9aa8b8; text-overflow: ellipsis; }

/* Authoring is a desktop workbench. Reader-facing mobile conventions do not apply here. */
body:has(.admin-shell--wide) {
  min-width: 1080px;
  background: #f1f7f5;
}

.admin-shell--wide {
  width: min(calc(100% - 48px), 1440px);
  min-width: 1032px;
  padding: 24px 0 72px;
}

.admin-header {
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 22px;
  padding: 4px 2px 18px;
}

.admin-header div { text-align: left; }
.admin-header a { font-size: 18px; }
.admin-header strong { display: block; margin-top: 2px; font-size: 20px; }

.admin-bookbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 18px 20px;
}

.admin-bookbar h1 { font-size: 28px; }

.admin-tabs {
  position: sticky;
  top: 0;
  display: flex;
  gap: 4px;
  width: fit-content;
  margin: 0 0 16px;
  border: 1px solid #dbe8e5;
  border-radius: 7px;
  padding: 4px;
  background: rgba(250, 255, 253, .94);
  box-shadow: 0 8px 20px rgba(52, 92, 83, .08);
}

.admin-tabs button {
  min-width: 104px;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 15px;
  font-size: 13px;
}

.chapter-workbench {
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 16px;
}

.chapter-browser {
  top: 74px;
  padding: 18px;
}

.chapter-editor {
  min-width: 0;
  padding: 20px 22px;
}

.admin-panel { padding: 18px 20px; }
.admin-panel h1 { font-size: 20px; }
.admin-panel__head { margin-bottom: 16px; }

.admin-chapter-list { max-height: calc(100svh - 320px); }

.admin-chapter-list button {
  gap: 3px;
  padding: 10px 12px;
}

.chapter-filters {
  grid-template-columns: minmax(0, 1fr) 118px;
}

.bulk-import { grid-template-columns: auto auto minmax(0, 1fr); }
.bulk-import small { padding-left: 4px; }

.admin-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 14px;
}

.profile-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-form input,
.admin-form select,
.admin-form textarea,
.chapter-filters input,
.chapter-filters select,
.comment-filters input,
.comment-filters select { padding: 9px 11px; }

.chapter-editor .admin-form textarea[name="content"] {
  min-height: 620px;
  line-height: 1.8;
}

.editor-stats { grid-template-columns: 150px 150px minmax(0, 1fr); }
.admin-form__actions { justify-content: flex-end; }
.admin-preview-link { min-height: 40px; }

.admin-view#bookShelfView {
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr);
  align-items: start;
}

.admin-view#bookShelfView > .admin-panel { margin-bottom: 0; }
.comment-filters { grid-template-columns: minmax(240px, 1fr) 160px minmax(320px, 1.2fr); }

/* Chapter authoring: navigator | control rail | writing canvas. */
.chapter-editor {
  overflow: visible;
  background: #fff;
}

.chapter-editor > .admin-panel__head {
  padding-bottom: 14px;
  border-bottom: 1px solid #e5ecef;
}

.chapter-editor .txt-import {
  grid-template-columns: auto minmax(0, 1fr);
  margin: 16px 0;
  border-style: solid;
  border-color: #dde8ee;
  background: #f7fafc;
}

.chapter-form {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-width: 0;
  align-items: start;
  border: 1px solid #e1e9ee;
  background: #fff;
}

.chapter-meta-panel {
  position: sticky;
  top: 74px;
  display: grid;
  gap: 13px;
  align-self: start;
  padding: 16px;
  border-right: 1px solid #e1e9ee;
  background: #f8fbfc;
}

.chapter-meta-panel__title {
  padding-bottom: 10px;
  border-bottom: 1px solid #e1e9ee;
  color: #35566c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}

.chapter-meta-panel label,
.chapter-compose-panel label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.chapter-meta-panel label > span,
.chapter-compose-panel label > span {
  color: #7b8d9d;
  font-size: 12px;
  font-weight: 600;
}

.chapter-meta-panel input,
.chapter-meta-panel select,
.chapter-compose-panel input,
.chapter-compose-panel textarea {
  width: 100%;
  border: 1px solid #d9e4ea;
  border-radius: 5px;
  padding: 9px 10px;
  color: #203443;
  background: #fff;
  resize: vertical;
}

.chapter-compose-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px 20px 22px;
}

.chapter-compose-panel input[name="title"] {
  border-color: transparent;
  border-bottom-color: #d7e2e8;
  border-radius: 0;
  padding: 4px 0 10px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.chapter-compose-panel textarea[name="summary"] {
  min-height: 92px;
  color: #536b7c;
  line-height: 1.7;
  background: #fbfdfe;
}

.chapter-content-field {
  padding-top: 2px;
}

.chapter-compose-panel textarea[name="content"] {
  min-height: 720px;
  border-color: #dbe5ea;
  padding: 18px 20px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  line-height: 2;
  letter-spacing: .02em;
  background: #fff;
}

.chapter-compose-panel textarea:focus,
.chapter-compose-panel input:focus,
.chapter-meta-panel input:focus,
.chapter-meta-panel select:focus {
  border-color: #6d9ab5;
  outline: 3px solid rgba(109, 154, 181, .12);
}

.chapter-meta-panel .editor-stats {
  grid-template-columns: 1fr;
  gap: 6px;
}

.chapter-meta-panel .editor-stats span {
  border: 0;
  border-radius: 4px;
  padding: 7px 8px;
  color: #55768b;
  background: #edf4f7;
  font-size: 11px;
  font-weight: 700;
}

.chapter-meta-panel .publish-check {
  padding: 10px;
  border-radius: 5px;
}

.chapter-meta-panel .publish-check ul {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.chapter-meta-panel .publish-check li { font-size: 11px; }

.chapter-meta-panel .admin-form__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  justify-content: stretch;
}

.chapter-meta-panel .admin-form__actions > * { width: 100%; }

.chapter-meta-panel #chapterSaveButton {
  min-height: 42px;
  border-radius: 5px;
  background: #376d88;
  font-size: 13px;
}

.chapter-meta-panel .admin-preview-link {
  min-height: 38px;
  border-radius: 5px;
  font-size: 12px;
}

/* Shared desktop language for shelf, extras, moderation, and settings. */
.admin-shell {
  --teal: #376d88;
  --cinnabar: #a95a4b;
  --ink: #223542;
  --ink-soft: #748696;
  --line: #d9e3e9;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.admin-shell .admin-panel,
.admin-shell .admin-summary div,
.admin-shell .moderation-item {
  border-color: #dbe5ea;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(48, 73, 90, .045);
}

.admin-shell .admin-panel button {
  min-height: 36px;
  border-radius: 5px;
  padding: 0 12px;
  background: #376d88;
  font-size: 12px;
}

.admin-shell .admin-export { border-radius: 5px; background: #a95a4b; }
.admin-shell .admin-preview,
.admin-shell .admin-back { border-radius: 5px; }

.admin-shell .admin-tabs {
  border-radius: 6px;
  background: #fff;
}

.admin-shell .admin-tabs button {
  color: #667e90;
  background: transparent;
}

.admin-shell .admin-tabs button.is-active { background: #376d88; }

.admin-shell .book-item,
.admin-shell .extra-item,
.admin-shell .admin-chapter-list button {
  border-color: #dfe8ed;
  border-radius: 5px;
  background: #fff;
}

.admin-shell .book-item:hover,
.admin-shell .admin-chapter-list button:hover {
  border-color: #8fb1c4;
  background: #f6fafc;
}

.admin-shell .admin-form input,
.admin-shell .admin-form select,
.admin-shell .admin-form textarea,
.admin-shell .chapter-filters input,
.admin-shell .chapter-filters select,
.admin-shell .comment-filters input,
.admin-shell .comment-filters select {
  border-color: #d9e4ea;
  border-radius: 5px;
  background: #fff;
}

.admin-shell .admin-form input:focus,
.admin-shell .admin-form select:focus,
.admin-shell .admin-form textarea:focus,
.admin-shell .chapter-filters input:focus,
.admin-shell .chapter-filters select:focus,
.admin-shell .comment-filters input:focus,
.admin-shell .comment-filters select:focus {
  border-color: #6d9ab5;
  outline: 3px solid rgba(109, 154, 181, .12);
}

.admin-shell .bulk-import,
.admin-shell .txt-import,
.admin-shell .bulk-preview,
.admin-shell .profile-editor {
  border-color: #dbe5ea;
  border-radius: 6px;
  background: #f8fbfc;
}

/* --------------------------------------------------------------------------
   Author workbench v2: a desktop application, intentionally separate from
   the reader-facing visual language.                                         
   -------------------------------------------------------------------------- */
body.author-desktop {
  min-width: 1180px;
  color: #213240;
  background: #f3f6f8;
}

body.author-desktop .author-app {
  width: min(calc(100% - 64px), 1520px);
  min-width: 1116px;
  margin: 0 auto;
  padding: 22px 0 48px;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.author-desktop .author-topbar {
  display: grid;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid #dce5ea;
  padding: 0 0 16px;
}

body.author-desktop .author-brand {
  color: #213d50;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .08em;
}

body.author-desktop .author-topbar__title span,
body.author-desktop .author-topbar__title strong {
  display: block;
}

body.author-desktop .author-topbar__title span {
  color: #8697a5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
}

body.author-desktop .author-topbar__title strong {
  margin-top: 2px;
  color: #263b4a;
  font-size: 16px;
  font-weight: 700;
}

body.author-desktop .author-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.author-desktop .author-topbar__actions a,
body.author-desktop .author-topbar__actions button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d2dfe6;
  border-radius: 5px;
  padding: 0 12px;
  color: #587388;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

body.author-desktop .author-topbar__actions button {
  border-color: #426f89;
  color: #fff;
  background: #426f89;
}

body.author-desktop .author-topbar__actions .author-restore {
  border-color: #d2dfe6;
  color: #587388;
  background: #fff;
}

body.author-desktop .author-backup-status {
  color: #8a9aa5;
  font-size: 11px;
  white-space: nowrap;
}

body.author-desktop .admin-toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 80;
  width: auto;
  min-width: 280px;
  margin: 0;
  transform: translateX(-50%);
  border-color: #a9c4d4;
  border-radius: 5px;
  color: #244f68;
  background: #f6fbfe;
  box-shadow: 0 14px 34px rgba(35, 57, 72, .16);
}

body.author-desktop .author-shelf {
  display: grid;
  grid-template-columns: 260px 390px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-top: 30px;
}

body.author-desktop .shelf-intro {
  padding: 14px 6px;
}

body.author-desktop .shelf-intro > span,
body.author-desktop .author-panel__head > div > span,
body.author-desktop .chapter-navigator__head > div > span,
body.author-desktop .chapter-editor__head > div > span {
  color: #668da8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}

body.author-desktop .shelf-intro h1 {
  margin: 12px 0;
  color: #243b4d;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 27px;
  line-height: 1.42;
  letter-spacing: .02em;
}

body.author-desktop .shelf-intro p {
  margin: 0;
  color: #758998;
  font-size: 13px;
  line-height: 1.8;
}

body.author-desktop .author-panel {
  min-width: 0;
  border: 1px solid #dce5ea;
  border-radius: 6px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(42, 66, 82, .045);
}

body.author-desktop .author-panel__head,
body.author-desktop .chapter-navigator__head,
body.author-desktop .chapter-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

body.author-desktop .author-panel__head h2,
body.author-desktop .chapter-navigator__head h2,
body.author-desktop .chapter-editor__head h2 {
  margin: 4px 0 0;
  color: #263c4c;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0;
}

body.author-desktop .author-panel__head > span,
body.author-desktop .chapter-editor__head > span {
  color: #8193a0;
  font-size: 12px;
  line-height: 1.6;
}

body.author-desktop .desk-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.author-desktop .desk-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.author-desktop .desk-form label > span {
  color: #718594;
  font-size: 12px;
  font-weight: 600;
}

body.author-desktop .desk-form label > small {
  color: #91a0aa;
  font-size: 10px;
  line-height: 1.4;
}

body.author-desktop .desk-form input,
body.author-desktop .desk-form select,
body.author-desktop .desk-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8e3e9;
  border-radius: 5px;
  padding: 8px 10px;
  color: #263d4c;
  background: #fff;
  resize: vertical;
}

body.author-desktop .desk-form input:focus,
body.author-desktop .desk-form select:focus,
body.author-desktop .desk-form textarea:focus {
  border-color: #6393af;
  outline: 3px solid rgba(99, 147, 175, .12);
}

body.author-desktop .desk-form__wide { grid-column: 1 / -1; }
body.author-desktop .desk-form__actions { display: flex; justify-content: flex-end; gap: 10px; }

body.author-desktop .desk-form__actions button,
body.author-desktop .chapter-navigator__head > button,
body.author-desktop .author-panel__head > button {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 13px;
  color: #fff;
  background: #426f89;
  font-size: 12px;
  font-weight: 700;
}

body.author-desktop .author-text-button {
  color: #718796 !important;
  background: transparent !important;
}

body.author-desktop .book-list { display: grid; gap: 8px; }
body.author-desktop .book-item {
  border: 1px solid #e0e8ed;
  border-radius: 5px;
  padding: 14px;
  background: #fbfdfe;
}

body.author-desktop .book-item h2 { font-size: 17px; }
body.author-desktop .book-item p { color: #59788e; font-size: 12px; }
body.author-desktop .book-actions { display: flex; min-width: 0; flex-direction: row; }
body.author-desktop .book-actions button { min-height: 32px; border-radius: 4px; font-size: 11px; }

body.author-desktop .workspace {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-top: 22px;
}

body.author-desktop .workspace-sidebar {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 72px);
  border-right: 1px solid #dbe5ea;
  padding: 4px 18px 24px 0;
}

body.author-desktop .workspace-sidebar__back {
  min-height: 32px;
  border: 0;
  padding: 0;
  color: #678095;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

body.author-desktop .workspace-book {
  margin: 20px 0 24px;
}

body.author-desktop .workspace-book span {
  color: #8293a0;
  font-size: 11px;
  line-height: 1.6;
}

body.author-desktop .workspace-book h1 {
  margin: 5px 0 0;
  color: #263d4d;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 22px;
  line-height: 1.35;
}

body.author-desktop .workspace-nav {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  gap: 3px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.author-desktop .workspace-nav button {
  display: grid;
  grid-template-columns: 24px 1fr;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  padding: 0 10px;
  color: #718494;
  background: transparent;
  text-align: left;
}

body.author-desktop .workspace-nav button b {
  color: #9aacb8;
  font-size: 10px;
  font-weight: 700;
}

body.author-desktop .workspace-nav button span { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
body.author-desktop .workspace-nav button.is-active { border-left-color: #426f89; color: #294e66; background: #eaf2f6; }
body.author-desktop .workspace-nav button.is-active b { color: #426f89; }

body.author-desktop .workspace-sidebar__foot {
  margin-top: auto;
  padding: 28px 8px 0;
  color: #94a3ae;
  font-size: 11px;
  line-height: 1.65;
}

body.author-desktop .workspace-stage { min-width: 0; }
body.author-desktop .chapter-workbench { display: grid; grid-template-columns: 312px minmax(0, 1fr); gap: 16px; }

body.author-desktop .chapter-navigator,
body.author-desktop .chapter-editor {
  min-width: 0;
  border: 1px solid #dce5ea;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(42, 66, 82, .045);
}

body.author-desktop .chapter-navigator {
  position: sticky;
  top: 18px;
  padding: 16px;
}

body.author-desktop .chapter-navigator__head { margin-bottom: 13px; }
body.author-desktop .chapter-navigator__head h2 { font-size: 16px; }
body.author-desktop .chapter-navigator__head > button { min-height: 32px; padding: 0 10px; }

body.author-desktop .chapter-import-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
body.author-desktop .chapter-import-actions label {
  display: grid;
  min-height: 32px;
  place-items: center;
  border: 1px dashed #a9c3d2;
  border-radius: 4px;
  color: #52758b;
  background: #f8fbfc;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

body.author-desktop .chapter-import-encoding { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #778b9b; font-size: 11px; }
body.author-desktop .chapter-import-encoding select { min-height: 30px; border: 1px solid #d9e4ea; border-radius: 5px; padding: 0 8px; color: #526f83; background: #fff; font-size: 11px; }
body.author-desktop .bulk-preview__head small { display: block; margin-top: 3px; color: #73899b; font-size: 10px; font-weight: 500; }

body.author-desktop .chapter-import-actions input { position: absolute; width: 1px; height: 1px; opacity: 0; }
body.author-desktop .chapter-import-hint { display: block; margin: 8px 0 12px; color: #8797a3; font-size: 10px; line-height: 1.55; }
body.author-desktop .chapter-navigator .bulk-preview { margin-bottom: 12px; }

body.author-desktop .chapter-filters { grid-template-columns: 1fr 98px; gap: 7px; margin-bottom: 12px; }
body.author-desktop .chapter-filters input,
body.author-desktop .chapter-filters select {
  min-height: 34px;
  border: 1px solid #d9e4ea;
  border-radius: 4px;
  padding: 7px 8px;
  background: #fff;
  font-size: 11px;
}

body.author-desktop .admin-chapter-list { max-height: calc(100vh - 324px); gap: 5px; }
body.author-desktop .admin-chapter-list button {
  border: 1px solid #e2e9ed;
  border-radius: 4px;
  padding: 9px 10px;
  background: #fff;
}

body.author-desktop .admin-chapter-list button:hover { border-color: #8db0c2; background: #f4f9fb; }

body.author-desktop .chapter-editor { padding: 0; overflow: visible; }
body.author-desktop .chapter-editor__head {
  align-items: center;
  margin: 0;
  border-bottom: 1px solid #e0e8ed;
  padding: 16px 20px;
}

body.author-desktop .chapter-editor__head h2 { font-family: "Noto Serif SC", "Songti SC", serif; font-size: 20px; }
body.author-desktop .chapter-editor .txt-import {
  margin: 14px 20px;
  border: 1px solid #dbe6eb;
  border-radius: 5px;
  padding: 10px;
  background: #f8fbfc;
}

body.author-desktop .chapter-form { grid-template-columns: 230px minmax(0, 1fr); border: 0; }
body.author-desktop .chapter-meta-panel { top: 18px; min-height: 640px; border-right: 1px solid #e1e9ed; padding: 18px; background: #f9fbfc; }
body.author-desktop .chapter-meta-panel__title { color: #4d6d81; letter-spacing: .07em; }
body.author-desktop .chapter-meta-panel input,
body.author-desktop .chapter-meta-panel select,
body.author-desktop .chapter-compose-panel input,
body.author-desktop .chapter-compose-panel textarea { border-radius: 4px; }
body.author-desktop .chapter-compose-panel { gap: 16px; padding: 22px 26px 30px; }
body.author-desktop .chapter-compose-panel input[name="title"] { color: #233a4b; font-size: 24px; }
body.author-desktop .chapter-compose-panel textarea[name="content"] { min-height: 760px; color: #344b5b; font-size: 16px; line-height: 2; }

body.author-desktop .chapter-meta-panel .publish-check { background: #fffdf7; }
body.author-desktop .chapter-meta-panel #chapterSaveButton { background: #426f89; }

body.author-desktop .secondary-workbench { display: grid; grid-template-columns: minmax(430px, .82fr) minmax(0, 1.18fr); gap: 18px; align-items: start; }
body.author-desktop .author-panel--form { position: sticky; top: 18px; }
body.author-desktop .extra-list { max-height: calc(100vh - 220px); overflow: auto; padding-right: 4px; }
body.author-desktop .extra-item { border-radius: 5px; padding: 14px; }

body.author-desktop .profile-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 5px; }
body.author-desktop .profile-editor legend { color: #426f89; }

body.author-desktop .comments-workbench { display: grid; gap: 18px; }
body.author-desktop .admin-summary { grid-template-columns: repeat(4, 180px); gap: 10px; margin: 0; }
body.author-desktop .admin-summary div { border-radius: 5px; padding: 16px; background: #fff; }
body.author-desktop .admin-summary strong { color: #426f89; font-size: 26px; }
body.author-desktop .comment-filters { grid-template-columns: 240px 150px minmax(280px, 1fr); }
body.author-desktop .moderation-item { border-radius: 5px; }
body.author-desktop .moderation-bulk-actions { display: flex; gap: 8px; }
body.author-desktop .moderation-bulk-actions button { min-height: 34px; border-radius: 4px; padding: 0 10px; font-size: 11px; }
body.author-desktop .moderation-bulk-actions button:nth-child(2) { color: #7e8e99; background: #eef2f4; }

body.author-desktop .settings-panel { max-width: 900px; }
body.author-desktop .cover-uploader { grid-template-columns: 150px minmax(0, 1fr); }
body.author-desktop .cover-uploader img { width: 150px; border-radius: 5px; }

/* Keep the character facts airy after their compact two-column rewrite. */
body.wb-extras .ex-char-main { gap: 8px; }

/* Do not scale a vertical 9:16 image across a desktop viewport or use cover on it. */
body.hp-page {
  background-color: #e9eef5;
  background-image: none;
}

body.hp-page.wb-catalog .app {
  background-color: #eef5fb;
  background-image:
    linear-gradient(rgba(242, 248, 253, .46), rgba(242, 248, 253, .72)),
    url("../assets/workbuddy-bg-home.jpg");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-attachment: scroll;
}

/* Author media and aggregate reading data. */
body.author-desktop .media-library,
body.author-desktop .analytics-panel { margin-top: 18px; }
body.author-desktop .media-library__hint { margin: -2px 0 14px; color: #788b9e; font-size: 13px; }
body.author-desktop .media-library__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.author-desktop .media-library__item { overflow: hidden; border: 1px solid #dbe5ec; border-radius: 8px; background: #fff; }
body.author-desktop .media-library__item img { display: block; width: 100%; height: 130px; object-fit: contain; background: #eef3f7; }
body.author-desktop .media-library__item > div { padding: 9px 10px; }
body.author-desktop .media-library__item strong,
body.author-desktop .media-library__item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.author-desktop .media-library__item small { margin-top: 3px; color: #8293a4; font-size: 11px; }
body.author-desktop .media-library__item select { width: 100%; height: 30px; margin-top: 8px; border: 1px solid #d8e2e9; border-radius: 4px; padding: 0 7px; color: #526f83; background: #fbfdfe; font-size: 11px; }
body.author-desktop .media-library__item input { width: 100%; height: 28px; border: 1px solid #d8e2e9; border-radius: 4px; padding: 0 7px; color: #425b6d; background: #fff; font-size: 11px; }
body.author-desktop .media-library__item input[data-media-note] { margin-top: 6px; }
body.author-desktop .media-library .author-panel__head > div:last-child { display: flex; align-items: center; gap: 8px; }
body.author-desktop .media-library .author-panel__head > div:last-child select { height: 34px; min-width: 104px; border: 1px solid #d8e2e9; border-radius: 5px; padding: 0 8px; color: #526f83; background: #fff; font-size: 12px; }
body.author-desktop .media-library__actions { display: flex; gap: 5px; border-top: 1px solid #edf1f4; }
body.author-desktop .media-library__actions button { flex: 1; border: 0; padding: 7px 4px; color: #466e87; background: #f7fafc; font-size: 11px; }
body.author-desktop .media-library__actions button:last-child { color: #a96b63; }
body.author-desktop .analytics-panel__numbers { display: grid; grid-template-columns: repeat(2, 150px); gap: 10px; }
body.author-desktop .analytics-panel__numbers div { border: 1px solid #dde8ef; border-radius: 7px; padding: 12px 14px; background: #fbfdfe; }
body.author-desktop .analytics-panel__numbers span,
body.author-desktop .analytics-panel__chapters p { color: #72879b; font-size: 12px; }
body.author-desktop .analytics-panel__numbers strong { display: block; margin-top: 4px; color: #233d54; font-size: 24px; }
body.author-desktop .analytics-panel__chapters { margin-top: 12px; width: min(620px, 100%); }
body.author-desktop .analytics-panel__chapters p { display: flex; justify-content: space-between; margin: 0; border-bottom: 1px solid #edf1f4; padding: 8px 2px; }
body.author-desktop .analytics-panel__chapters b { color: #456e89; }
body.author-desktop .revision-panel { max-width: 900px; }
body.author-desktop .revision-list { display: grid; gap: 7px; }
body.author-desktop .revision-item { display: flex; align-items: center; justify-content: space-between; border: 1px solid #dde8ef; border-radius: 6px; padding: 10px 12px; background: #fbfdfe; }
body.author-desktop .revision-item strong,
body.author-desktop .revision-item small { display: block; }
body.author-desktop .revision-item small { margin-top: 3px; color: #7e91a1; font-size: 12px; }

/* Author UI normalization: one desktop control language, not a collection of page-specific widgets. */
body.author-desktop {
  --author-ink: #263b4c;
  --author-muted: #75899a;
  --author-line: #d8e2e9;
  --author-soft: #f6f9fb;
  --author-primary: #426f89;
  --author-control-height: 36px;
  --author-radius: 6px;
  --author-gap: 8px;
}

body.author-desktop .author-app {
  width: min(calc(100% - 72px), 1500px);
  padding-top: 20px;
}

body.author-desktop :where(button, input, select, textarea) {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.author-desktop button,
body.author-desktop .author-topbar__actions a,
body.author-desktop .admin-preview-link {
  min-height: var(--author-control-height);
  border: 1px solid var(--author-line);
  border-radius: var(--author-radius);
  padding: 0 12px;
  color: #526f83;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

body.author-desktop button:hover,
body.author-desktop .author-topbar__actions a:hover,
body.author-desktop .admin-preview-link:hover {
  border-color: #a7bdcb;
  color: #385d75;
  background: #f8fbfd;
}

body.author-desktop .author-topbar__actions button,
body.author-desktop .desk-form__actions button,
body.author-desktop .chapter-navigator__head > button,
body.author-desktop .chapter-meta-panel #chapterSaveButton,
body.author-desktop .bulk-preview__head button:first-child {
  border-color: var(--author-primary);
  color: #fff;
  background: var(--author-primary);
}

body.author-desktop .author-topbar__actions .author-restore,
body.author-desktop .author-text-button,
body.author-desktop .chapter-meta-panel .admin-preview-link {
  border-color: var(--author-line) !important;
  color: #627c8e !important;
  background: #fff !important;
}

body.author-desktop .author-text-button {
  padding-inline: 8px;
}

body.author-desktop .author-panel,
body.author-desktop .chapter-navigator,
body.author-desktop .chapter-editor {
  border-color: var(--author-line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(38, 59, 76, .04);
}

body.author-desktop .author-panel__head,
body.author-desktop .chapter-navigator__head,
body.author-desktop .chapter-editor__head {
  min-height: 40px;
  align-items: center;
  margin-bottom: 16px;
}

body.author-desktop .chapter-editor__head {
  min-height: 64px;
  margin-bottom: 0;
  padding: 14px 22px;
}

body.author-desktop .author-panel__head h2,
body.author-desktop .chapter-navigator__head h2,
body.author-desktop .chapter-editor__head h2 {
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.25;
}

body.author-desktop .desk-form,
body.author-desktop .chapter-compose-panel {
  gap: 16px;
}

body.author-desktop .desk-form label,
body.author-desktop .chapter-meta-panel label,
body.author-desktop .chapter-compose-panel label {
  gap: 7px;
}

body.author-desktop .desk-form label > span,
body.author-desktop .chapter-meta-panel label > span,
body.author-desktop .chapter-compose-panel label > span {
  color: var(--author-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

body.author-desktop .desk-form :is(input, select),
body.author-desktop .chapter-meta-panel :is(input, select),
body.author-desktop .chapter-compose-panel :is(input, textarea),
body.author-desktop .chapter-filters :is(input, select),
body.author-desktop .comment-filters :is(input, select) {
  box-sizing: border-box;
  min-height: var(--author-control-height);
  border-color: var(--author-line);
  border-radius: var(--author-radius);
  padding: 7px 10px;
  color: var(--author-ink);
  background: #fff;
  font-size: 12px;
  line-height: 20px;
}

body.author-desktop .desk-form textarea,
body.author-desktop .chapter-compose-panel textarea {
  min-height: 96px;
  line-height: 1.7;
}

body.author-desktop .chapter-filters {
  gap: 8px;
  margin-bottom: 14px;
}

body.author-desktop .chapter-filters input,
body.author-desktop .chapter-filters select {
  min-height: var(--author-control-height);
  padding: 7px 10px;
  font-size: 12px;
}

body.author-desktop .chapter-import-actions { gap: 8px; }
body.author-desktop .chapter-import-actions label {
  min-height: var(--author-control-height);
  border-radius: var(--author-radius);
  font-size: 12px;
}

body.author-desktop .chapter-navigator {
  padding: 18px;
}

body.author-desktop .admin-chapter-list { gap: 8px; }
body.author-desktop .admin-chapter-list button {
  min-height: 76px;
  border-radius: var(--author-radius);
  padding: 11px 12px;
  text-align: left;
}

body.author-desktop .chapter-editor .txt-import {
  display: grid;
  min-height: 72px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 16px 22px;
  border-radius: 8px;
  padding: 12px;
}

body.author-desktop .txt-import__button,
body.author-desktop .txt-import__button span {
  min-height: var(--author-control-height);
  border-radius: var(--author-radius);
}

body.author-desktop .chapter-form {
  grid-template-columns: 252px minmax(0, 1fr);
}

body.author-desktop .chapter-meta-panel {
  top: 18px;
  min-height: 0;
  gap: 14px;
  padding: 20px;
  background: var(--author-soft);
}

body.author-desktop .chapter-meta-panel__title {
  padding-bottom: 12px;
  color: #547185;
  font-size: 12px;
}

body.author-desktop .chapter-meta-panel .editor-stats { gap: 7px; }
body.author-desktop .chapter-meta-panel .editor-stats span {
  border: 1px solid #e3ebf0;
  border-radius: var(--author-radius);
  padding: 8px 9px;
  background: #fff;
}

body.author-desktop .chapter-meta-panel .publish-check {
  border-radius: var(--author-radius);
  padding: 12px;
}

body.author-desktop .chapter-meta-panel #chapterSaveButton {
  min-height: 42px;
  border-radius: var(--author-radius);
}

body.author-desktop .chapter-meta-panel .admin-preview-link {
  min-height: var(--author-control-height);
  border-radius: var(--author-radius);
}

body.author-desktop .chapter-compose-panel {
  padding: 24px 28px 34px;
}

body.author-desktop .chapter-compose-panel input[name="title"] {
  min-height: 44px;
  padding: 5px 0 11px;
  font-size: 22px;
}

body.author-desktop .chapter-compose-panel textarea[name="summary"] {
  min-height: 106px;
  padding: 11px 12px;
}

body.author-desktop .chapter-compose-panel textarea[name="content"] {
  min-height: 700px;
  border-radius: 8px;
  padding: 20px 22px;
  font-size: 16px;
  line-height: 2;
}

body.author-desktop .workspace-nav button {
  min-height: 40px;
  border-left-width: 3px;
  border-radius: 0 6px 6px 0;
  padding: 0 12px;
}

/* Published content has a clear edit entry; draft saving and reader publication are distinct actions. */
body.author-desktop .chapter-status {
  display: flex;
  min-height: var(--author-control-height);
  align-items: center;
  border: 1px solid #dce6ed;
  border-radius: var(--author-radius);
  padding: 0 10px;
  color: #607c90;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
}

body.author-desktop .admin-chapter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  border: 1px solid #e1e9ee;
  border-radius: var(--author-radius);
  padding: 10px 10px 10px 12px;
  background: #fff;
}

body.author-desktop .admin-chapter-row > div { min-width: 0; }
body.author-desktop .admin-chapter-row span,
body.author-desktop .admin-chapter-row strong,
body.author-desktop .admin-chapter-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.author-desktop .admin-chapter-row span { color: #8497a6; font-size: 11px; font-weight: 650; }
body.author-desktop .admin-chapter-row strong { margin: 3px 0; color: #2b4354; font-size: 14px; line-height: 1.25; }
body.author-desktop .admin-chapter-row small { color: #8396a5; font-size: 10px; }
body.author-desktop .admin-chapter-row button { min-width: 72px; }
body.author-desktop .admin-chapter-row.is-published button { border-color: #b9cfdb; color: #416b85; background: #f7fbfd; }
body.author-desktop .admin-chapter-row.is-draft { border-left: 3px solid #d6a458; padding-left: 10px; }
body.author-desktop .admin-chapter-row.is-archived { opacity: .62; border-left: 3px solid #9aa9b5; padding-left: 10px; }
body.author-desktop .chapter-row-actions { display: grid; grid-template-columns: repeat(2, 74px); gap: 5px; justify-content: end; }
body.author-desktop .chapter-row-actions button { min-width: 0; padding-inline: 8px; font-size: 11px; }
body.author-desktop .chapter-row-actions button:last-child { color: #8d6c62; }
body.author-desktop .admin-chapter-list .chapter-row-actions button {
  min-height: 32px;
  height: 32px;
}

body.author-desktop .chapter-meta-panel #chapterSaveButton {
  border-color: #cbd9e2;
  color: #557287;
  background: #fff;
}

body.author-desktop .chapter-meta-panel #chapterPublishButton {
  min-height: 42px;
  border-color: var(--author-primary);
  border-radius: var(--author-radius);
  color: #fff;
  background: var(--author-primary);
}

body.author-desktop .chapter-meta-panel #chapterPublishButton:disabled {
  border-color: #d7e1e8;
  color: #9aa9b5;
  background: #edf2f5;
  cursor: not-allowed;
}

body.author-desktop .chapter-meta-panel #chapterDiscardDraftButton {
  border-color: #eadbd3;
  color: #8e6b61;
  background: #fffaf8;
}

body.author-desktop .author-sync-status {
  color: #7a8d9d;
  font-size: 11px;
  white-space: nowrap;
}
body.author-desktop .author-sync-status[data-state="saved"] { color: #4e8b70; }
body.author-desktop .author-sync-status[data-state="error"] { color: #b56958; }
body.author-desktop .author-sync-status[data-state="local"] { color: #8a7a60; }

body.author-desktop .extra-item__actions { display: flex; gap: 7px; margin-top: 12px; }
body.author-desktop .extra-item__actions button,
body.author-desktop .extra-item__actions a { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; border: 1px solid #d4e1e8; border-radius: 5px; padding-inline: 10px; color: #557287; background: #fff; font-size: 11px; font-weight: 650; text-decoration: none; }
body.author-desktop .extra-item__actions button:last-child { color: #9c695e; background: #fffaf8; }
body.author-desktop .comment-pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: #788d9d; font-size: 11px; }
body.author-desktop .comment-pager > div { display: flex; gap: 7px; }
body.author-desktop .comment-pager button { min-height: 32px; }

/* Media selection stays in the current form instead of sending the author hunting through another tab. */
body.author-desktop .media-picker-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

body.author-desktop .media-picker-field button { min-width: 88px; }

body.author-desktop .media-picker-dialog {
  width: min(900px, calc(100vw - 80px));
  max-height: min(720px, calc(100vh - 80px));
  border: 1px solid #d7e2e9;
  border-radius: 10px;
  padding: 0;
  color: var(--author-ink);
  background: #fff;
  box-shadow: 0 24px 68px rgba(25, 48, 64, .24);
}

body.author-desktop .media-picker-dialog::backdrop { background: rgba(28, 45, 58, .28); }
body.author-desktop .media-picker-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e3eaef;
  padding: 17px 20px;
}

body.author-desktop .media-picker-dialog__tools { display: flex; align-items: center; gap: 8px; }
body.author-desktop .media-picker-dialog__tools select { height: var(--author-control-height); border: 1px solid var(--author-line); border-radius: 4px; padding: 0 8px; color: #526f83; background: #fff; font-size: 12px; }
body.author-desktop .media-picker-dialog__tools label {
  display: inline-flex;
  min-height: var(--author-control-height);
  align-items: center;
  justify-content: center;
  border: 1px solid #b7cad6;
  border-radius: var(--author-radius);
  padding: 0 11px;
  color: #466d85;
  background: #f8fbfd;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
body.author-desktop .media-picker-dialog__tools input { position: absolute; width: 1px; height: 1px; opacity: 0; }

body.author-desktop .media-picker-dialog header span { color: #70899b; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
body.author-desktop .media-picker-dialog h2 { margin: 3px 0 0; font-size: 18px; }
body.author-desktop .media-picker-dialog__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-height: 180px;
  overflow: auto;
  padding: 20px;
}

body.author-desktop .media-picker-option {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 7px;
  overflow: hidden;
  border: 1px solid #dce6ed;
  border-radius: 7px;
  padding: 7px;
  background: #fff;
  text-align: left;
}

body.author-desktop .media-picker-option:hover { border-color: #80a4b9; background: #f7fbfd; }
body.author-desktop .media-picker-option img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 4px; object-fit: contain; background: #edf3f6; }
body.author-desktop .media-picker-option span { overflow: hidden; color: #526f83; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
body.author-desktop .media-picker-option span small { display: block; margin-top: 2px; color: #8193a3; font-size: 10px; }

body.author-desktop .cover-uploader img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
body.author-desktop .cover-ratio-hint { color: #80919e; font-size: 11px; line-height: 1.55; }

/* Mobile reading uses an immersive canvas; controls are summoned instead of consuming every page. */
@media (max-width: 640px) {
  body.wb-reader {
    padding-bottom: 0;
    overflow-x: hidden;
  }

  body.wb-reader .reader-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    transition: opacity .2s ease, transform .24s ease;
  }

  body.wb-reader .reader-toolbar {
    position: fixed;
    top: calc(58px + env(safe-area-inset-top, 0px));
    left: 0;
    z-index: 29;
    width: 100%;
    min-height: 51px;
    margin: 0;
    padding: 7px 12px;
    transition: opacity .2s ease, transform .24s ease;
  }

  body.wb-reader .reader-shell {
    padding-top: calc(116px + env(safe-area-inset-top, 0px));
  }

  body.wb-reader .chapter {
    height: calc(100svh - 207px - env(safe-area-inset-top, 0px));
    min-height: 360px;
  }

  body.wb-reader .page-turns {
    z-index: 30;
    transition: opacity .2s ease, transform .24s ease;
  }

  body.wb-reader .chapter-progress {
    transition: opacity .2s ease;
  }

  body.wb-reader.reader-chrome-quiet .reader-header {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - 10px));
  }

  body.wb-reader.reader-chrome-quiet .reader-toolbar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - 90px));
  }

  body.wb-reader.reader-chrome-quiet .reader-shell {
    padding-top: 0;
  }

  body.wb-reader.reader-chrome-quiet .chapter {
    height: calc(100svh - env(safe-area-inset-bottom, 0px));
    padding-top: calc(28px + env(safe-area-inset-top, 0px));
    padding-bottom: 18px;
  }

  body.wb-reader.reader-chrome-quiet .chapter-progress {
    position: fixed;
    left: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 4;
    display: block;
    margin: 0;
    color: color-mix(in srgb, var(--ink-soft) 78%, transparent);
    font-size: 10px;
    letter-spacing: .04em;
    pointer-events: none;
  }

  body.wb-reader.reader-chrome-quiet .page-turns {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(100% + 28px));
  }

  body.wb-reader.reader-chrome-quiet .danmaku-layer {
    top: calc(12px + env(safe-area-inset-top, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  body.wb-reader .chapter-page--enter-forward {
    animation: reader-page-forward .18s ease-out both;
  }

  body.wb-reader .chapter-page--enter-backward {
    animation: reader-page-backward .18s ease-out both;
  }

  @keyframes reader-page-forward {
    from { opacity: .72; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @keyframes reader-page-backward {
    from { opacity: .72; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  body.wb-reader .chapter-page--enter-forward,
  body.wb-reader .chapter-page--enter-backward {
    animation: none;
  }
}

/* The desktop workbench must reflow before its three editing columns become unusable. */
@media (max-width: 1100px) {
  body.author-desktop { min-width: 0; }

  body.author-desktop .author-app {
    width: calc(100% - 32px);
    min-width: 0;
    padding-top: 14px;
  }

  body.author-desktop .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-top: 16px;
  }

  body.author-desktop .workspace-sidebar {
    position: static;
    display: grid;
    min-height: 0;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 12px;
    border-right: 0;
    border-bottom: 1px solid #dbe5ea;
    padding: 0 0 14px;
  }

  body.author-desktop .workspace-sidebar__back {
    grid-column: 1;
    grid-row: 1;
  }

  body.author-desktop .workspace-book {
    grid-column: 2;
    margin: 0;
  }

  body.author-desktop .workspace-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    background: #fff;
  }

  body.author-desktop .workspace-nav button {
    min-height: 38px;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    border-left: 0;
    border-radius: 0;
    padding: 0 6px;
    text-align: center;
  }

  body.author-desktop .workspace-nav button + button { border-left: 1px solid #e4ebef; }
  body.author-desktop .workspace-nav button b { display: none; }
  body.author-desktop .workspace-nav button.is-active { border-left-color: transparent; }
  body.author-desktop .workspace-nav button.is-active + button { border-left-color: #e4ebef; }
  body.author-desktop .workspace-sidebar__foot { display: none; }

  body.author-desktop .chapter-workbench { grid-template-columns: minmax(0, 1fr); }
  body.author-desktop .chapter-navigator { position: static; }
  body.author-desktop .admin-chapter-list { max-height: 330px; }
}

@media (max-width: 720px) {
  body.author-desktop .author-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  body.author-desktop .author-topbar__title { display: none; }
  body.author-desktop .author-topbar__actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
  }
  body.author-desktop .author-sync-status,
  body.author-desktop .author-backup-status { display: none; }

  body.author-desktop .chapter-form { grid-template-columns: minmax(0, 1fr); }
  body.author-desktop .chapter-meta-panel {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #e1e9ed;
  }
}
