/* Reader/styles/content.css */
:root {
  --reader-background: #fffdf9;
  --reader-text: #26221e;
  --reader-font-size: 18px;
  --reader-width: 42em;
}
:root[data-dark-mode] {
  color-scheme: dark;
  --reader-background: #181a1d;
  --reader-text: #ddd8ce;
}
html,
body {
  color: var(--reader-text) !important;
  background: var(--reader-background) !important;
}
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
html {
  margin: 0;
  padding: 0;
}
body {
  width: auto !important;
  max-width: var(--reader-width) !important;
  margin: 0 auto !important;
  padding: 3.5rem 1.25rem 5rem !important;
  font-family:
    Georgia,
    "Times New Roman",
    serif !important;
  font-size: var(--reader-font-size) !important;
  line-height: 1.7 !important;
  overflow-wrap: break-word;
}
body :where(p, li, blockquote, dd, dt) {
  color: inherit !important;
  font-family: inherit !important;
  font-size: 1em !important;
  line-height: inherit !important;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25 !important;
}
a,
a:link,
a:visited {
  color: #075f9b !important;
}
a:hover,
a:focus,
a:active {
  color: #8b3d1f !important;
}
img,
svg {
  max-width: 100%;
  height: auto;
}
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
}
@media (max-width: 700px) {
  body {
    padding: 3rem 1rem 5rem !important;
  }
}

/* Reader/styles/ui.css */
:root {
  --reader-ui-accent: #b25c2f;
  --reader-ui-border: #ded8cc;
  --reader-ui-panel: rgba(255, 253, 248, 0.98);
  --reader-ui-panel-text: #312d28;
  --reader-ui-divider: #ebe6dc;
  --reader-ui-header: white;
  --reader-ui-link: rgb(0, 119, 204);
  --layer-focused-color: #fed7aa;
  --layer-mine-color: yellow;
  --layer-following-color: skyblue;
  --layer-text-color: #17191b;
}
:root[data-dark-mode] {
  --reader-ui-border: #484d53;
  --reader-ui-panel: rgba(37, 40, 44, 0.98);
  --reader-ui-panel-text: #e2ddd3;
  --reader-ui-divider: #454a50;
  --reader-ui-header: #181a1d;
  --reader-ui-link: #8bc3eb;
}
.pagenum,
#header,
#layer-panel,
.reader-action {
  user-select: none;
  -webkit-user-select: none;
}
#header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background: var(--reader-ui-header);
  font: 14px "Courier New", monospace;
}
#header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 30px;
}
#header a {
  color: var(--reader-ui-link);
  text-decoration: underline;
}
#canonical-text-warning {
  position: fixed;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  color: white;
  background: #7f1d1d;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
}
.reader-actions {
  position: fixed;
  bottom: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 26px;
}
.reader-actions--left {
  left: 18px;
}
.panel-controls {
  right: 18px;
  align-items: flex-end;
  flex-direction: column-reverse;
  pointer-events: none;
}
.panel-host {
  width: 250px;
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  pointer-events: auto;
}
.panel-controls > .reader-action {
  pointer-events: auto;
}
.panel-host:empty {
  display: none;
}
.reader-action {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background-color: var(--reader-ui-accent);
  cursor: pointer;
  transition: opacity 0.18s ease;
}
.reader-action:disabled {
  opacity: 0.5;
}
::highlight(focused-layer) {
  background-color: var(--layer-focused-color);
  color: var(--layer-text-color);
  text-decoration: underline 3px #9a3412;
  text-decoration-skip-ink: none;
}
::highlight(mine-layer) {
  background-color: var(--layer-mine-color);
  color: var(--layer-text-color);
  text-decoration: none;
}
::highlight(following-layer) {
  background-color: var(--layer-following-color);
  color: var(--layer-text-color);
  text-decoration: none;
}
.panel {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--reader-ui-border);
  border-radius: 10px;
  color: var(--reader-ui-panel-text);
  background: var(--reader-ui-panel);
  box-shadow: 0 18px 45px rgba(50, 39, 22, 0.16);
  font-family: system-ui, sans-serif;
}
.panel-header {
  padding: 13px 15px 11px;
  border-bottom: 1px solid var(--reader-ui-border);
  font-size: 16px;
  font-weight: 650;
}
.panel-row {
  display: grid;
  grid-template-columns: 13px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 45px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--reader-ui-divider);
  font-size: 14px;
  cursor: pointer;
}
.panel-row--setting {
  grid-template-columns: 1fr auto;
}
@media (max-width: 700px) {
  .text-width-setting {
    display: none;
  }
}
.layer-swatch {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(60, 50, 35, 0.12);
}
.layer-swatch.mine {
  background: var(--layer-mine-color);
}
.layer-swatch.following {
  background: var(--layer-following-color);
}
.panel-row input[type=checkbox] {
  position: relative;
  width: 38px;
  height: 22px;
  margin: 0;
  border-radius: 20px;
  appearance: none;
  background: #c9c5bd;
  cursor: pointer;
  transition: background 0.15s ease;
}
.panel-row input[type=checkbox]::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  content: "";
  transition: transform 0.15s ease;
}
.panel-row input[type=checkbox]:checked {
  background: #5d6c5b;
}
.panel-row input[type=checkbox]:checked::after {
  transform: translateX(16px);
}

/* Reader/styles/reader.css */
