:root {
  --paper:#f8f6f0;
  --surface:#fffefa;
  --ink:#292e29;
  --muted:#777a70;
  --line:#e2e3d8;
  --accent:#ad5139;
  --accent-hover:#8f412d;
  --sage:#e9ede2;
  --green:#53694d;
  --serif:'Libre Caslon Display',Georgia,serif;
  --reading:'Literata',Georgia,serif;
  --sans:'DM Sans',Arial,sans-serif;
  --radius:8px;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:14px;
  line-height:1.6;
}

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

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

button {
  cursor:pointer;
}

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

button:disabled {
  cursor:not-allowed;
  opacity:.5;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:4px;
}

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

h1,h2,h3,h4 {
  line-height:1.12;
  font-weight:500;
}

h1 {
  font-family:var(--serif);
  font-size:clamp(40px,5vw,66px);
  letter-spacing:-1.8px;
}

h2 {
  font-family:var(--serif);
  font-size:36px;
  letter-spacing:-.7px;
}

h3 {
  font-family:var(--serif);
  font-size:26px;
  letter-spacing:-.3px;
}

p {
  margin-bottom:16px;
}

small {
  font-size:12px;
}

img {
  max-width:100%;
  display:block;
}

svg {
  vertical-align:middle;
  flex-shrink:0;
}

.icon {
  width:18px;
  height:18px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.container {
  width:calc(100% - 112px);
  max-width:1280px;
  margin:0 auto;
}

.site-header {
  height:94px;
  display:flex;
  align-items:center;
  border-bottom:1px solid var(--line);
  gap:54px;
}

.brand {
  font-family:var(--serif);
  font-size:37px;
  letter-spacing:-1.5px;
  line-height:1;
}

.brand-dot {
  color:var(--accent);
}

.primary-nav {
  display:flex;
  align-items:center;
  gap:31px;
  height:100%;
}

.nav-link {
  white-space:nowrap;
  color:#777b71;
  font-size:13px;
  display:flex;
  align-items:center;
  position:relative;
  height:100%;
  gap:7px;
}

.nav-link:hover,.nav-link.active {
  color:var(--ink);
}

.nav-link.active:after {
  content:'';
  position:absolute;
  height:2px;
  background:var(--accent);
  bottom:-1px;
  left:0;
  right:0;
}

.header-actions {
  display:flex;
  align-items:center;
  margin-left:auto;
  gap:22px;
}

.button,.btn {
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:12px 20px;
  border:1px solid var(--ink);
  border-radius:5px;
  background:var(--ink);
  color:var(--surface);
  font-size:13px;
  font-weight:500;
  line-height:1.4;
  transition:background .15s,transform .15s;
}

.button:hover,.btn:hover {
  background:#424a40;
}

.button.accent {
  background:var(--accent);
  border-color:var(--accent);
}

.button.accent:hover {
  background:var(--accent-hover);
}

.button.outline {
  background:transparent;
  color:var(--ink);
  border-color:#c7cbbf;
}

.button.outline:hover {
  background:var(--sage);
}

.button.light {
  background:var(--surface);
  border-color:var(--surface);
  color:var(--ink);
}

.button.small {
  padding:9px 14px;
  font-size:12px;
}

.button.text {
  padding:5px 0;
  border:0;
  background:none;
  color:var(--ink);
}

.button.text:hover {
  color:var(--accent);
}

.button.wide {
  width:100%;
}

.button.danger {
  background:#a34336;
  border-color:#a34336;
}

.icon-button {
  background:none;
  border:1px solid var(--line);
  border-radius:50%;
  width:37px;
  height:37px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--ink);
}

.icon-button:hover {
  background:var(--sage);
}

.wallet-pill {
  display:flex;
  gap:8px;
  align-items:center;
  font-size:13px;
  font-weight:500;
}

.token-icon {
  color:#9c7743;
  background:#f4ead2;
  border:1px solid #d9c394;
  border-radius:50%;
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-family:Georgia,serif;
  font-size:12px;
  font-weight:bold;
  line-height:1;
}

.avatar {
  width:34px;
  height:34px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#e4e8db;
  color:#54664e;
  font-size:12px;
  border:1px solid #d7ddcc;
}

.mobile-nav-toggle {
  display:none;
}

.eyebrow {
  text-transform:uppercase;
  font-size:10px;
  letter-spacing:2.4px;
  font-weight:600;
  color:var(--green);
  margin-bottom:21px;
  display:flex;
  align-items:center;
  gap:10px;
}

.eyebrow:before {
  content:'';
  display:block;
  width:23px;
  height:1px;
  background:currentColor;
}

.hero {
  display:grid;
  grid-template-columns:1.07fr 1fr;
  gap:80px;
  padding:58px 0 53px;
  align-items:center;
}

.hero h1 {
  font-size:clamp(52px,5.7vw,79px);
  line-height:1.04;
  margin-bottom:23px;
  max-width:600px;
  letter-spacing:-2px;
}

.hero h1 em {
  font-weight:400;
  color:var(--accent);
}

.hero-copy>p {
  color:var(--muted);
  font-size:14px;
  max-width:360px;
  line-height:1.8;
}

.hero-buttons {
  display:flex;
  gap:24px;
  align-items:center;
  margin-top:27px;
}

.hero-note {
  font-size:11px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:22px;
}

.hero-note .icon {
  width:14px;
  height:14px;
}

.hero-art {
  position:relative;
  background:#e8eadd;
  border:1px solid #e0e3d3;
  border-radius:3px;
  min-height:350px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.hero-art:before {
  content:'';
  position:absolute;
  width:320px;
  height:320px;
  border:1px solid #cdd4bd;
  border-radius:50%;
  left:calc(50% - 160px);
  top:18px;
}

.hero-art:after {
  content:'';
  position:absolute;
  width:415px;
  height:415px;
  border:1px solid #d5dbc9;
  border-radius:50%;
  left:calc(50% - 207px);
  top:-29px;
}

.hero-book {
  height:260px;
  width:185px;
  object-fit:cover;
  box-shadow:9px 12px 23px #36422c29;
  position:absolute;
  border-radius:2px;
  z-index:2;
}

.hero-book.back {
  transform:translate(-112px,25px) rotate(-15deg);
  height:227px;
  width:170px;
  z-index:1;
}

.hero-book.front {
  transform:translate(0,-4px) rotate(1deg);
}

.hero-book.right {
  transform:translate(118px,30px) rotate(15deg);
  height:227px;
  width:170px;
  z-index:1;
}

.hero-art-label {
  position:absolute;
  bottom:16px;
  left:22px;
  font-size:9px;
  letter-spacing:2px;
  text-transform:uppercase;
  z-index:3;
  color:#718064;
}

.hero-art-star {
  position:absolute;
  right:29px;
  top:29px;
  color:#879775;
  font-size:33px;
  line-height:1;
  z-index:3;
}

.editorial-strip {
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding:21px 0;
  gap:32px;
  margin-bottom:45px;
}

.strip-item {
  display:flex;
  gap:13px;
  align-items:center;
}

.strip-icon {
  color:#718169;
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.strip-icon .icon {
  width:23px;
  height:23px;
}

.strip-item strong {
  font-size:12px;
  font-weight:500;
  display:block;
}

.strip-item span {
  font-size:10px;
  color:var(--muted);
}

.strip-item+.strip-item {
  border-left:1px solid var(--line);
  padding-left:33px;
}

.section-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:25px;
}

.section-heading h2 {
  margin-bottom:7px;
  font-size:35px;
}

.section-heading p {
  margin-bottom:0;
  font-size:12px;
  color:var(--muted);
}

.count-note {
  font-size:11px;
  color:var(--muted);
}

.catalog-tools {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:28px;
  padding-bottom:19px;
  border-bottom:1px solid var(--line);
}

.genre-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.genre-tab {
  background:transparent;
  border:1px solid transparent;
  padding:7px 13px;
  font-size:11px;
  white-space:nowrap;
  border-radius:4px;
  color:#74786d;
}

.genre-tab:hover {
  color:var(--ink);
  background:#eef0e7;
}

.genre-tab.active {
  background:var(--ink);
  color:var(--surface);
}

.search-sort {
  display:flex;
  gap:10px;
  align-items:center;
}

.search-field {
  position:relative;
  width:180px;
}

.search-field .icon {
  position:absolute;
  left:11px;
  top:11px;
  width:14px;
  height:14px;
  color:var(--muted);
}

.search-field input {
  width:100%;
  background:transparent;
  border:1px solid var(--line);
  border-radius:4px;
  padding:8px 10px 8px 32px;
  font-size:11px;
  color:var(--ink);
}

.sort-select {
  font-size:11px;
  border:0;
  background:transparent;
  color:#676f60;
  padding:8px 22px 8px 6px;
  max-width:130px;
}

.book-grid {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:25px;
  margin-bottom:52px;
}

.book-card {
  min-width:0;
  position:relative;
}

.book-cover-link {
  display:block;
  position:relative;
  margin-bottom:15px;
  overflow:hidden;
  background:#e7e5da;
  border-radius:3px;
  box-shadow:0 3px 8px #2428200c;
}

.book-cover {
  width:100%;
  aspect-ratio:3/4;
  object-fit:cover;
  transition:transform .3s;
}

.book-cover-link:hover .book-cover {
  transform:scale(1.035);
}

.cover-badge {
  position:absolute;
  top:10px;
  left:10px;
  background:#fffdf2e8;
  color:#4e5f43;
  font-size:8px;
  font-weight:600;
  padding:3px 6px;
  border-radius:2px;
  letter-spacing:.5px;
  text-transform:uppercase;
}

.book-genre {
  font-size:9px;
  color:var(--accent);
  text-transform:uppercase;
  letter-spacing:1.1px;
  margin-bottom:7px;
}

.book-card h3 {
  font-family:var(--reading);
  font-size:15px;
  line-height:1.42;
  font-weight:500;
  margin:0 0 5px;
  letter-spacing:-.2px;
}

.book-card h3 a:hover {
  color:var(--accent);
}

.book-author {
  font-size:10px;
  color:var(--muted);
  margin-bottom:9px;
}

.book-meta {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:9px;
  color:#7a8072;
}

.book-meta .icon {
  width:12px;
  height:12px;
}

.book-meta .meta-dot {
  width:2px;
  height:2px;
  background:#919689;
  border-radius:50%;
}

.writer-banner {
  background:#e9ecdf;
  padding:29px 37px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:30px;
  border:1px solid #dfe4d3;
  border-radius:4px;
  margin-bottom:54px;
}

.writer-banner .eyebrow {
  margin:0 0 10px;
  font-size:8px;
  letter-spacing:1.6px;
}

.writer-banner h2 {
  font-size:30px;
  margin-bottom:7px;
}

.writer-banner p {
  font-size:11px;
  color:#727a65;
  margin:0;
}

.writer-banner-mark {
  font-family:var(--serif);
  font-size:85px;
  color:#8a9976;
  line-height:.7;
  margin-right:20px;
}

.writer-banner-copy {
  margin-right:auto;
}

.site-footer {
  border-top:1px solid var(--line);
  padding:30px 0 27px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  color:var(--muted);
  font-size:10px;
}

.site-footer .brand {
  font-size:25px;
  color:var(--ink);
}

.footer-links {
  display:flex;
  gap:24px;
}

.prototype-label {
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:9px;
  padding:3px 7px;
  background:#efe9dc;
  color:#8b795e;
  border-radius:3px;
  letter-spacing:.5px;
}

.prototype-label:before {
  content:'';
  width:4px;
  height:4px;
  background:#a78b5c;
  border-radius:50%;
}

.page {
  padding-top:35px;
  padding-bottom:60px;
  min-height:65vh;
}

.breadcrumb {
  display:flex;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:11px;
  margin-bottom:30px;
}

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

.breadcrumb .icon {
  width:12px;
  height:12px;
}

.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:32px;
}

.page-heading h1 {
  font-size:48px;
  margin-bottom:10px;
}

.page-heading p {
  color:var(--muted);
  font-size:13px;
  margin-bottom:0;
  max-width:570px;
}

.page-heading .eyebrow {
  margin-bottom:13px;
}

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

.panel {
  min-width:0;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:var(--radius);
  padding:28px;
}

.panel h2 {
  font-size:28px;
  margin-bottom:8px;
}

.panel h3 {
  font-size:23px;
}

.panel-caption {
  color:var(--muted);
  font-size:12px;
  margin-bottom:24px;
}

.stack {
  display:grid;
  gap:24px;
}

.split-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 315px;
  gap:26px;
  align-items:start;
}

.notice {
  background:#eef0e5;
  border:1px solid #dde3d1;
  border-radius:5px;
  padding:13px 16px;
  font-size:12px;
  color:#5c6b50;
  margin-bottom:22px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.notice.warning {
  background:#f6ede0;
  border-color:#eadbc5;
  color:#82663f;
}

.notice .icon {
  margin-top:1px;
  width:16px;
  height:16px;
}

.empty-state {
  padding:58px 25px;
  text-align:center;
  border:1px dashed #cbd2bf;
  border-radius:6px;
  background:#f1f3ea;
}

.empty-state>.icon {
  height:34px;
  width:34px;
  color:#88977b;
  margin-bottom:19px;
}

.empty-state h2 {
  font-size:30px;
  margin-bottom:12px;
}

.empty-state p {
  color:var(--muted);
  font-size:12px;
  max-width:420px;
  margin:0 auto 22px;
}

.auth-layout {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:100px;
  padding:65px 0 75px;
  align-items:center;
  max-width:1000px;
  margin:auto;
  min-height:75vh;
}

.auth-aside .eyebrow {
  margin-bottom:25px;
}

.auth-aside h1 {
  font-size:64px;
  line-height:1.05;
  margin-bottom:25px;
}

.auth-aside h1 em {
  font-weight:400;
  color:var(--accent);
}

.auth-aside p {
  color:var(--muted);
  max-width:340px;
  line-height:1.9;
  font-size:13px;
}

.auth-decoration {
  display:flex;
  gap:13px;
  margin-top:34px;
  align-items:flex-end;
}

.auth-decoration img {
  width:88px;
  border-radius:2px;
  box-shadow:4px 7px 14px #292e2918;
}

.auth-decoration img:nth-child(2) {
  transform:translateY(-13px);
}

.auth-panel {
  padding:35px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:7px;
}

.auth-panel h2 {
  margin-bottom:10px;
}

.auth-switch {
  font-size:12px;
  color:var(--muted);
  margin-bottom:28px;
}

.auth-switch a {
  text-decoration:underline;
  text-underline-offset:3px;
  color:var(--accent);
}

.field {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-bottom:19px;
}

.field label,.field-label {
  font-size:12px;
  font-weight:500;
}

.field input,.field textarea,.field select {
  width:100%;
  padding:11px 12px;
  border:1px solid #d9ddce;
  border-radius:4px;
  background:#fffefa;
  color:var(--ink);
  font-size:13px;
  line-height:1.5;
}

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

.field input::placeholder,.field textarea::placeholder {
  color:#a0a497;
}

.field input:focus,.field textarea:focus,.field select:focus {
  border-color:#859777;
  outline:2px solid #dce5d5;
  outline-offset:0;
}

.field-help {
  font-size:10px;
  color:var(--muted);
  line-height:1.6;
}

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

.form-error {
  background:#fbebe6;
  color:#a33f2c;
  padding:11px 13px;
  font-size:12px;
  border-radius:4px;
  margin-bottom:17px;
}

.form-error:empty {
  display:none;
}

.form-actions {
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:22px;
}

.form-footnote {
  font-size:10px;
  color:var(--muted);
  text-align:center;
  margin:16px 0 0;
  line-height:1.7;
}

.book-detail {
  display:grid;
  grid-template-columns:246px minmax(0,1fr);
  gap:52px;
  max-width:950px;
  margin:0 auto 40px;
  align-items:start;
}

.detail-cover {
  width:246px;
  border-radius:3px;
  box-shadow:8px 12px 22px #2d34271a;
}

.detail-side-note {
  font-size:10px;
  color:var(--muted);
  line-height:1.8;
  margin-top:20px;
  display:flex;
  align-items:flex-start;
  gap:7px;
}

.detail-copy {
  padding-top:9px;
}

.detail-copy h1 {
  font-size:53px;
  margin-bottom:13px;
  line-height:1.08;
}

.detail-author {
  font-size:12px;
  color:var(--muted);
  margin-bottom:21px;
}

.detail-author strong {
  font-weight:500;
  color:var(--ink);
}

.detail-description {
  font-family:var(--reading);
  font-size:14px;
  line-height:1.95;
  color:#646c5c;
  white-space:pre-line;
  margin-top:23px;
}

.detail-stats {
  display:flex;
  gap:23px;
  font-size:11px;
  color:var(--muted);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:15px 0;
  margin:23px 0;
}

.detail-stats span {
  display:flex;
  align-items:center;
  gap:6px;
}

.detail-stats .icon {
  width:14px;
  height:14px;
}

.chapter-section {
  max-width:950px;
  margin:auto;
  padding-left:298px;
}

.chapter-section .section-heading h2 {
  font-size:30px;
}

.chapter-list {
  display:grid;
  border-top:1px solid var(--line);
}

.chapter-row {
  display:flex;
  align-items:center;
  gap:17px;
  padding:17px 0;
  border-bottom:1px solid var(--line);
}

.chapter-row:hover .chapter-title {
  color:var(--accent);
}

.chapter-number {
  font-family:var(--serif);
  font-size:23px;
  color:#9aa28d;
  min-width:28px;
}

.chapter-row-main {
  min-width:0;
  flex:1;
}

.chapter-title {
  font-size:13px;
  font-weight:500;
  display:block;
  line-height:1.6;
}

.chapter-subtitle {
  font-size:10px;
  color:var(--muted);
  display:flex;
  gap:8px;
  align-items:center;
}

.chapter-price {
  font-size:11px;
  color:#777b6c;
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap:6px;
}

.chapter-price.free {
  color:var(--green);
}

.chapter-price .icon {
  height:14px;
  width:14px;
}

.draft-tag,.tag {
  display:inline-flex;
  font-size:9px;
  padding:3px 7px;
  border-radius:3px;
  background:#eceee4;
  color:#707966;
  line-height:1.5;
  white-space:nowrap;
}

.tag.paid {
  background:#f3e8d4;
  color:#9a783e;
}

.tag.published {
  background:#e4eddd;
  color:#557445;
}

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

.studio-book {
  display:flex;
  align-items:center;
  gap:25px;
  padding:21px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:6px;
}

.studio-book img {
  width:70px;
  aspect-ratio:3/4;
  object-fit:cover;
  border-radius:2px;
}

.studio-book-content {
  min-width:0;
  flex:1;
}

.studio-book h3 {
  font-size:26px;
  margin:5px 0 8px;
}

.studio-book p {
  font-size:11px;
  color:var(--muted);
  margin:0;
}

.studio-tabs {
  display:flex;
  border-bottom:1px solid var(--line);
  gap:25px;
  margin-bottom:30px;
}

.studio-tabs a {
  font-size:12px;
  padding:0 0 13px;
  color:var(--muted);
  border-bottom:2px solid transparent;
}

.studio-tabs a.active {
  color:var(--ink);
  border-color:var(--accent);
}

.editor-layout {
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:25px;
  align-items:start;
}

.editor-layout>.panel {
  position:sticky;
  top:25px;
}

.editor-title {
  font-size:15px;
  font-weight:500;
  margin-bottom:15px;
}

.editor-chapter-link {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 10px;
  border-radius:4px;
  font-size:12px;
  margin:3px -10px;
}

.editor-chapter-link:hover,.editor-chapter-link.active {
  background:#edf0e4;
}

.editor-chapter-link small {
  color:var(--muted);
  font-size:9px;
}

.editor-book-link {
  display:flex;
  gap:12px;
  align-items:center;
  border-bottom:1px solid var(--line);
  padding-bottom:20px;
  margin-bottom:16px;
}

.editor-book-link img {
  width:42px;
  border-radius:2px;
}

.editor-book-link strong {
  font-size:12px;
  font-weight:500;
}

.editor-content-text {
  font-family:var(--reading)!important;
  font-size:16px!important;
  line-height:1.9!important;
  min-height:430px!important;
  padding:21px!important;
}

.checkbox-row {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:12px;
  margin:15px 0;
}

.checkbox-row input {
  accent-color:var(--green);
  width:16px;
  height:16px;
}

.save-status {
  font-size:10px;
  color:var(--muted);
}

.pricing-preview {
  background:var(--sage);
  padding:14px 16px;
  border-radius:4px;
  font-size:11px;
  line-height:1.8;
  color:#5f6e53;
  margin-top:4px;
}

.pricing-preview strong {
  font-size:17px;
  color:var(--green);
}

.wallet-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:25px;
  align-items:start;
}

.balance-card {
  padding:29px 33px;
  background:#e8ecdf;
  border:1px solid #dce2ce;
  border-radius:7px;
  position:relative;
  overflow:hidden;
  margin-bottom:26px;
}

.balance-card:after {
  content:'v.';
  font-family:var(--serif);
  font-size:180px;
  position:absolute;
  right:30px;
  top:-24px;
  color:#d3dcc4;
  line-height:1;
  pointer-events:none;
}

.balance-card .eyebrow {
  font-size:9px;
  margin-bottom:10px;
  position:relative;
  z-index:1;
}

.balance-amount {
  font-family:var(--serif);
  font-size:63px;
  line-height:1.1;
  letter-spacing:-2px;
  position:relative;
  z-index:1;
}

.balance-amount small {
  font-family:var(--sans);
  font-size:13px;
  color:#6d7a61;
  letter-spacing:0;
}

.balance-card p {
  font-size:11px;
  color:#75816a;
  margin:10px 0 0;
  position:relative;
  z-index:1;
}

.package-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:14px;
  margin-bottom:15px;
}

.package-card {
  border:1px solid #dce1d1;
  border-radius:5px;
  padding:23px 18px;
  background:#f8f9f2;
}

.package-card .token-icon {
  width:26px;
  height:26px;
  font-size:15px;
  margin-bottom:13px;
}

.package-amount {
  font-family:var(--serif);
  font-size:33px;
  line-height:1.1;
  margin-bottom:4px;
}

.package-amount small {
  font-family:var(--sans);
  font-size:11px;
  color:var(--muted);
}

.package-price {
  font-size:12px;
  color:var(--muted);
  margin-bottom:20px;
}

.ad-card img {
  width:100%;
  border-radius:4px;
  margin:16px 0;
}

.ad-card h3 {
  margin-bottom:8px;
}

.ad-card p {
  font-size:11px;
  color:var(--muted);
  line-height:1.8;
}

.reward-counter {
  font-size:10px;
  display:flex;
  justify-content:space-between;
  color:#728263;
  margin:14px 0 7px;
}

.progress-track {
  height:5px;
  background:#e2e7d9;
  border-radius:4px;
  overflow:hidden;
  margin-bottom:17px;
}

.progress-fill {
  height:100%;
  background:#849874;
  border-radius:4px;
}

.ad-simulation-label {
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:#8e805f;
  margin-top:12px;
  text-align:center;
}

.table-wrap {
  overflow:auto;
  width:100%;
}

table {
  border-collapse:collapse;
  width:100%;
  text-align:left;
  font-size:11px;
}

th {
  font-size:9px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:#858d79;
  font-weight:500;
  border-bottom:1px solid var(--line);
  padding:0 12px 12px 0;
  white-space:nowrap;
}

td {
  padding:15px 12px 15px 0;
  border-bottom:1px solid #eceee4;
  vertical-align:top;
}

tr:last-child td {
  border-bottom:0;
}

td strong {
  font-weight:500;
}

td small {
  display:block;
  color:var(--muted);
  font-size:9px;
  max-width:320px;
  margin-top:3px;
}

.amount-positive {
  color:#5f7f4d;
  font-weight:500;
}

.amount-negative {
  color:#a26348;
  font-weight:500;
}

.ledger-kind {
  display:flex;
  gap:9px;
  align-items:center;
}

.ledger-kind .icon {
  width:15px;
  height:15px;
  color:#829075;
}

.stats-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
  margin-bottom:27px;
}

.stat-card {
  background:var(--surface);
  border:1px solid var(--line);
  padding:24px 27px;
  border-radius:6px;
}

.stat-card p {
  color:var(--muted);
  font-size:11px;
  margin-bottom:14px;
}

.stat-value {
  font-family:var(--serif);
  font-size:43px;
  line-height:1.05;
  margin-bottom:9px;
  letter-spacing:-1px;
}

.stat-card small {
  font-size:9px;
  color:#8c9382;
}

.dashboard-stack {
  display:grid;
  gap:26px;
}

.config-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:25px;
  align-items:start;
}

.config-layout aside {
  position:sticky;
  top:25px;
}

.config-package-row {
  display:grid;
  grid-template-columns:1fr 1fr 1fr 35px;
  gap:10px;
  align-items:center;
  padding:10px 0;
  border-top:1px solid var(--line);
}

.config-package-row .field {
  margin:0;
}

.config-package-row input {
  font-size:11px;
  padding:9px;
}

.config-package-row .icon-button {
  width:29px;
  height:29px;
}

.config-package-labels {
  display:grid;
  grid-template-columns:1fr 1fr 1fr 35px;
  gap:10px;
  font-size:10px;
  color:var(--muted);
  margin:17px 0 10px;
}

.formula {
  font-family:var(--reading);
  font-size:13px;
  color:#627256;
  background:#edf0e6;
  border-radius:4px;
  padding:17px 14px;
  line-height:1.9;
  word-break:break-word;
}

.reader-header {
  border-bottom:1px solid var(--line);
  padding:18px 0;
  display:flex;
  align-items:center;
  gap:20px;
}

.reader-header .brand {
  font-size:29px;
}

.reader-back {
  font-size:11px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:7px;
}

.reader-header-tools {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
}

.reader-header-tools .icon-button {
  height:32px;
  width:32px;
  font-size:12px;
}

.reader-body {
  max-width:700px;
  margin:0 auto;
  padding:55px 20px 65px;
  min-height:65vh;
}

.reader-body .eyebrow {
  justify-content:center;
  margin-bottom:20px;
  font-size:9px;
}

.reader-body h1 {
  font-size:48px;
  line-height:1.15;
  text-align:center;
  letter-spacing:-1px;
  max-width:620px;
  margin:0 auto 18px;
}

.reader-meta {
  text-align:center;
  color:var(--muted);
  font-size:10px;
  margin-bottom:46px;
}

.reader-text {
  font-family:var(--reading);
  font-size:var(--reader-font-size,19px);
  line-height:1.95;
  color:#40483a;
}

.reader-text p {
  margin-bottom:1.4em;
}

.reader-text p:first-child:first-letter {
  float:left;
  font-family:var(--serif);
  font-size:4.4em;
  line-height:.76;
  margin:10px 9px 0 0;
  color:var(--accent);
}

.reader-navigation {
  border-top:1px solid var(--line);
  margin-top:45px;
  padding-top:24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.reader-navigation a {
  display:flex;
  gap:10px;
  align-items:center;
  font-size:11px;
}

.reader-navigation small {
  display:block;
  color:var(--muted);
  font-size:9px;
}

.reader-navigation .next {
  text-align:right;
  margin-left:auto;
}

.reader-lock {
  text-align:center;
  padding:37px 30px;
  background:#eeefe4;
  border:1px solid #dde3ce;
  border-radius:6px;
  max-width:510px;
  margin:0 auto;
}

.reader-lock>.icon {
  height:30px;
  width:30px;
  color:#7d8f6d;
  margin-bottom:17px;
}

.reader-lock h2 {
  font-size:33px;
}

.reader-lock p {
  font-size:12px;
  color:var(--muted);
  line-height:1.9;
  max-width:360px;
  margin:0 auto 21px;
}

.reader-lock .unlock-price {
  font-family:var(--serif);
  font-size:40px;
  margin-bottom:20px;
  line-height:1.1;
}

.reader-lock .unlock-price small {
  font-family:var(--sans);
  font-size:12px;
  color:var(--muted);
}

.reader-lock .balance-note {
  font-size:10px;
  color:var(--muted);
  margin-top:15px;
  margin-bottom:0;
}

.reader-lock .balance-note a {
  text-decoration:underline;
  text-underline-offset:2px;
  color:var(--accent);
}

.reader-progress {
  position:fixed;
  left:0;
  top:0;
  height:2px;
  background:var(--accent);
  z-index:100;
  width:0;
}

.reader-dark {
  --paper:#232820;
  --surface:#2c3328;
  --ink:#dedfce;
  --muted:#a0aa93;
  --line:#3c4734;
  --accent:#d29472;
  --sage:#343f2d;
  --green:#afc19e;
}

.reader-dark .reader-text {
  color:#c9d0bc;
}

.reader-dark .reader-lock {
  background:#2e3827;
  border-color:#46553a;
}

.modal-backdrop {
  position:fixed;
  inset:0;
  z-index:200;
  background:#1c261c80;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  backdrop-filter:blur(3px);
}

.modal {
  background:var(--surface);
  border-radius:9px;
  max-width:490px;
  width:100%;
  padding:29px;
  box-shadow:0 20px 80px #151e2040;
  position:relative;
  max-height:90vh;
  overflow-y:auto;
}

.modal .close-modal {
  position:absolute;
  right:15px;
  top:15px;
}

.modal h2 {
  font-size:31px;
  padding-right:25px;
}

.modal>p {
  font-size:12px;
  color:var(--muted);
}

.modal img {
  width:100%;
  border-radius:5px;
  margin:20px 0;
}

.modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:25px;
}

.modal .chapter-row {
  font-size:12px;
}

.modal .chapter-row.active {
  color:var(--accent);
}

#toast-region {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  z-index:300;
  display:grid;
  gap:9px;
  max-width:calc(100% - 32px);
  width:max-content;
}

.toast {
  padding:12px 20px;
  background:#34442d;
  color:#fafbf5;
  border-radius:6px;
  box-shadow:0 5px 24px #25322122;
  font-size:12px;
  display:flex;
  align-items:center;
  gap:10px;
  animation:toast-in .2s ease;
}

.toast.error {
  background:#9c4633;
}

.toast .icon {
  height:16px;
  width:16px;
}

@keyframes toast-in {
  from {
    opacity:0;
    transform:translateY(10px);
  }
  to {
    opacity:1;
    transform:translateY(0);
  }
}

.loading-state {
  text-align:center;
  min-height:55vh;
  padding-top:100px;
  color:var(--muted);
  font-size:12px;
}

.loading-spinner {
  display:block;
  width:27px;
  height:27px;
  border:2px solid #dee3d3;
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin .8s linear infinite;
  margin:0 auto 17px;
}

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

.initial-loader {
  padding:25vh 0;
  text-align:center;
}

.initial-loader p {
  font-size:12px;
  color:var(--muted);
  margin-top:20px;
}

.skip-link {
  position:fixed;
  top:-100px;
  left:15px;
  background:var(--ink);
  color:var(--surface);
  padding:12px;
  z-index:999;
}

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

.muted-link {
  color:var(--muted);
  font-size:11px;
}

.muted-link:hover {
  color:var(--accent);
}

.divider {
  border:0;
  border-top:1px solid var(--line);
  margin:26px 0;
}

.text-right {
  text-align:right;
}

.nowrap {
  white-space:nowrap;
}

.visually-hidden {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.small-print {
  font-size:10px;
  color:var(--muted);
  line-height:1.8;
}

.inline-actions {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.profile-card {
  max-width:620px;
  margin:auto;
}

.profile-info {
  display:flex;
  gap:17px;
  align-items:center;
  margin-bottom:25px;
}

.profile-info .avatar {
  width:55px;
  height:55px;
  font-size:18px;
}

.profile-info p {
  font-size:11px;
  margin:5px 0 0;
  color:var(--muted);
}

.cover-choices {
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:10px;
  max-width:460px;
  margin-bottom:20px;
}

.cover-choices button {
  padding:3px;
  border:1px solid transparent;
  border-radius:4px;
  background:transparent;
}

.cover-choices button:hover,
.cover-choices button.selected {
  border-color:var(--accent);
}

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

.history-panel {
  margin-top:26px;
}

.config-package-row label {
  width:100%;
}

.current-chapter {
  color:var(--accent);
}

.modal-open {
  overflow:hidden;
}

.book-author a:hover,
.detail-author a:hover,
.reader-meta a:hover {
  color:var(--accent);
}

.author-profile {
  display:grid;
  grid-template-columns:minmax(0,1fr) 335px;
  align-items:start;
  gap:60px;
  padding:42px;
  margin-bottom:48px;
  background:#ecefe4;
  border:1px solid #e0e5d4;
  border-radius:8px;
}

.author-monogram {
  width:73px;
  height:73px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--serif);
  font-size:31px;
  color:#657553;
  border:1px solid #c6d1b8;
  border-radius:50%;
  background:#e1e7d6;
  margin-bottom:24px;
}

.author-profile .eyebrow {
  font-size:9px;
  margin-bottom:16px;
}

.author-profile h1 {
  font-size:52px;
  margin-bottom:22px;
  overflow-wrap:anywhere;
}

.author-books h2 {
  overflow-wrap:anywhere;
}

.author-bio {
  max-width:610px;
  font-family:var(--reading);
  font-size:14px;
  color:#5f6b54;
  line-height:1.95;
  white-space:pre-line;
  overflow-wrap:anywhere;
  margin-bottom:26px;
}

.author-facts {
  display:flex;
  flex-wrap:wrap;
  gap:12px 20px;
  color:#758367;
  font-size:10px;
  border-top:1px solid #d7decb;
  padding-top:19px;
  margin-bottom:18px;
}

.author-facts span {
  display:flex;
  gap:6px;
  align-items:center;
}

.author-facts .icon {
  width:14px;
  height:14px;
}

.author-support-panel {
  padding:26px;
  background:var(--surface);
  border:1px solid #dce3ce;
  border-radius:6px;
  min-width:0;
}

.author-support-panel h2 {
  font-size:29px;
  margin-bottom:13px;
}

.author-support-panel>p {
  font-size:11px;
  color:var(--muted);
  line-height:1.8;
}

.support-symbol {
  display:flex;
  align-items:center;
  justify-content:center;
  width:37px;
  height:37px;
  border-radius:50%;
  color:var(--accent);
  background:#f4e9dd;
  margin-bottom:16px;
}

.support-presets {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:20px 0 17px;
}

.support-preset {
  border:1px solid #d8ddcc;
  background:transparent;
  padding:10px 4px;
  border-radius:4px;
  color:var(--ink);
  font-size:12px;
  white-space:nowrap;
}

.support-preset:hover,
.support-preset.selected {
  border-color:var(--accent);
  color:var(--accent);
  background:#f9f1e8;
}

.support-price {
  padding:12px 13px;
  margin-bottom:18px;
  border-radius:4px;
  font-size:10px;
  line-height:1.8;
  color:#607152;
  background:#edf1e5;
}

.support-price strong {
  font-weight:600;
}

.support-price small {
  display:block;
  color:#7a866e;
  font-size:9px;
  margin-top:4px;
}

.support-footnote {
  color:var(--muted);
  font-size:9px;
  line-height:1.8;
  margin:14px 0 0;
}

.support-summary {
  margin:24px 0;
  border-top:1px solid var(--line);
}

.support-summary>div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:13px 0;
  border-bottom:1px solid var(--line);
}

.support-summary dt {
  font-size:11px;
  color:var(--muted);
}

.support-summary dd {
  font-size:14px;
  font-weight:500;
  margin:0;
  white-space:nowrap;
}

.reader-thanks {
  display:grid;
  grid-template-columns:37px minmax(0,1fr);
  align-items:start;
  gap:0 17px;
  padding:30px 0;
  margin-top:34px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.reader-thanks .support-symbol {
  margin:0;
}

.reader-thanks h2 {
  font-size:29px;
  margin-bottom:9px;
}

.reader-thanks p {
  color:var(--muted);
  font-size:11px;
  line-height:1.8;
  margin-bottom:17px;
}

.reader-thanks p a {
  text-decoration:underline;
  text-underline-offset:3px;
}

.reader-thanks>.button {
  grid-column:2;
  justify-self:start;
}

.reader-dark .support-symbol {
  background:var(--sage);
}

.reader-dark .support-preset {
  border-color:var(--line);
}

.reader-dark .support-preset:hover,
.reader-dark .support-preset.selected {
  background:var(--sage);
  border-color:var(--accent);
}

.reader-dark .support-price {
  background:var(--sage);
  color:#bdc8b0;
}

.reader-dark .support-price small {
  color:var(--muted);
}

@media(max-width:900px) {
  .author-profile {
    grid-template-columns:minmax(0,1fr) 300px;
    padding:29px;
    gap:30px;
  }

  .author-profile h1 {
    font-size:44px;
  }

  .author-support-panel {
    padding:22px;
  }
}

@media(max-width:680px) {
  .author-profile {
    grid-template-columns:minmax(0,1fr);
    padding:24px;
    gap:20px;
    margin-bottom:33px;
  }

  .author-monogram {
    width:60px;
    height:60px;
    font-size:26px;
    margin-bottom:21px;
  }

  .author-profile h1 {
    font-size:41px;
    margin-bottom:19px;
  }

  .author-bio {
    font-size:12px;
  }

  .author-facts {
    font-size:9px;
    gap:11px;
  }

  .author-facts span {
    gap:5px;
  }

  .author-support-panel {
    padding:21px;
  }

  .reader-thanks {
    grid-template-columns:32px minmax(0,1fr);
    gap:0 13px;
    padding:25px 0;
  }

  .reader-thanks .support-symbol {
    width:32px;
    height:32px;
  }

  .reader-thanks h2 {
    font-size:25px;
  }

  .reader-thanks p {
    font-size:10px;
  }
}

@media(min-width:1450px) {
  .container {
    max-width:1320px;
  }
  .hero {
    gap:100px;
    padding-top:68px;
    padding-bottom:60px;
  }
  .hero-art {
    min-height:385px;
  }
  .hero-book {
    height:285px;
    width:207px;
  }
  .hero-book.back,.hero-book.right {
    height:246px;
    width:184px;
  }
  .hero-book.back {
    transform:translate(-126px,26px) rotate(-15deg);
  }
  .hero-book.right {
    transform:translate(130px,30px) rotate(15deg);
  }
  .book-grid {
    gap:30px;
  }
}

@media(max-width:1150px) {
  .container {
    width:calc(100% - 64px);
  }
  .site-header {
    gap:35px;
  }
  .primary-nav {
    gap:23px;
  }
  .header-actions {
    gap:14px;
  }
  .hero {
    gap:40px;
  }
  .hero-art {
    min-height:320px;
  }
  .hero-book {
    height:230px;
    width:165px;
  }
  .hero-book.back,.hero-book.right {
    height:205px;
    width:150px;
  }
  .hero-book.back {
    transform:translate(-95px,20px) rotate(-15deg);
  }
  .hero-book.right {
    transform:translate(96px,25px) rotate(15deg);
  }
  .book-grid {
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:25px;
  }
  .catalog-tools {
    align-items:flex-start;
  }
  .genre-tabs {
    gap:3px;
  }
  .genre-tab {
    padding:7px 10px;
  }
  .search-field {
    width:150px;
  }
  .hero h1 {
    font-size:64px;
  }
  .hero-copy>p {
    font-size:13px;
  }
  .search-sort {
    flex-shrink:0;
  }
  .auth-layout {
    gap:60px;
  }
  .split-layout,.wallet-layout {
    grid-template-columns:minmax(0,1fr) 290px;
  }
  .config-layout {
    grid-template-columns:minmax(0,1fr) 265px;
  }
  .book-detail {
    gap:40px;
  }
  .chapter-section {
    padding-left:286px;
  }
  .book-grid .book-card:nth-child(n+5) {
    display:block;
  }
}

@media(max-width:900px) {
  .hero {
    gap:30px;
  }
  .hero h1 {
    font-size:54px;
  }
  .hero-art {
    min-height:290px;
  }
  .hero-book {
    height:210px;
    width:152px;
  }
  .hero-book.back,.hero-book.right {
    height:185px;
    width:135px;
  }
  .hero-book.back {
    transform:translate(-75px,20px) rotate(-15deg);
  }
  .hero-book.right {
    transform:translate(77px,25px) rotate(15deg);
  }
  .hero-buttons {
    gap:18px;
  }
  .button {
    padding:11px 16px;
    font-size:12px;
  }
  .catalog-tools {
    display:block;
  }
  .search-sort {
    margin-top:17px;
    justify-content:space-between;
  }
  .search-field {
    width:240px;
  }
  .strip-item+.strip-item {
    padding-left:18px;
  }
  .editorial-strip {
    gap:17px;
  }
  .strip-item {
    gap:7px;
  }
  .strip-item span {
    font-size:9px;
  }
  .strip-item strong {
    font-size:10px;
  }
  .strip-icon {
    width:25px;
  }
  .site-header {
    gap:30px;
    height:80px;
  }
  .brand {
    font-size:32px;
  }
  .primary-nav {
    gap:19px;
  }
  .nav-link {
    font-size:11px;
  }
  .header-actions .write-nav {
    display:none;
  }
  .auth-layout {
    gap:40px;
  }
  .auth-aside h1 {
    font-size:51px;
  }
  .auth-panel {
    padding:25px;
  }
  .wallet-layout,.split-layout,.config-layout {
    grid-template-columns:minmax(0,1fr);
  }
  .wallet-layout aside {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
  }
  .wallet-layout aside .panel {
    height:100%;
  }
  .config-layout aside {
    position:static;
  }
  .config-layout aside .panel {
    max-width:none;
  }
  .editor-layout {
    grid-template-columns:240px minmax(0,1fr);
  }
  .panel {
    padding:23px;
  }
  .stats-grid {
    gap:14px;
  }
  .stat-card {
    padding:20px;
  }
  .stat-value {
    font-size:37px;
  }
  .book-detail {
    grid-template-columns:205px minmax(0,1fr);
    gap:35px;
  }
  .detail-cover {
    width:205px;
  }
  .detail-copy h1 {
    font-size:43px;
  }
  .chapter-section {
    padding-left:240px;
  }
  .detail-stats {
    gap:13px;
  }
  .writer-banner {
    padding:25px;
  }
  .writer-banner-mark {
    margin-right:5px;
  }
  .writer-banner h2 {
    font-size:27px;
  }
  .site-footer {
    flex-wrap:wrap;
  }
  .page-heading h1 {
    font-size:43px;
  }
}

@media(max-width:680px) {
  .container {
    width:calc(100% - 36px);
  }
  .site-header {
    height:73px;
    gap:20px;
  }
  .brand {
    font-size:31px;
  }
  .primary-nav {
    gap:18px;
  }
  .primary-nav .nav-link:nth-child(3) {
    display:none;
  }
  .nav-link {
    font-size:11px;
  }
  .header-actions {
    gap:12px;
  }
  .header-actions .login-link {
    display:none;
  }
  .header-actions .button {
    padding:8px 12px;
    font-size:10px;
  }
  .wallet-pill {
    font-size:11px;
    gap:5px;
  }
  .wallet-pill .token-icon {
    width:17px;
    height:17px;
    font-size:10px;
  }
  .avatar {
    width:29px;
    height:29px;
    font-size:10px;
  }
  .hero {
    grid-template-columns:1fr;
    gap:30px;
    padding-top:35px;
    padding-bottom:33px;
  }
  .hero h1 {
    font-size:59px;
    line-height:1.02;
    max-width:400px;
    margin-bottom:19px;
  }
  .hero-copy>p {
    font-size:12px;
    max-width:330px;
    margin-bottom:12px;
  }
  .hero .eyebrow {
    font-size:8px;
    margin-bottom:17px;
  }
  .hero-buttons {
    margin-top:21px;
  }
  .hero-note {
    margin-top:17px;
    font-size:9px;
  }
  .hero-art {
    min-height:290px;
    max-width:none;
  }
  .hero-book {
    height:225px;
    width:165px;
  }
  .hero-book.back,.hero-book.right {
    height:198px;
    width:146px;
  }
  .hero-book.back {
    transform:translate(-91px,18px) rotate(-15deg);
  }
  .hero-book.right {
    transform:translate(94px,20px) rotate(15deg);
  }
  .hero-art:before {
    width:270px;
    height:270px;
    left:calc(50% - 135px);
    top:10px;
  }
  .hero-art:after {
    width:355px;
    height:355px;
    left:calc(50% - 177px);
    top:-32px;
  }
  .hero-art-label {
    font-size:8px;
  }
  .hero-art-star {
    font-size:25px;
  }
  .editorial-strip {
    grid-template-columns:1fr;
    gap:13px;
    padding:19px 0;
    margin-bottom:32px;
  }
  .strip-item+.strip-item {
    padding-left:0;
    border-left:0;
  }
  .strip-icon {
    width:29px;
  }
  .strip-icon .icon {
    width:20px;
    height:20px;
  }
  .strip-item {
    gap:10px;
  }
  .strip-item strong {
    font-size:11px;
  }
  .strip-item span {
    font-size:10px;
  }
  .section-heading {
    margin-bottom:21px;
    align-items:flex-start;
  }
  .section-heading h2 {
    font-size:32px;
  }
  .section-heading p {
    font-size:11px;
    max-width:210px;
  }
  .count-note {
    font-size:10px;
    white-space:nowrap;
    margin-top:10px;
  }
  .genre-tabs {
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:none;
    margin:0 -18px;
    padding:0 18px;
  }
  .genre-tabs::-webkit-scrollbar {
    display:none;
  }
  .genre-tab {
    font-size:10px;
    padding:7px 11px;
  }
  .catalog-tools {
    margin-bottom:22px;
    padding-bottom:15px;
  }
  .search-sort {
    margin-top:15px;
  }
  .search-field {
    width:210px;
  }
  .book-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:29px 20px;
    margin-bottom:35px;
  }
  .book-cover-link {
    margin-bottom:12px;
  }
  .book-card h3 {
    font-size:15px;
  }
  .book-author {
    font-size:10px;
  }
  .book-genre {
    font-size:8px;
  }
  .book-meta {
    font-size:9px;
  }
  .writer-banner {
    padding:25px;
    flex-wrap:wrap;
    gap:21px;
    margin-bottom:35px;
  }
  .writer-banner-mark {
    display:none;
  }
  .writer-banner h2 {
    font-size:29px;
  }
  .writer-banner p {
    font-size:11px;
  }
  .writer-banner .button {
    width:100%;
  }
  .writer-banner-copy {
    width:100%;
  }
  .site-footer {
    padding:25px 0;
    gap:18px;
    align-items:center;
    font-size:9px;
  }
  .site-footer .brand {
    font-size:24px;
  }
  .site-footer>span {
    order:3;
    width:100%;
    font-size:9px;
  }
  .footer-links {
    gap:18px;
  }
  .page {
    padding-top:25px;
    padding-bottom:35px;
  }
  .breadcrumb {
    font-size:10px;
    margin-bottom:24px;
  }
  .page-heading {
    align-items:flex-start;
    gap:16px;
    margin-bottom:25px;
  }
  .page-heading h1 {
    font-size:39px;
    margin-bottom:9px;
  }
  .page-heading p {
    font-size:11px;
  }
  .page-heading .eyebrow {
    font-size:8px;
    margin-bottom:12px;
  }
  .page-heading .button {
    white-space:nowrap;
    font-size:10px;
    padding:9px 12px;
  }
  .page-heading .button .icon {
    width:14px;
    height:14px;
  }
  .panel {
    padding:21px;
  }
  .panel h2 {
    font-size:27px;
  }
  .panel-caption {
    font-size:11px;
    margin-bottom:20px;
  }
  .auth-layout {
    grid-template-columns:1fr;
    gap:30px;
    padding:35px 0 45px;
    min-height:auto;
  }
  .auth-aside .eyebrow {
    font-size:8px;
    margin-bottom:17px;
  }
  .auth-aside h1 {
    font-size:50px;
    max-width:390px;
    margin-bottom:17px;
  }
  .auth-aside p {
    font-size:12px;
    max-width:350px;
    margin-bottom:0;
  }
  .auth-decoration {
    display:none;
  }
  .auth-panel {
    padding:26px;
  }
  .field {
    margin-bottom:17px;
  }
  .field input,.field textarea,.field select {
    font-size:16px;
    padding:10px 11px;
  }
  .field label {
    font-size:11px;
  }
  .field-help {
    font-size:9px;
  }
  .auth-switch {
    font-size:11px;
    margin-bottom:25px;
  }
  .form-row {
    gap:13px;
  }
  .book-detail {
    grid-template-columns:1fr;
    gap:25px;
    margin-bottom:30px;
  }
  .detail-cover {
    width:155px;
    float:left;
    box-shadow:5px 7px 17px #2d342724;
  }
  .detail-side {
    display:flex;
    align-items:center;
    gap:24px;
  }
  .detail-side-note {
    max-width:160px;
    font-size:10px;
    margin:0;
  }
  .detail-copy {
    padding:0;
  }
  .detail-copy h1 {
    font-size:45px;
    max-width:450px;
  }
  .detail-author {
    font-size:11px;
    margin-bottom:17px;
  }
  .detail-description {
    font-size:13px;
    line-height:1.95;
    margin-top:20px;
  }
  .detail-stats {
    font-size:10px;
    gap:18px;
    margin:20px 0;
  }
  .chapter-section {
    padding-left:0;
  }
  .chapter-section .section-heading h2 {
    font-size:29px;
  }
  .chapter-row {
    gap:14px;
    padding:17px 0;
  }
  .chapter-title {
    font-size:12px;
  }
  .chapter-price {
    font-size:10px;
  }
  .chapter-number {
    font-size:21px;
    min-width:23px;
  }
  .chapter-subtitle {
    font-size:9px;
  }
  .studio-book {
    padding:17px;
    gap:15px;
    flex-wrap:wrap;
  }
  .studio-book img {
    width:55px;
  }
  .studio-book h3 {
    font-size:23px;
    margin-bottom:6px;
  }
  .studio-book p {
    font-size:10px;
  }
  .studio-book .inline-actions {
    width:100%;
    padding-top:8px;
  }
  .studio-book .inline-actions .button {
    flex:1;
  }
  .studio-tabs {
    gap:22px;
    margin-bottom:24px;
  }
  .studio-tabs a {
    font-size:11px;
  }
  .editor-layout {
    grid-template-columns:minmax(0,1fr);
    gap:19px;
  }
  .editor-layout>.panel {
    position:static;
  }
  .editor-chapters {
    display:flex;
    gap:9px;
    overflow-x:auto;
    align-items:center;
    margin-bottom:10px;
  }
  .editor-chapter-link {
    flex-shrink:0;
    flex-direction:column;
    align-items:flex-start;
    margin:0;
    padding:10px;
    background:#f3f5ec;
    font-size:11px;
    max-width:170px;
  }
  .editor-chapter-link>span {
    max-width:150px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .editor-book-link {
    padding-bottom:15px;
    margin-bottom:13px;
  }
  .editor-content-text {
    font-size:16px!important;
    padding:15px!important;
    min-height:350px!important;
  }
  .config-package-row {
    gap:7px;
    grid-template-columns:1fr .85fr .85fr 29px;
  }
  .config-package-labels {
    gap:7px;
    grid-template-columns:1fr .85fr .85fr 29px;
  }
  .config-package-row input {
    padding:7px;
    font-size:13px;
  }
  .wallet-layout aside {
    grid-template-columns:1fr;
  }
  .wallet-layout {
    gap:21px;
  }
  .balance-card {
    padding:25px;
    margin-bottom:21px;
  }
  .balance-amount {
    font-size:59px;
  }
  .balance-card:after {
    right:15px;
    font-size:160px;
  }
  .balance-card p {
    font-size:10px;
  }
  .package-grid {
    grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
    gap:12px;
  }
  .package-card {
    padding:19px 16px;
  }
  .stats-grid {
    grid-template-columns:1fr;
    gap:12px;
  }
  .stat-card {
    padding:20px 23px;
    display:grid;
    grid-template-columns:1fr 1fr;
    align-items:center;
    column-gap:20px;
  }
  .stat-card p {
    margin:0;
    font-size:10px;
  }
  .stat-value {
    font-size:34px;
    margin:0;
    text-align:right;
    grid-row:span 2;
  }
  .stat-card small {
    font-size:9px;
    grid-column:1;
  }
  .notice {
    font-size:11px;
    padding:12px;
  }
  .reader-header {
    padding:17px 0;
    gap:15px;
  }
  .reader-header .brand {
    font-size:26px;
  }
  .reader-header .reader-back {
    display:none;
  }
  .reader-header-tools {
    gap:7px;
  }
  .reader-header-tools .icon-button {
    width:29px;
    height:29px;
  }
  .reader-body {
    padding-top:35px;
  }
  .reader-body h1 {
    font-size:39px;
  }
  .reader-body .eyebrow {
    margin-bottom:17px;
  }
  .reader-meta {
    font-size:9px;
    margin-bottom:33px;
  }
  .reader-text {
    font-size:calc(var(--reader-font-size,19px) - 1px);
    line-height:1.95;
  }
  .reader-lock {
    padding:28px 20px;
  }
  .reader-lock h2 {
    font-size:30px;
  }
  .reader-lock p {
    font-size:11px;
  }
  .reader-navigation {
    gap:14px;
    margin-top:35px;
  }
  .reader-navigation a {
    font-size:10px;
  }
  .reader-navigation small {
    font-size:8px;
  }
  .reader-navigation a>div {
    max-width:130px;
  }
  .modal {
    padding:25px;
  }
  .form-actions {
    flex-wrap:wrap;
  }
  .form-actions .button {
    flex:1;
  }
  .form-actions .save-status {
    width:100%;
  }
}

@media(max-width:420px) {
  .primary-nav .nav-link:nth-child(2) {
    display:none;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
  *,*:before,*:after {
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
  }
}

