:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-soft: #efeee8;
  --text: #191715;
  --muted: #6c665f;
  --line: #dedbd2;
  --accent: #b0262f;
  --accent-strong: #861b24;
  --gold: #d9962b;
  --shadow: 0 18px 45px rgba(33, 27, 19, 0.11);
  --radius: 8px;
}

body.dark {
  color-scheme: dark;
  --bg: #151312;
  --surface: #211f1d;
  --surface-soft: #2b2825;
  --text: #f4eee5;
  --muted: #b8aea3;
  --line: #3a352f;
  --accent: #ff6b74;
  --accent-strong: #ff8b91;
  --gold: #f1b24c;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 8%, transparent), transparent 34rem),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 88%, var(--surface-soft)));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.skip-link:focus {
  top: 16px;
}

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

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px rgba(33, 27, 19, 0.05);
}

.announcement-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, var(--accent));
}

.announcement-band div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.announcement-band strong {
  color: var(--accent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-family: "Noto Serif", serif;
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
}

.nav a {
  position: relative;
  padding: 8px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav a:hover::after,
.nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.bottom-nav {
  display: none;
}

.notification-toggle {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.notification-toggle span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.notification-toggle.has-unread {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.notification-panel {
  position: fixed;
  top: 78px;
  right: 5vw;
  z-index: 75;
  display: none;
  width: min(380px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notification-panel.open {
  display: grid;
  gap: 12px;
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-list {
  display: grid;
  gap: 9px;
}

.notification-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.notification-item:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.notification-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.notification-item small {
  color: var(--muted);
  line-height: 1.45;
}

.notification-more {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.install-toggle {
  min-width: 64px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.install-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}

.install-toggle.installed,
.install-toggle:disabled {
  cursor: default;
  opacity: 0.78;
  transform: none;
}

.theme-toggle {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.connection-pill {
  position: fixed;
  right: 76px;
  bottom: 20px;
  z-index: 68;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, #1f9d55 35%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #1f9d55 12%, var(--surface));
  color: color-mix(in srgb, #1f9d55 78%, var(--text));
  box-shadow: 0 10px 26px rgba(33, 27, 19, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.connection-pill.offline {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  color: color-mix(in srgb, var(--gold) 76%, var(--text));
}

.workspace-dock {
  position: fixed;
  left: 18px;
  top: 94px;
  z-index: 67;
  display: grid;
  gap: 10px;
  width: 208px;
  max-height: calc(100vh - 118px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.dock-head,
.dock-meter,
.dock-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dock-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dock-head strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
  color: var(--accent);
  font-size: 11px;
}

.dock-meter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.dock-meter div {
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.dock-meter strong,
.dock-meter span {
  display: block;
}

.dock-meter strong {
  font-size: 18px;
}

.dock-meter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dock-links {
  display: grid;
  gap: 5px;
}

.dock-links a {
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.dock-links a:hover,
.dock-links a.active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  transform: translateY(-1px);
}

.dock-links span,
.dock-links small {
  display: block;
}

.dock-links span {
  font-weight: 900;
}

.dock-links small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.app-shell {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 32px 0 64px;
}

body.admin-view .app-shell {
  width: min(1540px, 94vw);
  padding-top: 24px;
}

body.admin-view .workspace-dock,
body.no-dock-view .workspace-dock,
body.admin-view .breadcrumbs {
  display: none;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -8px 0 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs a::after {
  content: "/";
  margin-left: 8px;
  color: var(--line);
}

.breadcrumbs span {
  color: var(--text);
}

.command-open {
  min-height: 40px;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  padding: 8vh 5vw;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
}

.command-palette.open {
  display: block;
}

.command-dialog {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.command-search {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 14px;
}

.command-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.command-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.command-item span {
  color: var(--muted);
}

.command-item:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.toast.info {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 84;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cookie-consent {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(920px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cookie-consent div:first-child {
  display: grid;
  gap: 4px;
}

.cookie-consent span {
  color: var(--muted);
}

.loading-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 80px 0;
  color: var(--muted);
}

.loading-state span {
  width: 34px;
  height: 34px;
  border: 4px solid var(--surface-soft);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 5vw 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.site-footer::before {
  content: "Nomad Novels";
  color: var(--text);
  font-family: "Noto Serif", serif;
  font-size: 18px;
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  min-height: 430px;
  margin-bottom: 10px;
}

.hero-main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  min-height: 430px;
  padding: 42px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(25, 23, 21, 0.08), rgba(25, 23, 21, 0.82)),
    url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  color: white;
  box-shadow: var(--shadow);
}

.hero-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 36%),
    radial-gradient(circle at 78% 18%, rgba(217, 150, 43, 0.22), transparent 18rem);
  pointer-events: none;
}

.hero-main > * {
  position: relative;
}

.eyebrow {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-family: "Noto Serif", serif;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(520px, 100%);
  margin-top: 22px;
}

.hero-metrics div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-metrics strong {
  display: block;
  font-size: 24px;
}

.hero-metrics span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-search {
  display: flex;
  gap: 10px;
  width: min(620px, 100%);
  margin-bottom: 18px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  padding: 0 14px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.clean-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.38fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 24px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.35fr);
  gap: 24px;
  align-items: end;
  min-height: 360px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(25, 23, 21, 0.1), rgba(25, 23, 21, 0.82)),
    url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  color: white;
  box-shadow: var(--shadow);
}

.home-hero-copy {
  min-width: 0;
}

.home-hero h1 {
  max-width: 680px;
  margin: 16px 0 20px;
  font-family: "Noto Serif", serif;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
}

.spotlight-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  color: white;
  backdrop-filter: blur(16px);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.spotlight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
}

.spotlight-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}

.spotlight-card strong,
.spotlight-card small,
.spotlight-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-card strong {
  font-size: 17px;
}

.spotlight-card small,
.spotlight-card em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.home-tabs,
.genre-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-tabs a,
.genre-strip a {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.home-tabs a {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.84);
}

.home-tabs a.active,
.home-tabs a:hover,
.genre-strip a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.home-side {
  display: grid;
  gap: 16px;
}

.wallet-cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 84%, var(--gold)), var(--surface));
  box-shadow: 0 10px 26px rgba(33, 27, 19, 0.055);
}

.wallet-cta-strip h2,
.wallet-cta-strip p {
  margin: 0;
}

.wallet-cta-strip h2 {
  margin-top: 5px;
  font-size: 24px;
}

.wallet-cta-strip .row-actions {
  flex: 0 0 auto;
}

.compact-panel {
  box-shadow: none;
}

.clean-stats {
  display: grid;
  gap: 10px;
}

.clean-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.clean-stats strong {
  font-size: 20px;
}

.clean-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-section,
.home-split {
  margin-top: 28px;
}

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

.latest-row,
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.latest-row img {
  width: 42px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 6px;
}

.latest-row:hover,
.rank-row:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--surface-soft);
}

.latest-row span,
.rank-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.latest-row strong,
.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-row small,
.rank-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-row em {
  margin-left: auto;
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 22px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-row b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
  color: var(--accent);
  font-size: 13px;
}

.app-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 22px 0 6px;
}

.app-hub-item {
  display: grid;
  gap: 6px;
  min-height: 92px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.app-hub-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow);
}

.app-hub-item strong {
  font-size: 15px;
}

.app-hub-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.platform-mode {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: center;
  margin: 18px 0 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.platform-mode h2 {
  margin: 12px 0 6px;
}

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

.platform-action {
  display: grid;
  gap: 6px;
  min-height: 84px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(33, 27, 19, 0.045);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.platform-action:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--surface);
}

.platform-action strong {
  font-size: 16px;
}

.platform-action span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.72fr);
  gap: 22px;
  align-items: stretch;
}

.auth-hero,
.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-hero {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 560px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(25, 23, 21, 0.88), rgba(25, 23, 21, 0.5)),
    url("https://images.unsplash.com/photo-1491841550275-ad7854e35ca6?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  color: white;
}

.auth-hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Noto Serif", serif;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
}

.auth-hero .muted {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

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

.auth-benefits div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.auth-benefits span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.auth-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 24px;
}

.auth-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-card h2 {
  margin: 6px 0 0;
  font-size: 28px;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-submit {
  min-height: 46px;
}

.signup-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.signup-box {
  margin-top: 4px;
}

.signup-box p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.activity-center {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.1fr) minmax(240px, 0.55fr);
  gap: 14px;
  align-items: stretch;
  margin: 18px 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.activity-summary h2 {
  margin: 12px 0 6px;
}

.activity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.activity-metrics div,
.next-action-card,
.feed-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.activity-metrics div {
  padding: 10px;
}

.activity-metrics strong,
.activity-metrics span {
  display: block;
}

.activity-metrics strong {
  font-size: 22px;
}

.activity-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-feed {
  display: grid;
  gap: 8px;
}

.feed-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.feed-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--surface);
}

.feed-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.feed-item small,
.next-action-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.next-action-card {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 14px;
}

.next-action-card strong {
  font-size: 18px;
}

.inbox-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.inbox-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
}

.inbox-status {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.inbox-status span,
.inbox-status small {
  color: var(--muted);
  font-weight: 900;
}

.inbox-status strong {
  font-size: 42px;
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 18px;
}

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

.inbox-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.inbox-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.inbox-card.unread {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.inbox-card span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.inbox-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.inbox-side {
  align-self: start;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.inbox-side h2 {
  margin: 0;
}

.start-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.36fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--gold)), var(--surface));
  box-shadow: var(--shadow);
}

.start-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
}

.start-status {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 46%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
}

.start-status span,
.start-status small {
  color: var(--muted);
  font-weight: 900;
}

.start-status strong {
  font-size: 30px;
}

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

.path-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.path-card.active {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--accent)), var(--surface));
}

.path-card h2,
.path-card p {
  margin: 0;
}

.setup-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.setup-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.setup-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.setup-item.done span {
  background: #d9f2df;
  color: #12652a;
}

.setup-item.todo span {
  background: #ffe6e8;
  color: #8a1420;
}

.reader-status {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: center;
  margin: 18px 0 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.reader-status .eyebrow {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
}

.reader-status h2 {
  margin: 12px 0 6px;
}

.reader-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.reader-status-grid div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.reader-status-grid strong {
  display: block;
  font-size: 24px;
}

.reader-status-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-progress {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--gold)), var(--surface));
  box-shadow: var(--shadow);
}

.profile-hero h1 {
  margin: 12px 0 8px;
  font-family: "Noto Serif", serif;
  font-size: clamp(30px, 4vw, 48px);
}

.profile-hero .eyebrow {
  background: color-mix(in srgb, var(--gold) 22%, var(--surface));
  color: var(--accent);
}

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

.profile-stats div {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.profile-stats strong {
  display: block;
  font-size: 26px;
}

.profile-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.achievement-panel {
  margin-bottom: 26px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.achievement {
  display: grid;
  gap: 6px;
  min-height: 124px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.04);
}

.achievement.unlocked {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 82%, var(--gold)), var(--surface));
}

.achievement.locked {
  opacity: 0.62;
}

.achievement strong {
  font-size: 15px;
}

.achievement span,
.achievement small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.achievement small {
  margin-top: auto;
  font-weight: 900;
  text-transform: uppercase;
}

.checkin-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, var(--accent)), var(--surface));
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.05);
}

.checkin-panel h2 {
  margin: 10px 0 6px;
}

.checkin-stats {
  display: grid;
  grid-template-columns: repeat(3, 90px);
  gap: 10px;
}

.checkin-stats div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.checkin-stats strong {
  display: block;
  font-size: 24px;
}

.checkin-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.wallet-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.wallet-panel h2 {
  margin: 0 0 6px;
}

.wallet-actions > strong {
  min-width: max-content;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #191715;
  font-size: 20px;
}

.payment-ledger {
  align-items: start;
}

.payment-ledger > div:first-child {
  min-width: 0;
  flex: 1;
}

.payment-ledger .payment-history {
  min-width: min(360px, 100%);
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.coin-shop-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--gold)), var(--surface));
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

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

.payment-steps div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.payment-steps strong {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 13px;
}

.payment-steps span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

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

.coin-package-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.coin-package-card em {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.coin-package-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: var(--surface);
}

.coin-package-card span,
.coin-package-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.coin-package-card strong {
  font-size: 24px;
}

.wallet-ledger {
  align-items: flex-start;
}

.wallet-transaction-list {
  display: grid;
  gap: 9px;
  min-width: min(420px, 100%);
}

.wallet-transaction-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.wallet-transaction-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.wallet-transaction-item.in span {
  background: #dff4e5;
  color: #135f2c;
}

.wallet-transaction-item.out span {
  background: #ffe5e8;
  color: #8b1422;
}

.wallet-transaction-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.membership-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.membership-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
}

.membership-status {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 44%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
}

.membership-status span,
.membership-status small {
  color: var(--muted);
  font-weight: 900;
}

.membership-status strong {
  font-size: 34px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pricing-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.pricing-card.active {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--accent)), var(--surface));
}

.pricing-card h2,
.pricing-card p {
  margin: 0;
}

.pricing-card > strong {
  font-size: 30px;
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.membership-roadmap {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.creator-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--gold)), var(--surface));
  box-shadow: var(--shadow);
}

.creator-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
}

.creator-score {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.creator-score span,
.creator-score small {
  color: var(--muted);
  font-weight: 900;
}

.creator-score strong {
  font-size: 42px;
}

.creator-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.creator-metrics div,
.creator-panel,
.pipeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.creator-metrics div {
  padding: 14px;
}

.creator-metrics strong,
.creator-metrics span {
  display: block;
}

.creator-metrics strong {
  font-size: 26px;
}

.creator-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.creator-board {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.creator-panel {
  padding: 16px;
}

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

.pipeline-item {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.pipeline-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.pipeline-item.done span {
  background: #d9f2df;
  color: #12652a;
}

.pipeline-item.todo span {
  background: #ffe6e8;
  color: #8a1420;
}

.pipeline-item small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.mission-panel {
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--gold)), var(--surface));
  box-shadow: var(--shadow);
}

.mission-summary {
  min-width: max-content;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.mission-card {
  display: grid;
  gap: 10px;
  min-height: 178px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(33, 27, 19, 0.045);
}

.mission-card.complete {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, var(--accent)), var(--surface));
}

.mission-card.pending {
  opacity: 0.82;
}

.mission-card strong,
.mission-card span,
.mission-card small {
  display: block;
}

.mission-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.mission-card small {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, var(--surface-soft));
  color: var(--text);
  font-weight: 900;
}

.mission-card .btn {
  align-self: end;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.payment-summary div,
.payment-method-card,
.payment-history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.payment-summary div {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.payment-summary span,
.payment-history-item span,
.payment-method-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.payment-summary strong {
  font-size: 20px;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.payment-method-card {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 96px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.payment-method-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--surface);
}

.payment-method-card:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.payment-history {
  display: grid;
  gap: 9px;
}

.payment-history-item {
  display: grid;
  gap: 5px;
  padding: 11px;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-stack > .panel,
.side-stack > .ad-slot,
.panel {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.side-stack > .panel:hover,
.side-stack > .ad-slot:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.panel h2,
.section-title h2 {
  margin: 0;
  font-size: 22px;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 38px 0 18px;
}

.muted {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

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

.continue-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.05);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.continue-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: var(--shadow);
}

.continue-card img {
  width: 74px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
}

.continue-card div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.continue-card strong,
.continue-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-card small {
  color: var(--muted);
}

.smart-shelves {
  display: grid;
  gap: 16px;
  margin: 24px 0 30px;
}

.shelf-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

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

.shelf-row-head h3 {
  margin: 0 0 4px;
}

.shelf-row-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.shelf-row-head a {
  min-width: max-content;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.shelf-track {
  display: grid;
  grid-auto-columns: minmax(180px, 220px);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.shelf-track::-webkit-scrollbar {
  height: 8px;
}

.shelf-track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.shelf-card {
  display: grid;
  gap: 10px;
  scroll-snap-align: start;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.shelf-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow);
}

.shelf-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
}

.shelf-card div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.shelf-card strong,
.shelf-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.stat strong {
  display: block;
  font-size: 24px;
}

.novel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.novel-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 100%;
}

.novel-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: var(--shadow);
}

.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-soft);
}

.cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.novel-card:hover .cover img {
  transform: scale(1.045);
  filter: saturate(1.06) contrast(1.04);
}

.novel-card-body {
  display: grid;
  gap: 8px;
  grid-template-rows: auto auto auto 1fr auto auto;
  flex: 1;
  padding: 14px;
}

.cover-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.cover-action {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(25, 23, 21, 0.68);
  color: white;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.novel-card:hover .cover-action {
  opacity: 1;
  transform: translateY(0);
}

.novel-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-summary {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.15em;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-weight: 800;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-progress {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.card-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.card-action span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-action strong {
  color: var(--accent);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge-hot {
  background: var(--accent);
  color: white;
}

.badge-premium {
  background: var(--gold);
  color: #191715;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.chip.active,
.chip:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.updates {
  display: grid;
  gap: 10px;
}

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

.community-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-top: 24px;
}

.review-list,
.comment-list {
  display: grid;
  gap: 12px;
}

.review-item,
.comment-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.review-item p,
.comment-item p {
  margin: 8px 0;
  line-height: 1.6;
}

.update-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.library-layout,
.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.44fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.library-hero h2 {
  margin: 8px 0;
  font-size: clamp(30px, 4vw, 46px);
}

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

.library-metrics div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.library-metrics strong {
  font-size: 24px;
}

.library-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.library-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.library-toolbar span,
.library-view-actions a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.library-view-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.library-view-actions a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.library-view-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.library-empty {
  justify-items: center;
  min-height: 220px;
  text-align: center;
}

.library-empty strong {
  font-size: 22px;
}

.library-side-panel {
  display: grid;
  gap: 9px;
}

.library-side-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 900;
}

.library-side-panel a:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--accent);
}

.library-side-panel b {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
}

.library-side-panel a span {
  display: grid;
  min-width: 0;
}

.library-side-panel small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requests-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
}

.tall-textarea {
  min-height: 300px;
}

.draft-preview {
  max-height: 620px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.75;
}

.request-grid {
  display: grid;
  gap: 14px;
}

.request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.04);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.request-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: var(--shadow);
}

.request-card h3 {
  margin: 10px 0 8px;
}

.vote-box {
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.vote-box strong {
  font-size: 30px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.command-search:focus,
.hero-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.detail-head {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-head h1 {
  margin: 14px 0 8px;
  font-family: "Noto Serif", serif;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-stats strong {
  display: block;
  font-size: 22px;
}

.detail-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.chapter-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.chapter-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chapter-link:hover {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
}

.reader {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--gold)), var(--surface) 220px);
  box-shadow: var(--shadow);
}

.reader-toolbar {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.reader-toolbar select {
  min-height: 42px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
}

.reader-head {
  max-width: 820px;
  margin: 0 auto;
  padding: 42px 34px 0;
  text-align: center;
}

.reader-novel-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.reader-novel-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reader h1 {
  margin: 16px 0 14px;
  font-family: "Noto Serif", serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.reader-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.reading-progress {
  overflow: hidden;
  height: 8px;
  width: min(820px, calc(100% - 68px));
  margin: 18px auto 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.reading-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.reader-content {
  font-size: 20px;
  line-height: 2;
  white-space: pre-wrap;
  max-width: 760px;
  margin: 34px auto 0;
  padding: 0 38px;
  color: color-mix(in srgb, var(--text) 94%, var(--muted));
}

.reader-content.serif {
  font-family: "Noto Serif", Georgia, serif;
}

.reader-content.sans {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.panel input[type="range"] {
  accent-color: var(--accent);
}

.reader-bottom-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  max-width: 820px;
  margin: 34px auto 0;
  padding: 24px 34px 34px;
  border-top: 1px solid var(--line);
}

.reader-bottom-nav .btn:last-child {
  justify-self: end;
}

.reader-bottom-nav .btn:nth-child(2) {
  justify-self: center;
}

.reader-layout > .side-stack {
  position: sticky;
  top: 92px;
  align-self: start;
}

.reader-side-card,
.reader-settings-panel {
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.reader-side-card h2 {
  margin: 10px 0 12px;
}

.side-progress {
  width: 100%;
  margin: 10px 0 14px;
}

.reader-side-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.reader-side-stats div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.reader-side-stats strong {
  font-size: 20px;
}

.reader-side-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.reader-quick-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.comment-box {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.ad-slot {
  display: grid;
  gap: 10px;
  min-height: 140px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, var(--accent));
}

.ad-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-content img {
  width: 100%;
  border-radius: 6px;
}

.admin-shell {
  display: grid;
  gap: 16px;
}

.admin-topbar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 82%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.admin-topbar::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% auto;
  width: 420px;
  height: 220px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  pointer-events: none;
}

.admin-topbar > * {
  position: relative;
  z-index: 1;
}

.admin-topbar h1 {
  margin: 10px 0 4px;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: 0;
}

.admin-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-console {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, var(--accent));
  box-shadow: var(--shadow);
}

.admin-side-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 4px 14px;
  border-bottom: 1px solid var(--line);
}

.admin-side-brand strong,
.admin-side-brand small {
  display: block;
}

.admin-side-brand small {
  overflow: hidden;
  max-width: 160px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.admin-kpi {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 5px;
  min-height: 116px;
  align-content: end;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.admin-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
}

.admin-kpi:nth-child(2)::before {
  background: var(--gold);
}

.admin-kpi:nth-child(3)::before {
  background: #1f9d55;
}

.admin-kpi:nth-child(4)::before {
  background: #2f6fed;
}

.admin-kpi:nth-child(5)::before {
  background: #8a5cf6;
}

.admin-kpi span,
.admin-kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-kpi strong {
  font-size: 30px;
  line-height: 1;
}

.admin-quick-nav {
  display: grid;
  gap: 7px;
}

.admin-quick-nav a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-quick-nav a span {
  display: grid;
  place-items: center;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.admin-quick-nav a:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--text);
}

.admin-card {
  margin-bottom: 0;
}

#adminOverview,
#adminOperations,
#adminCommandCenter,
#adminAudience,
#adminModeration,
#adminReadiness,
#adminLaunch,
#siteSettingsForm,
#adminSeo,
#novelForm,
#adForm,
#chapterForm,
#adminChapters,
#adminRequests {
  scroll-margin-top: 150px;
}

.admin-main > .panel,
.admin-main .panel,
.admin-command-center,
.admin-audience-panel,
.admin-moderation-panel {
  border-radius: 8px;
}

.admin-main > .panel h2,
.admin-grid .panel h2,
.admin-command-center h2,
.admin-audience-panel h2,
.admin-moderation-panel h2 {
  margin-top: 0;
}

.admin-grid .panel {
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.04);
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  margin-bottom: 0;
}

.admin-command-center {
  display: grid;
  gap: 16px;
  margin-bottom: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, var(--accent)), var(--surface));
  box-shadow: var(--shadow);
}

.command-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.command-center-head h2 {
  margin: 10px 0 6px;
}

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

.funnel-card,
.pipeline-panel,
.quick-action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 8px 22px rgba(33, 27, 19, 0.04);
}

.funnel-card {
  display: grid;
  gap: 6px;
  padding: 13px;
}

.funnel-card span,
.funnel-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.funnel-card strong {
  font-size: 24px;
}

.command-center-body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.pipeline-panel {
  padding: 14px;
}

.pipeline-panel h3 {
  margin: 0 0 12px;
}

.pipeline-bars {
  display: grid;
  gap: 9px;
}

.pipeline-bar {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 42px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.pipeline-bar span,
.pipeline-bar strong {
  position: relative;
  z-index: 1;
}

.pipeline-bar em {
  position: absolute;
  inset: 0 auto 0 0;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

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

.quick-action-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.quick-action-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--surface);
}

.quick-action-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.admin-audience-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

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

.insight-card,
.audience-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.insight-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.insight-card span,
.insight-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.insight-card strong {
  font-size: 28px;
}

.insight-bar,
.audience-row {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.insight-bar {
  height: 10px;
}

.insight-bar em,
.audience-row em {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

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

.audience-column {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 14px;
}

.audience-column h3 {
  margin: 0 0 4px;
}

.audience-row,
.audience-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
}

.audience-row span,
.audience-row strong {
  position: relative;
  z-index: 1;
}

.audience-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.audience-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.audience-link span,
.audience-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-moderation-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, var(--gold)), var(--surface));
  box-shadow: 0 8px 24px rgba(33, 27, 19, 0.045);
}

.moderation-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 14px;
}

.moderation-policy,
.moderation-queue {
  display: grid;
  gap: 10px;
}

.moderation-policy-item,
.moderation-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 8px 22px rgba(33, 27, 19, 0.04);
}

.moderation-policy-item {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.moderation-policy-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.moderation-policy-item.ready span {
  background: #d9f2df;
  color: #12652a;
}

.moderation-policy-item.todo span {
  background: #ffe6e8;
  color: #8a1420;
}

.moderation-policy-item small,
.moderation-item small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.moderation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.moderation-item div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.moderation-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.health-meter {
  overflow: hidden;
  height: 10px;
  margin: 14px 0;
  border-radius: 999px;
  background: var(--surface-soft);
}

.health-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.health-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.health-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.health-chip.ready {
  background: #d9f2df;
  color: #12652a;
}

.health-chip.todo {
  background: #ffe6e8;
  color: #8a1420;
}

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

.activity-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.activity-item span,
.activity-item small {
  color: var(--muted);
}

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

.readiness-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.readiness-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.readiness-item.ready span {
  background: #d9f2df;
  color: #12652a;
}

.readiness-item.todo span {
  background: #ffe6e8;
  color: #8a1420;
}

.readiness-item small {
  color: var(--muted);
  line-height: 1.45;
}

.compact-title {
  margin-top: 0;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.launch-step {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 142px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.launch-step span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

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

.seo-grid textarea {
  min-height: 210px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

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

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(33, 27, 19, 0.035);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.admin-row:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: color-mix(in srgb, var(--surface) 94%, var(--accent));
}

.chapter-admin-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(280px, auto);
}

.novel-admin-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(240px, auto);
}

.request-admin-row {
  grid-template-columns: minmax(0, 1fr) auto auto minmax(340px, auto);
}

.admin-row small {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.compact-actions {
  gap: 8px;
}

.status-ready {
  background: #d9f2df;
  color: #12652a;
}

.status-off {
  background: #ffe6e8;
  color: #8a1420;
}

.status-premium {
  background: color-mix(in srgb, var(--accent) 16%, white);
  color: var(--accent);
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--muted);
  text-align: center;
}

.notice {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 84%, var(--accent));
  color: var(--muted);
}

.legal-page {
  max-width: 840px;
  margin: 0 auto;
}

.legal-page h1 {
  margin-top: 0;
}

.legal-page p {
  line-height: 1.8;
}

@media (max-width: 1400px) {
  .workspace-dock {
    display: none;
  }
}

@media (max-width: 920px) {
  .clean-home,
  .home-hero,
  .home-split,
  .wallet-cta-strip,
  .hero,
  .auth-page,
  .library-hero,
  .library-layout,
  .library-shelf,
  .community-grid,
  .requests-layout,
  .lab-layout,
  .reader-layout,
  .admin-console,
  .admin-grid,
  .admin-dashboard,
  .admin-ops-grid,
  .command-center-body,
  .funnel-grid,
  .insight-grid,
  .audience-grid,
  .moderation-grid,
  .activity-center,
  .inbox-hero,
  .inbox-layout,
  .start-hero,
  .path-grid,
  .setup-grid,
  .detail-stats,
  .readiness-grid,
  .launch-grid,
  .settings-grid,
  .seo-grid,
  .membership-hero,
  .pricing-grid,
  .creator-hero,
  .creator-metrics,
  .creator-board,
  .payment-summary,
  .payment-method-grid,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

  .spotlight-card {
    max-width: 240px;
  }

  .app-hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .admin-sidebar {
    position: static;
    max-height: none;
  }

  .admin-quick-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .announcement-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .cookie-consent {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-view-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 84px;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 5vw;
  }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
    gap: 12px;
  }

  .command-open {
    margin-left: auto;
  }

  .install-toggle {
    min-width: 52px;
    padding: 0 10px;
  }

  .bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }

  .bottom-nav a,
  .bottom-nav button {
    display: grid;
    gap: 3px;
    place-items: center;
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
  }

  .bottom-nav span {
    font-size: 17px;
    line-height: 1;
  }

  .bottom-nav a.active,
  .bottom-nav button:hover {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    color: var(--accent);
  }

  .notification-panel {
    top: auto;
    right: 12px;
    bottom: 86px;
    left: 12px;
    width: auto;
  }

  .back-to-top {
    bottom: 86px;
  }

  .connection-pill {
    right: 76px;
    bottom: 88px;
  }

  .workspace-dock {
    display: none;
  }

  .hero-main {
    padding: 28px;
  }

  .home-hero {
    min-height: 320px;
    padding: 24px;
  }

  .auth-hero {
    min-height: 0;
    padding: 24px;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search input {
    min-height: 42px;
  }

  .latest-list {
    grid-template-columns: 1fr;
  }

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

  .shelf-row-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .shelf-track {
    grid-auto-columns: minmax(148px, 68vw);
  }

  .novel-grid,
  .stats,
  .continue-grid {
    grid-template-columns: 1fr;
  }

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

  .reader-status,
  .platform-mode,
  .platform-mode-grid,
  .auth-benefits,
  .payment-steps,
  .reader-status-grid,
  .activity-metrics,
  .quick-action-grid,
  .profile-hero,
  .profile-stats,
  .achievement-grid,
  .mission-grid,
  .coin-package-grid,
  .checkin-panel,
  .checkin-stats {
    grid-template-columns: 1fr;
  }

  .wallet-panel,
  .wallet-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .wallet-actions {
    justify-content: flex-start;
  }

  .command-center-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .mission-summary {
  min-width: 0;
}

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

  .reader {
    padding: 0;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .detail-head {
    padding: 16px;
  }

  .reader-layout > .side-stack {
    position: static;
  }

  .inbox-side {
    position: static;
  }

  .reader-toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .reader-toolbar .btn,
  .reader-toolbar select {
    width: 100%;
  }

  .reader-head,
  .reader-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .reading-progress {
    width: calc(100% - 36px);
  }

  .reader-bottom-nav {
    grid-template-columns: 1fr;
    padding-left: 18px;
    padding-right: 18px;
  }

  .reader-bottom-nav .btn,
  .reader-bottom-nav .btn:last-child,
  .reader-bottom-nav .btn:nth-child(2) {
    justify-self: stretch;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }

  .site-footer::before {
    width: 100%;
  }
}

/* Hetzner-only paid novel additions */
.app-shell { max-width: 1320px; margin: 0 auto; padding: 34px 24px 80px; }
.site-header { position: sticky; top: 0; z-index: 40; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 32px; border-bottom:1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); }
.brand { display:flex; align-items:center; gap:12px; font-weight:900; color: var(--text); }
.brand-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:12px; color:#fff; background: linear-gradient(135deg, var(--accent), var(--gold)); }
.nav { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.nav a { color: var(--muted); font-weight:800; }
.nav a:hover { color: var(--accent); }
.dock-card { display:grid; gap:14px; padding:16px; border:1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.live-pill { justify-self:end; margin-top:-28px; padding:5px 9px; border-radius:999px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); font-size:12px; font-weight:900; }
.dock-stats { display:grid; grid-template-columns: 1fr 1fr; gap:8px; }
.dock-stats div { padding:10px; border-radius:10px; background: var(--surface-soft); }
.dock-stats b { display:block; font-size:20px; }
.dock-stats small, .dock-card a small { color: var(--muted); font-size:11px; font-weight:800; }
.dock-card a { display:flex; justify-content:space-between; color: var(--text); font-weight:900; }
.page-head { margin: 20px 0 28px; }
.novel-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:18px; }
.novel-card { display:grid; grid-template-columns: 132px 1fr; gap:16px; padding:14px; border:1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 12px 28px rgba(0,0,0,.06); }
.novel-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.novel-cover img { width:132px; height:176px; object-fit:cover; border-radius:12px; }
.metric { display:flex; align-items:center; justify-content:space-between; margin:10px 0; padding:12px; border-radius:12px; background:var(--surface-soft); }
.metric strong { font-size:24px; }
.paid-conversion-panel, .premium-kpi-strip, .novel-monetization-row, .pay-model-grid { margin:28px 0; }
.paid-conversion-panel { display:grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.85fr); gap:22px; padding:24px; border:1px solid color-mix(in srgb, var(--gold) 42%, var(--line)); border-radius: calc(var(--radius) + 8px); background: radial-gradient(circle at top right, color-mix(in srgb, var(--gold) 18%, transparent), transparent 22rem), linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--gold)), var(--surface)); box-shadow: var(--shadow); }
.paid-kpi-grid, .mini-stat-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.paid-kpi-grid div, .mini-stat-grid div { padding:15px; border:1px solid var(--line); border-radius:var(--radius); background: color-mix(in srgb, var(--surface) 84%, transparent); }
.paid-kpi-grid span, .mini-stat-grid span { display:block; color:var(--muted); font-size:12px; font-weight:900; text-transform:uppercase; }
.paid-kpi-grid strong, .mini-stat-grid strong { display:block; margin-top:5px; font-size: clamp(22px,3vw,34px); color: var(--text); }
.chapter-list { display:grid; gap:10px; }
.chapter-link { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 16px; border:1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.paid-chapter-row span:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.paid-chapter-row.locked { border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.price-badge, .free-badge, .vip-ribbon, .plan-badge { display:inline-flex; align-items:center; width:max-content; gap:6px; padding:6px 9px; border-radius:999px; font-size:11px; font-weight:900; line-height:1; }
.price-badge.locked { color: color-mix(in srgb, var(--accent) 84%, var(--text)); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border:1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); }
.price-badge.unlocked, .free-badge { color: color-mix(in srgb, #16834a 82%, var(--text)); background: color-mix(in srgb, #19a05b 12%, var(--surface)); border:1px solid color-mix(in srgb, #19a05b 26%, var(--line)); }
.vip-ribbon, .plan-badge { color:#231506; background:linear-gradient(135deg,#ffd27a,var(--gold)); }
.novel-monetization-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.monetization-snapshot { padding:20px; border:1px solid var(--line); border-radius:calc(var(--radius) + 6px); background:var(--surface); box-shadow:0 12px 30px rgba(0,0,0,.06); }
.paywall-page { display:grid; gap:24px; }
.paywall-hero { display:grid; grid-template-columns:300px minmax(0,1fr); gap:26px; padding:28px; border:1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius:calc(var(--radius) + 10px); background: radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--gold) 24%, transparent), transparent 26rem), linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--accent)), var(--surface)); box-shadow: var(--shadow); }
.paywall-cover { position:relative; min-height:360px; overflow:hidden; border-radius:calc(var(--radius) + 8px); }
.paywall-cover img { width:100%; height:100%; min-height:360px; object-fit:cover; }
.paywall-cover .vip-ribbon { position:absolute; left:16px; top:16px; }
.paywall-summary { grid-template-columns:repeat(4,minmax(0,1fr)); }
.paywall-actions { display:flex; flex-wrap:wrap; gap:10px; }
.pricing-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:16px; }
.pricing-card { padding:20px; border:1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow:0 12px 30px rgba(0,0,0,.06); }
.wallet-hero { padding:28px; border:1px solid color-mix(in srgb, var(--gold) 34%, var(--line)); border-radius: var(--radius); background: var(--surface); }
.coin-packages { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:22px 0; }
.coin-package { text-align:left; padding:18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); color:var(--text); cursor:pointer; }
.payment-history-item, .admin-row, .comment, .review-item { padding:12px; border-bottom:1px solid var(--line); }
.admin-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.admin-grid input, .admin-grid textarea, .admin-grid select, .auth-form input, .auth-form textarea, .auth-form select, #commentForm textarea, #reviewForm textarea, #reviewForm select { width:100%; margin:8px 0; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); }
@media (max-width: 1100px) { .novel-grid, .pricing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .paywall-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 780px) { .app-shell { padding: 20px 14px 60px; } .site-header { padding:12px; } .nav { gap:10px; } .workspace-dock { display:none; } .novel-grid, .novel-card, .paid-conversion-panel, .novel-monetization-row, .paywall-hero, .pricing-grid, .coin-packages, .admin-grid { grid-template-columns:1fr; } .novel-cover img { width:100%; height:220px; } .paywall-cover, .paywall-cover img { min-height:260px; } }
