:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 8px;
  color: #000;
  background: #fff;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "PingFang SC", monospace;
}

main {
  width: 540px;
  margin: 0;
}

a {
  color: #00e;
  text-decoration: none;
}

a:hover {
  color: deepskyblue;
}

a:focus-visible {
  outline: 1px dotted currentColor;
  outline-offset: 2px;
}

.masthead {
  margin: 0 0 24px;
}

.notice {
  margin: 0 0 18px;
}

.metadata {
  margin: 0 0 18px;
  color: #666;
  overflow-wrap: anywhere;
}

.item-translation {
  color: #666;
}

a:hover .item-translation,
a:focus-visible .item-translation {
  color: inherit;
}

.story,
.collection {
  scroll-margin-top: 12px;
}

h1 {
  margin: 0 0 18px;
  font: inherit;
  font-weight: 700;
}

.story__body > *,
.collection__intro > * {
  margin: 0 0 18px;
}

.story__body > p,
.collection__intro > p {
  white-space: pre-wrap;
}

.story__body,
.collection__intro {
  overflow-wrap: anywhere;
}

.story__body > :last-child,
.collection__intro > :last-child {
  margin-bottom: 0;
}

.separator {
  border: 0;
  padding-top: 1px;
  background: #d0d0d5;
  margin: 22px 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
}

figure {
  margin: 18px 0;
}

figcaption {
  margin-top: 6px;
}

.content-gallery {
  display: block;
}

pre {
  margin: 18px 0;
  overflow-x: auto;
  overflow-wrap: normal;
  white-space: pre;
  font: inherit;
}

code {
  font: inherit;
}

table {
  border-collapse: collapse;
  margin: 18px 0;
}

th,
td {
  border: 1px solid #000;
  padding: 2px 6px;
  text-align: left;
  vertical-align: top;
}

blockquote {
  margin: 18px 40px;
}

hr {
  border: 0;
  border-top: 1px solid #000;
  margin: 22px 0;
}

h2,
h3,
h4,
h5,
h6 {
  margin: 22px 0 12px;
  font: inherit;
  font-weight: 700;
}

ul,
ol {
  margin: 0 0 18px;
  padding-left: 2em;
}

.library-list,
.chapter-list {
  overflow-wrap: anywhere;
}

.item-meta {
  color: #666;
}

.page-nav {
  margin: 24px 0 0;
}

@media (max-width: 650px) {
  body {
    font-size: 14px;
  }

  main {
    width: auto;
    max-width: 540px;
  }

  blockquote {
    margin-inline: 20px;
  }
}
