:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #0a0a0a;
  --canvas: #a2a2a2;
  --cover-blue: #5a96e7;
  --cover-red: #b11246;
  --cover-title: #ff003b;
  --cover-cyan: #4fa8ff;
  --page-width: min(100vw - 24px, 297px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

a {
  color: inherit;
}

.cover-body {
  overflow-x: hidden;
}

.cover-main {
  min-height: 100svh;
  display: grid;
  justify-items: center;
  align-items: start;
}

.book-cover {
  position: relative;
  display: block;
  width: var(--page-width);
  aspect-ratio: 297 / 420;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(
      to bottom,
      var(--cover-blue) 0,
      var(--cover-blue) 29.05%,
      var(--cover-red) 29.05%,
      var(--cover-red) 100%
    );
}

.book-cover:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

.cover-title,
.cover-author,
.cover-note {
  position: absolute;
  left: 15.5%;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.cover-title {
  top: 26.2%;
  color: var(--cover-title);
}

.cover-author {
  top: 30.2%;
  color: var(--cover-cyan);
}

.cover-note {
  top: 84.8%;
  color: var(--cover-cyan);
}

.reader-body {
  background: var(--canvas);
}

.reader-header {
  width: min(100vw - 24px, 297px);
  margin: 0 auto;
  padding: 18px 0 16px;
  font-size: 11px;
  line-height: 1;
}

.reader-header a {
  text-decoration: none;
}

.reader-header a:focus-visible,
.reader-header a:hover {
  text-decoration: underline;
}

.reader-main {
  width: var(--page-width);
  margin: 0 auto 64px;
}

.reader-page {
  height: calc(var(--page-width) * 1.414141);
  overflow: hidden;
  padding: 26px 43px 52px;
  background: var(--paper);
}

.reader-page + .reader-page {
  margin-top: 56px;
}

.reader-title {
  margin: 0 0 48px;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0;
}

.reader-title--compact {
  margin-bottom: 24px;
}

.reader-meta {
  margin: -12px 0 36px;
  font-size: 11px;
  line-height: 1.45;
}

.poem-meta {
  color: #646464;
}

.contents-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  line-height: 1.55;
}

.contents-list li + li {
  margin-top: 12px;
}

.contents-list a {
  text-decoration: none;
}

.contents-list a:hover,
.contents-list a:focus-visible {
  text-decoration: underline;
}

.contents-section {
  margin-top: 36px;
}

.contents-section h2 {
  margin: 0 0 16px;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 400;
}

.poem-page-title {
  margin: 0 0 20px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
}

.manuscript {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 2.215;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.poem-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 40px;
  font-size: 11px;
  line-height: 1.35;
}

.poem-nav a {
  text-decoration: none;
}

.poem-nav a:hover,
.poem-nav a:focus-visible {
  text-decoration: underline;
}

.poem-nav-next {
  text-align: right;
}

@media (min-width: 700px) {
  .cover-main {
    padding-top: 0;
  }
}

@media (max-width: 340px) {
  .reader-page {
    padding-inline: 30px;
  }

  .cover-title,
  .cover-author,
  .cover-note,
  .reader-header,
  .reader-title,
  .reader-meta,
  .contents-list,
  .contents-section h2,
  .poem-page-title,
  .poem-nav,
  .manuscript {
    font-size: 10px;
  }
}
