@font-face {
  font-family: "ABC Areal";
  src: url("/fonts/ABCArealVariable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: oblique 0deg 12deg;
  font-display: swap;
  unicode-range: U+0000-300B, U+300E-10FFFF;
}

@font-face {
  font-family: "ABC Areal Mono";
  src: url("/fonts/ABCArealMonoVariable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: oblique 0deg 12deg;
  font-display: swap;
}

html {
  overflow-x: auto;
}

html,
body {
  background: #dceff1;
  color: #000;
  margin: 0;
  padding: 0;
}

body {
  font: 400 120%/1.7 "ABC Areal", sans-serif, system-ui;
  font-synthesis: none;
  letter-spacing: 0.01rem;
  text-align: justify;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1em;
  top: 1em;
  background: #fff;
  z-index: 20;
}

.site-header h1 {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  margin: 0;
  padding: 1.5em 0 0 1em;
  font-size: 1em;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.2;
  pointer-events: none;
}

.site-header h1 a {
  pointer-events: auto;
  color: #000;
  text-decoration: none;
  border-bottom: 0;
}

.site-logo {
  position: fixed;
  top: 1em;
  right: 1em;
  z-index: 6;
  line-height: 0;
  border-bottom: 0 !important;
}

.site-logo svg {
  width: 256px;
  height: 256px;
  display: block;
  fill: #fff;
}

.search {
  margin: 0.6em 0 0;
}

.search input {
  width: 8em;
  border: 1px solid #000;
  padding: 0.25em;
  background: transparent;
  color: #000;
  font: inherit;
}

.search input::placeholder {
  color: #000;
}

.search-results {
  list-style: none;
  margin: 0.25em 0 0;
  padding: 0.25em 0;
  background: #fff;
  border: 1px solid #000;
  width: 16em;
  max-height: 16em;
  overflow: auto;
}

.search-results a,
.search-results .empty {
  display: block;
  padding: 0.2em 0.6em;
  color: #000;
  text-decoration: none;
  text-align: left;
}

.search-results a:hover {
  border-bottom: 0;
  background: #dceff1;
}

.hamburger {
  display: none;
}

.wrapper {
  margin-top: 15vh;
  min-height: 80vh;
  padding: 0 1em 3em;
}

.sidebar {
  position: fixed;
  top: 15vh;
  left: 1em;
  width: 16em;
  max-height: calc(100vh - 15vh - 1.5em);
  margin: 0;
  overflow-y: auto;
}

.acmenu {
  padding-bottom: 0;
}

.acmenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.acmenu li {
  margin: 0;
}

.acmenu li.open {
  margin-bottom: 1em;
}

.acmenu a {
  color: #000;
  text-decoration: none;
  border-bottom: 0;
}

.acmenu a:hover,
.acmenu a:focus-visible,
.acmenu a.curid,
.acmenu a.current {
  text-decoration: none;
  border-bottom: 1px solid #000;
  width: fit-content;
}

.acmenu li.level3 {
  list-style: decimal;
  margin-left: 2.6em;
}

.acmenu li.level3::marker,
.nav-num {
  font-family: "ABC Areal Mono", ui-monospace, monospace;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
}

main {
  margin-left: 17.5em;
  display: flow-root;
}

.container {
  max-width: 30em;
}

.gallery-page .container {
  max-width: none;
}

html[lang="en"] body {
  text-align: left;
  letter-spacing: 0;
}

html[lang="en"] .container {
  max-width: 36em;
}

.container h1,
.container h2,
.container h3,
.container h4 {
  font-weight: normal;
  color: #000;
  line-height: 1.2;
  letter-spacing: 0;
  clear: both;
}

.container h1,
.container h2 {
  font-size: 2em;
  margin: 0 0 0.4em;
}

.container h3 {
  font-size: 1.5em;
  margin: 3em 0 1em;
  padding-bottom: 1em;
  border-bottom: 1px solid #000;
}

.container h4 {
  font-size: 1.5em;
  margin: 0 0 1em;
}

p,
ul,
ol,
table,
hr,
blockquote,
figure {
  margin: 0 0 1.4em;
}

ul,
ol {
  padding: 0 0 0 1.5em;
}

li {
  margin: 0 0 0 1.5em;
}

a {
  color: #000;
  text-decoration: none;
}

main a:not(.lightbox) {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

main .toc a {
  text-decoration: none;
}

a:hover,
a:focus {
  border-bottom: 0;
}

hr {
  border: 0;
  border-top: 1px solid #000;
  height: 0;
  clear: both;
}

.level5 {
  background: #fff;
  padding: 1em;
  box-sizing: border-box;
  margin-bottom: 2em;
}

.level5 > :last-child {
  margin-bottom: 0;
}

img {
  border: 0;
  vertical-align: middle;
  height: auto;
  max-width: 100%;
}

img[src$=".svg"] {
  width: 1em;
  height: 1em;
  display: inline-block;
  margin: 0 0 0.3em;
}

.table {
  width: 45em;
  max-width: 100%;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  border: 1px solid #000;
  min-width: 50%;
}

th,
td {
  padding: 0.3em 0.5em;
  vertical-align: top;
  border: 1px solid #000;
  text-align: left;
  font-weight: normal;
}

th {
  background: #fff;
}

tbody tr:hover td {
  background: #fff;
}

table .col0 {
  width: 4em;
}

figure.thumb {
  display: block;
  margin: 0 0 1em;
  max-width: 100%;
}

figure.thumb img {
  display: block;
  height: auto;
}

figure.thumb figcaption,
.gallery .gtitle {
  display: block;
  max-width: 20em;
  margin-top: 0.5em;
  font-size: 0.75em;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5em 1.4em;
}

.gallery .item {
  margin: 0.5em;
}

.gallery img.tn {
  display: block;
  box-sizing: border-box;
  border: 1px solid #ccc;
  background: #fff;
}

.gallery img.crop {
  width: 300px;
  height: 300px;
  object-fit: cover;
}

.gallery img.fit {
  width: auto;
  height: auto;
  max-width: 300px;
  max-height: 300px;
}

.toc {
  position: fixed;
  right: 1rem;
  top: calc(256px + 1.5em);
  width: 16em;
  max-height: calc(100vh - 256px - 3em);
  overflow: auto;
  background: #fff;
  z-index: 4;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 1em;
}

.toc li {
  margin: 0;
}

.toc a {
  border-bottom: 0;
}

.site-footer {
  clear: both;
  padding: 1em 1em 2em 18.5em;
  font-size: 0.9375em;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #ececec;
}

.lightbox-overlay[hidden] {
  display: none;
}

.lightbox-overlay figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-overlay figcaption {
  width: min(40em, 90vw);
  margin-top: 0.6em;
  text-align: left;
  font-size: 1rem;
}

.lb-close {
  position: absolute;
  top: 0.6em;
  right: 0.8em;
  z-index: 52;
  border: 0;
  background: transparent;
  color: #000;
  font: 2rem/1 sans-serif;
  cursor: pointer;
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 51;
  border: 0;
  background: transparent;
  padding: 0;
}

.lb-prev {
  left: 0;
  cursor: url("/ui/left.png") 36 21, w-resize;
}

.lb-next {
  right: 0;
  cursor: url("/ui/right.png") 36 21, e-resize;
}

.donate-wrapper {
  text-align: left;
}

p.start-donate {
  margin-bottom: 0;
}

#error-message:not(:empty) {
  margin: 0.6em 0 0;
}

.donate-amount {
  display: inline-block;
  padding: 0.1rem 0;
}

.donate-amount.open {
  border: 1px solid #000;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  margin: 0 0.5rem;
}

.donate-amount span {
  color: #000;
  border-bottom: 1px solid;
  cursor: pointer;
}

.donate-amount.open span,
.donate-amount.open a {
  border-bottom: 0;
  text-decoration: none;
}

.methods {
  display: none;
}

.donate-amount.open .methods {
  display: inline-block;
}

.methods a {
  margin-left: 1rem;
}

.alipay-button,
.stripe-button {
  cursor: pointer;
}

.alipay-img {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  text-align: center;
  cursor: pointer;
  z-index: 40;
}

.methods.open-alipay .alipay-button {
  color: #333;
}

.methods.open-alipay .alipay-img {
  display: block;
}

.alipay-img img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  margin: 5vh auto;
}

body.lightbox-open {
  overflow: hidden;
}

img.mobile-stamp {
  display: none;
}

.home-logos {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-top: 3rem;
}

.home-logos a {
  display: block;
  line-height: 0;
}

.home-logos .logo-thetype {
  height: 28px;
  width: auto;
  display: block;
}

.home-logos .logo-3type {
  height: 72px;
  width: auto;
  display: block;
}

@media (max-width: 78em) {
  .sidebar {
    width: 13em;
  }

  main {
    margin-left: 14.5em;
  }

  .site-footer {
    padding-left: 15.5em;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 42em) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    text-align: left;
  }

  body.open-navi,
  body.lightbox-open {
    overflow: hidden;
  }

  .site-header h1 {
    z-index: 43;
    padding: calc(0.7em + env(safe-area-inset-top, 0px)) 3.2em 0 1em;
  }

  .hamburger {
    display: block;
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    right: calc(1em - 12px);
    font-size: inherit;
    z-index: 44;
    width: 44px;
    height: 44px;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    margin: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .hamburger span {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    background: #000;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.15s ease;
  }

  .hamburger span:nth-child(1) {
    top: 14px;
  }

  .hamburger span:nth-child(2) {
    top: 21px;
  }

  .hamburger span:nth-child(3) {
    top: 28px;
  }

  body.open-navi .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.open-navi .hamburger span:nth-child(2) {
    opacity: 0;
  }

  body.open-navi .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-logo {
    display: none;
  }

  img.mobile-stamp,
  img.mobile-stamp[src$=".svg"] {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 65vmin;
    height: 65vmin;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
  }

  main,
  .site-footer {
    position: relative;
    z-index: 1;
  }

  .site-header {
    position: relative;
    z-index: 40;
  }

  .search {
    display: none;
  }

  body.open-navi .search {
    display: block;
    margin: 0.6em 0 0;
  }

  body.open-navi .search input {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    font-size: 16px;
    padding: 0.45em 0.5em;
  }

  body.open-navi .search-results {
    width: 100%;
    box-sizing: border-box;
    max-height: 45vh;
  }

  .toc {
    display: none;
  }

  .wrapper {
    margin-top: calc(5em + env(safe-area-inset-top, 0px));
    min-height: 0;
    padding: 0 1em 2em;
  }

  .sidebar {
    display: none;
    position: static;
    top: auto;
    left: auto;
    width: auto;
    max-height: none;
    margin: 0;
    overflow: visible;
  }

  body.open-navi .sidebar {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: #dceff1;
    padding: calc(5em + env(safe-area-inset-top, 0px)) 1em calc(1.5em + env(safe-area-inset-bottom, 0px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .acmenu {
    max-height: none;
    padding-bottom: 0;
  }

  .acmenu a {
    display: block;
    padding: 0;
    min-height: 0;
    line-height: 1.6;
  }

  .acmenu li.level3 {
    margin-left: 2.6em;
  }

  main {
    margin-left: 0;
    padding: 0;
  }

  .site-footer {
    margin-left: 0;
    padding: 0.6em 1em calc(1.6em + env(safe-area-inset-bottom, 0px));
  }

  .container {
    max-width: none;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .container h1,
  .container h2 {
    font-size: 1.4em;
    letter-spacing: 0;
    margin: 0 0 0.4em;
  }

  .container h3,
  .container h4 {
    font-size: 1.15em;
    margin: 1.6em 0 0.7em;
    padding-bottom: 0.4em;
  }

  ul,
  ol {
    padding-left: 1.2em;
  }

  li {
    margin-left: 0;
  }

  .table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    width: 100%;
    min-width: 0;
    font-size: 0.9em;
  }

  table .col0 {
    width: auto;
    white-space: nowrap;
  }

  th,
  td {
    padding: 0.35em 0.4em;
  }

  .gallery {
    margin: 0 -0.25em 1.2em;
  }

  .gallery .item {
    width: calc(50% - 0.5em);
    margin: 0.25em;
    box-sizing: border-box;
  }

  .gallery img.crop,
  .gallery img.fit {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: none;
    max-height: none;
    object-fit: cover;
  }

  .gallery img.fit {
    object-fit: contain;
    background: #fff;
  }

  .gallery .gtitle,
  figure.thumb figcaption {
    max-width: 100%;
  }

  .donate-amount.open {
    display: block;
    margin: 0 0 0.5em;
  }

  .donate-amount.open .methods {
    display: block;
    margin: 0.35em 0 0.15em;
  }

  .donate-amount.open .methods a {
    display: inline-block;
    margin: 0.25em 0.9em 0.25em 0;
  }

  .home-logos {
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 2rem;
    padding-top: 1.4rem;
  }

  .home-logos img {
    height: 28px;
  }

  .lightbox-overlay img {
    max-width: calc(100vw - 1.2em);
    max-height: calc(78vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .lightbox-overlay figcaption {
    width: calc(100vw - 1.6em);
    font-size: 0.9rem;
    padding: 0 0.2em;
  }

  .lb-close {
    top: env(safe-area-inset-top, 0px);
    right: 0;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
  }

  .alipay-img {
    z-index: 55;
  }

  body.lightbox-open .hamburger,
  body.lightbox-open .search {
    visibility: hidden;
  }
}

@media print {
  .site-header,
  .sidebar,
  .toc,
  .search,
  .hamburger,
  .site-footer,
  .lightbox-overlay {
    display: none;
  }

  .wrapper,
  main {
    margin: 0;
  }
}
