@import url("https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i");

html,
body {
  margin: 0;
  min-height: 100vh;
}

html {
  height: 100%;
  background: #fff;
  scroll-behavior: smooth;
}

body {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #000;
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
}

.column,
.column h1,
.column p,
.column nav,
.column a {
  background: transparent;
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.column {
  position: relative;
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 0;
  text-align: center;
}

.column.text {
  width: min(34em, calc(100vw - 3em));
}

.mark {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 0 1em;
  background: transparent;
  border: 0;
  box-shadow: none;
}

h1,
p {
  margin: 0 0 1em;
  font-size: 16px;
  font-weight: 400;
}

nav {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin: 0;
}

a,
a:hover,
a:visited,
a:focus {
  color: #000;
  text-decoration: none;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  color: #000;
  background: transparent;
  border: 0;
  box-shadow: none;
  line-height: 0;
  text-decoration: none;
}

.socials svg {
  display: block;
  width: 16px;
  height: 16px;
  overflow: visible;
}

body.sheet,
body.sheet.framed {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  height: auto;
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2em 1.5em 4em;
}

.bar {
  position: sticky;
  top: 0;
  flex: 0 0 256px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  width: 256px;
  padding: 40px;
}

.bar nav {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
}

.bar .mark {
  width: 42px;
  height: 42px;
  margin: 0;
}

.bar .socials {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
}

.menu-toggle {
  display: none;
}

.menu {
  display: contents;
}

.bar .socials a {
  width: 24px;
  height: 24px;
  background: #000;
  color: #fff;
  border-radius: 50%;
}

.bar .socials svg {
  width: 12px;
  height: 12px;
}

.sheet h1,
.sheet h2,
.sheet h3,
.sheet p,
.sheet li {
  font-size: 16px;
  font-weight: 400;
}

.prose,
.works {
  flex: 1;
  width: min(1110px, calc(100% - 3em));
  max-width: 1110px;
  margin: 50px auto 4em;
  padding: 0;
}

.prose {
  max-width: 40em;
}

.works .prose {
  width: 100%;
  margin: 0;
}

.post-index {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin: 0;
}

.post-index .year {
  margin-top: 1.6em;
}

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

.post-index li {
  margin: 0 0 0 -0.35em;
  padding: 0 0.35em;
}

.post-index li::before {
  content: "・";
}

@media (hover: hover) and (pointer: fine) {
  .post-index li:hover {
    background: #f2f2f2;
  }
}

.sheet .prose h1 {
  margin: 0 0 0.45em;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.sheet .prose .date {
  margin: 0 0 0.55em;
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.sheet .prose .langs {
  margin: 0 0 2.4em;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.prose section + section {
  margin-top: 3.5em;
}

.prose section:empty,
.prose section:empty + section {
  margin-top: 0;
}

.prose section:empty {
  display: none;
}

.prose hr {
  width: 8em;
  margin: 2em 0;
  border: 0;
  border-top: 1px solid #000;
}

#jp,
#en {
  scroll-margin-top: 1.5em;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1em;
}

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

.notes li {
  margin: 0 0 0.6em;
}

.year {
  margin: 88px 0 0;
}

.year:first-child {
  margin-top: 0;
}

.year h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.year h3 {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.year article + article {
  margin-top: 30px;
  padding-top: 30px;
}

.year article + article .frames::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -30px;
  border-top: 1px solid #000;
}

.frames {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: max-content;
  max-width: min(910px, 100%);
  margin-top: 0;
}

.frame {
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor: pointer;
}

.frame img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  object-position: center;
}

#viewer {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
}

#viewer img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
}

#viewer::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

@media (max-width: 900px) {
  body.sheet,
  body.sheet.framed {
    flex-direction: column;
  }

  .bar {
    position: sticky;
    top: 0;
    z-index: 3;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: auto;
    flex: none;
    padding: 16px 24px 40px;
    background: #fff;
  }

  .menu-toggle {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
  }

  .menu {
    display: block;
    flex: 1 0 100%;
    overflow: hidden;
    max-height: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, visibility 0s linear 0.35s;
  }

  .bar.is-open .menu {
    max-height: 12em;
    visibility: visible;
    transition: max-height 0.35s ease, visibility 0s linear 0s;
  }

  .menu nav:first-child {
    padding-top: 1.25em;
  }

  .bar .socials {
    margin-top: 1em;
    padding-bottom: 0.35em;
  }

  .works,
  .prose {
    width: auto;
    margin: 0 24px 3em;
  }

  .works > .year .frames {
    width: 100%;
    max-width: 100%;
  }

  .works > .year .frame {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .works > .year .frame img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu {
    transition: none;
  }
}
