.ax-read-body {
  margin: 0;
  padding-top: 0;
  overflow: hidden;
  background: #ece7dc;
  color: #1c1917;
  font-family: Poppins, sans-serif;
}
.ax-read {
  display: flex;
  flex-direction: column;
  height: 100svh;
  height: 100dvh;
}
.ax-read-bar,
.ax-read-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-color: #e9e3d3;
}
.ax-read-bar {
  position: relative;
  border-bottom: 1px solid #e9e3d3;
  min-height: 62px;
}
.ax-read-tools { border-top: 1px solid #e9e3d3; justify-content: space-between; }
.ax-read-brand { flex: none; min-width: 0; }
.ax-read-brand .ax-lockup-mark { height: 28px; }
.ax-read-brand .ax-tagline { display: block; }
.ax-read-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}
.ax-read-tools button,
.ax-read-side-head button,
.ax-read-toc-btn,
.ax-read-lock-card button {
  font: inherit;
  font-size: 14px;
  color: #1c1917;
  background: #fff;
  border: 1px solid #ddd6c4;
  border-radius: 8px;
  padding: 7px 12px;
  text-decoration: none;
  cursor: pointer;
}
.ax-read-pager button,
.ax-read-lock-card button[data-read="back-sample"] {
  background: #a85a34;
  border-color: #a85a34;
  color: #fff;
}
.ax-read-tools button:disabled {
  opacity: 0.38;
  cursor: default;
}
.ax-read button:focus-visible,
.ax-read a:focus-visible,
.ax-read input:focus-visible {
  outline: 2px solid #a85a34;
  outline-offset: 2px;
}
.ax-read-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(440px, 36vw);
  min-width: 0;
  text-align: center;
  pointer-events: none;
}
.ax-read-title strong {
  max-width: 100%;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ax-read-title span,
.ax-read-who { color: #6b635b; font-family: "JetBrains Mono", monospace; font-size: 11px; }
.ax-read-who:empty { display: none; }
.ax-read-search {
  flex: none;
  display: flex;
  align-items: center;
  border: 1px solid #ddd6c4;
  border-radius: 8px;
  background: #fff;
  padding-right: 2px;
}
.ax-read-search input,
.ax-read-jump-label input {
  font: inherit;
  font-size: 14px;
  border: 1px solid #ddd6c4;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: #1c1917;
}
.ax-read-search input {
  width: 168px;
  border: 0;
  background: transparent;
  border-radius: 8px;
}
.ax-read-search-count {
  flex: none;
  min-width: 2.5rem;
  color: #6b635b;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-align: right;
}
.ax-read-search-count:empty { display: none; }
.ax-read-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1c1917;
  cursor: pointer;
}
.ax-read-search button:disabled { opacity: 0.35; cursor: default; }
.ax-read-search button:not(:disabled):hover { background: #f8ebe3; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.ax-read-who { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-read-toc-btn { display: none; }
.ax-read-main {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 0;
}
.ax-read-scrim { display: none; }
.ax-read-side {
  overflow: auto;
  background: #fff;
  border-right: 1px solid #e9e3d3;
  padding: 12px;
}
.ax-read-side-head {
  position: sticky;
  top: 0;
  display: flex;
  gap: 6px;
  margin: -12px -12px 10px;
  padding: 12px;
  background: #fff;
  z-index: 1;
}
.ax-read-side-head button { flex: 1 1 0; min-width: 0; padding-inline: 6px; font-size: 13px; }
.ax-read-side-head .is-on { background: #f8ebe3; border-color: #a85a34; color: #85462a; }
.ax-read-note { margin: 0 2px 8px; color: #6b635b; font-size: 12px; }
.ax-read-chapter,
.ax-read-side .hit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid #f1ede2;
  border-radius: 8px;
  padding: 9px 6px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.35;
  cursor: pointer;
}
.ax-read-chapter:hover,
.ax-read-side .hit:hover { background: #faf8f2; }
.ax-read-chapter.is-current { background: #f8ebe3; }
.ax-read-chapter-page,
.ax-read-side .hit small,
.ax-read-side .meta { color: #6b635b; font-family: "JetBrains Mono", monospace; font-size: 11px; }
.ax-read-chapter.is-locked .ax-read-chapter-page { color: #a85a34; }
.ax-read-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
.ax-read-side .meta { display: block; margin: 0; padding: 8px 4px; font-family: Poppins, sans-serif; font-size: 13px; }
.ax-read-stage {
  position: relative;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: #ece7dc;
}
.ax-read-scroll {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
}
.ax-read-status {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: #6b635b;
}
.ax-read-sheet {
  position: relative;
  aspect-ratio: 210 / 297;
  width: min(820px, 100%);
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  background: #fff;
  box-shadow: 0 12px 40px rgba(28, 25, 23, 0.12);
}
.ax-read-shimmer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(236, 231, 220, 0.78);
}
.ax-read-shimmer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%);
  background-size: 220% 100%;
  animation: ax-shimmer 1.05s linear infinite;
}
.ax-read-shimmer span {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border: 1px solid #e9e3d3;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.12);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: #1c1917;
}
@keyframes ax-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ax-read-shimmer::before { animation: none; }
}
.ax-read.is-locked .ax-read-sheet {
  filter: blur(7px);
  opacity: 0.4;
  pointer-events: none;
}
.ax-read-sheet img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}
.ax-read-words { position: absolute; inset: 0; }
.ax-read-words span {
  position: absolute;
  color: transparent;
  line-height: 1;
  white-space: pre;
  cursor: text;
}
.ax-read-words span::selection { background: rgba(201, 115, 74, 0.45); }
.ax-read-words span.is-hit { background: rgba(184, 122, 34, 0.28); }
.ax-read-words span.is-current { background: rgba(201, 115, 74, 0.55); }
.ax-read-side .hit.is-current { background: #f8ebe3; }
.ax-read-words span.mark-copper { background: rgba(201, 115, 74, 0.38); }
.ax-read-words span.mark-amber { background: rgba(184, 122, 34, 0.38); }
.ax-read-words span.mark-green { background: rgba(63, 143, 91, 0.32); }
.ax-read-mark {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: auto;
  top: auto;
  max-width: 70%;
  pointer-events: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(28, 25, 23, 0.4);
  text-align: right;
}
.ax-read-mark:empty { display: none; }
.ax-read-lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 25, 23, 0.32);
}
.ax-read-lock-card {
  width: min(340px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.22);
}
.ax-read-lock-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: #f8ebe3;
  color: #a85a34;
}
.ax-read-lock-kicker {
  margin: 0 0 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a85a34;
}
.ax-read-lock-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.ax-read-lock-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
}
.ax-read-lock-actions button { width: 100%; }
.ax-read-lock-card button[data-read="login"] {
  border-color: transparent;
  background: transparent;
  color: #6b635b;
}
.ax-read-toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 3;
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 32px));
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #1c1917;
  color: #fff;
  font-size: 14px;
  text-align: center;
}
.ax-read-pager,
.ax-read-actions { display: flex; align-items: center; gap: 8px; }
.ax-read-jump-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b635b;
  font-size: 14px;
}
.ax-read-jump-label input { width: 4.25rem; text-align: center; }
.hidden { display: none !important; }

@media (max-width: 800px) {
  .ax-read-bar { flex-wrap: wrap; gap: 8px; }
  .ax-read-end { display: contents; }
  .ax-read-brand .ax-lockup-rule,
  .ax-read-brand .ax-lockup-text { display: none; }
  .ax-read-title {
    position: static;
    transform: none;
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    padding-top: 2px;
  }
  .ax-read-toc-btn { display: inline-flex; flex: none; order: 2; margin-left: auto; }
  .ax-read-search { order: 4; flex: 1 0 100%; margin: 0; }
  .ax-read-search input { width: auto; flex: 1; min-width: 0; }
  .ax-read-who { display: none; }
  .ax-read-main { grid-template-columns: 1fr; }
  .ax-read-side {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 88vw);
    max-height: none;
    border-right: 1px solid #e9e3d3;
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .ax-read.is-toc .ax-read-side { transform: none; }
  .ax-read.is-toc .ax-read-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    background: rgba(28, 25, 23, 0.35);
  }
  .ax-read-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .ax-read-pager,
  .ax-read-actions { display: grid; min-width: 0; }
  .ax-read-pager { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ax-read-actions { grid-template-columns: 1fr 1fr; }
  .ax-read-jump-label { justify-content: center; min-width: 0; }
  .ax-read-actions button { width: 100%; }
}
