:root {
  --bg: #efeee9;
  --ink: #171717;
  --muted: #66635e;
  --line: rgba(23, 23, 23, 0.22);
  --max: 1460px;
  --gap: 26px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: -6vmax;
  pointer-events: none;
  background: url("../assets/curve.svg") center / cover no-repeat;
  opacity: 0.42;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 72px), var(--max));
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 42px 0 54px;
}
.brand {
  max-width: 520px;
}
.logo {
  margin: 0 0 5px;
  line-height: 0;
}
.brand-logo {
  width: clamp(160px, 16vw, 200px);
  height: auto;
  object-fit: contain;
  object-position: left center;
}
.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.main-nav {
  display: flex;
  gap: 40px;
  padding-top: 2px;
}
.main-nav a {
  position: relative;
  color: #312f2c;
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: currentColor;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 28px;
  color: #3f3d3a;
}
.filters a.active {
  text-decoration: underline;
  text-underline-offset: 6px;
}
.slash {
  color: #9a9791;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px var(--gap);
  align-items: start;
}
.work {
  min-width: 0;
  transform: rotate(var(--card-tilt, 0deg));
  transform-origin: 50% 48%;
}
@media (min-width: 901px) {
  .work.grid-span-2 {
    grid-column: span 2;
  }
}
.work:nth-child(2),
.work:nth-child(7),
.work:nth-child(12) {
  transform: translateY(12px) rotate(var(--card-tilt, 0deg));
}
.work:nth-child(5),
.work:nth-child(10),
.work:nth-child(15) {
  transform: translateY(-8px) rotate(var(--card-tilt, 0deg));
}
.thumb {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #deddd8;
}
.thumb,
.text-card,
.empty-card {
  position: relative;
  border: 0;
  border-radius: var(--frame-radius, 0);
  box-shadow: var(--frame-shadow, none);
  transition:
    border-radius 0.3s ease,
    box-shadow 0.3s ease;
}
.thumb::after,
.text-card::after,
.empty-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: var(--frame-inset-top, 2px);
  right: var(--frame-inset-right, 2px);
  bottom: var(--frame-inset-bottom, 2px);
  left: var(--frame-inset-left, 2px);
  pointer-events: none;
  border: var(--frame-border, 1px solid rgba(0, 0, 0, 0.045));
  border-radius: var(--frame-radius, 0);
  filter: var(--rough-filter, none);
  transform: rotate(var(--frame-tilt, 0deg));
  transform-origin: center;
}
.rough-a {
  --rough-filter: url("#rough-border-a");
}
.rough-b {
  --rough-filter: url("#rough-border-b");
}
.rough-c {
  --rough-filter: url("#rough-border-c");
}
.rough-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.frame-thick {
  --frame-border: 4px solid rgba(23, 23, 23, 0.46);
}
.frame-thin {
  --frame-border: 1px solid rgba(23, 23, 23, 0.24);
}
.frame-hairline {
  --frame-border: 1px solid rgba(23, 23, 23, 0.1);
}
.frame-none {
  --frame-border: 0 solid transparent;
}
.frame-oval {
  --frame-border: 2px solid rgba(23, 23, 23, 0.3);
  --frame-radius: 50%;
  overflow: hidden;
}
.frame-shadow {
  --frame-shadow: 9px 11px 0 rgba(23, 23, 23, 0.12);
}
.frame-no-shadow {
  --frame-shadow: none;
}
.thumb.landscape {
  aspect-ratio: 1.55 / 1;
}
.thumb.wide {
  aspect-ratio: 1.72 / 1;
}
.thumb.square {
  aspect-ratio: 1 / 1;
}
.thumb.portrait {
  aspect-ratio: 0.82 / 1;
}
.thumb.short {
  aspect-ratio: 2.1 / 1;
}
.thumb img {
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}
.work a:hover .thumb img {
  transform: scale(1.012);
  filter: contrast(1.02);
}
.work[data-category="image"] .thumb {
  cursor: zoom-in;
}
.lightbox {
  width: fit-content;
  max-width: 94vw;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #fff;
}
.lightbox[open] {
  animation: lightbox-fade-in 0.3s ease-out both;
}
.lightbox::backdrop {
  background: rgba(15, 15, 14, 0.82);
  backdrop-filter: blur(3px);
}
.lightbox[open]::backdrop {
  animation: lightbox-backdrop-in 0.3s ease-out both;
}
.lightbox-inner {
  position: relative;
  display: grid;
  width: fit-content;
  justify-items: center;
  gap: 12px;
}
.lightbox-image {
  width: auto;
  height: auto;
  max-width: min(90vw, 1440px);
  max-height: 82vh;
  object-fit: contain;
  box-shadow: 14px 18px 0 rgba(0, 0, 0, 0.2);
}
.lightbox[open] .lightbox-image {
  animation: lightbox-content-in 0.46s ease-out 0.12s both;
}
.lightbox-image.is-landscape {
  width: min(90vw, 1200px);
}
.lightbox-image.is-portrait {
  height: min(82vh, 900px);
}
.lightbox-caption {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.lightbox[open] .lightbox-caption {
  animation: lightbox-caption-in 0.38s ease-out 0.22s both;
}
.lightbox-close {
  position: absolute;
  z-index: 1;
  top: -42px;
  right: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox[open] .lightbox-close {
  animation: lightbox-caption-in 0.3s ease-out 0.18s both;
}
.lightbox.is-closing {
  animation: lightbox-fade-out 0.24s ease-in both;
}
.lightbox.is-closing::backdrop {
  animation: lightbox-backdrop-out 0.24s ease-in both;
}
.lightbox.is-closing .lightbox-image,
.lightbox.is-closing .lightbox-caption,
.lightbox.is-closing .lightbox-close {
  animation: lightbox-content-out 0.2s ease-in both;
}
.audio-player {
  display: grid;
  width: min(86vw, 560px);
  justify-items: center;
  gap: 16px;
  padding: 26px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 14px 18px 0 rgba(0, 0, 0, 0.24);
}
.audio-lightbox[open] .audio-player {
  animation: lightbox-content-in 0.46s ease-out 0.12s both;
}
.audio-lightbox.is-closing .audio-player {
  animation: lightbox-content-out 0.2s ease-in both;
}
.audio-cover {
  width: min(62vw, 320px);
  height: auto;
  max-height: 44vh;
  object-fit: contain;
}
.audio-title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
}
.audio-controls {
  width: 100%;
}
.audio-player .lightbox-close {
  color: var(--ink);
  border-color: rgba(23, 23, 23, 0.55);
}
.gallery-shell {
  position: relative;
  display: grid;
  width: min(92vw, 1080px);
  max-height: 88vh;
  gap: 14px;
  padding: 24px 28px 20px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 14px 18px 0 rgba(0, 0, 0, 0.24);
}
.gallery-lightbox[open] .gallery-shell {
  animation: lightbox-content-in 0.46s ease-out 0.12s both;
}
.gallery-lightbox.is-closing .gallery-shell {
  animation: lightbox-content-out 0.2s ease-in both;
}
.gallery-shell .lightbox-close {
  top: 12px;
  right: 14px;
  color: var(--ink);
  border-color: rgba(23, 23, 23, 0.55);
}
.gallery-title {
  margin: 0;
  padding-right: 48px;
  font-size: 16px;
  font-weight: 400;
}
.gallery-stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
}
.gallery-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(23, 23, 23, 0.48);
  border-radius: 50%;
  background: rgba(247, 246, 242, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
  transform: translateY(-50%);
}
.gallery-prev {
  left: 10px;
}
.gallery-next {
  right: 10px;
}
.gallery-info {
  display: flex;
  min-height: 20px;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  font-size: 12px;
}
.gallery-caption {
  margin: 0;
}
.gallery-count {
  flex: none;
  color: #68645f;
}
.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.gallery-thumb {
  flex: 0 0 auto;
  width: 78px;
  height: 58px;
  padding: 2px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  opacity: 0.56;
}
.gallery-thumb.is-active {
  border-color: var(--ink);
  opacity: 1;
}
.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.text-reader {
  position: relative;
  display: grid;
  width: min(86vw, 720px);
  max-height: min(78vh, 820px);
  padding: 38px 42px 42px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 14px 18px 0 rgba(0, 0, 0, 0.24);
}
.text-lightbox[open] .text-reader {
  animation: lightbox-content-in 0.46s ease-out 0.12s both;
}
.text-lightbox.is-closing .text-reader {
  animation: lightbox-content-out 0.2s ease-in both;
}
.text-reader .lightbox-close {
  top: 12px;
  right: 14px;
  color: var(--ink);
  border-color: rgba(23, 23, 23, 0.55);
}
.text-kind {
  margin: 0 0 8px;
  color: #68645f;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.text-title {
  margin: 0;
  padding: 0 42px 18px 0;
  border-bottom: 1px solid rgba(23, 23, 23, 0.22);
  font-size: clamp(19px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.45;
}
.text-body {
  min-height: 0;
  max-height: calc(min(78vh, 820px) - 170px);
  margin-top: 24px;
  padding-right: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 15px;
  line-height: 2;
}
.text-body p {
  margin: 0 0 1.6em;
}
.text-body p:last-child {
  margin-bottom: 0;
}
.text-lightbox[data-content-type="lyrics"] .text-body {
  white-space: pre-line;
  line-height: 2.15;
}
.lyrics-section + .lyrics-section {
  margin-top: 2.5em;
}
.lyrics-section h3 {
  margin: 0 0 0.75em;
  color: #68645f;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lyrics-section p {
  margin: 0;
}
@keyframes lightbox-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes lightbox-backdrop-in {
  from {
    background: rgba(15, 15, 14, 0);
    backdrop-filter: blur(0);
  }
  to {
    background: rgba(15, 15, 14, 0.82);
    backdrop-filter: blur(3px);
  }
}
@keyframes lightbox-content-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes lightbox-caption-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes lightbox-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes lightbox-backdrop-out {
  from {
    background: rgba(15, 15, 14, 0.82);
    backdrop-filter: blur(3px);
  }
  to {
    background: rgba(15, 15, 14, 0);
    backdrop-filter: blur(0);
  }
}
@keyframes lightbox-content-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox::backdrop,
  .lightbox-image,
  .lightbox-caption,
  .lightbox-close,
  .audio-player,
  .gallery-shell,
  .text-reader {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
.meta {
  padding-top: 9px;
}
.title {
  font-size: 14px;
  margin: 0 0 2px;
  font-weight: 400;
}
.type {
  margin: 0;
  color: #55524e;
  font-size: 12px;
}
.out {
  display: inline-block;
  margin-left: 6px;
  transform: translateY(-1px);
}

.text-card {
  aspect-ratio: 1.8/1;
  display: grid;
  place-items: center;
  padding: 26px;
  text-align: center;
  background: rgba(255, 255, 255, 0.24);
  font-family:
    system-ui,
    -apple-system,
    "Noto Sans JP",
    sans-serif;
  line-height: 1.9;
  letter-spacing: 0.03em;
}
.empty-card {
  aspect-ratio: 1.7/1;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 42px;
  font-weight: 200;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 34px;
  margin-top: 12px;
  font-size: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}
.top-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 1180px) {
  .works-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .page {
    width: min(calc(100% - 40px), var(--max));
  }
  header {
    padding-top: 28px;
  }
  .main-nav {
    gap: 20px;
  }
  .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  header {
    display: block;
    padding-bottom: 38px;
  }
  .main-nav {
    margin-top: 28px;
    flex-wrap: wrap;
  }
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }
  .work:nth-child(n) {
    transform: rotate(var(--card-tilt, 0deg));
  }
}
@media (max-width: 430px) {
  .page {
    width: calc(100% - 28px);
  }
  .brand-logo {
    width: 180px;
  }
  .footer-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
  .work.mobile-variable-card {
    width: var(--mobile-card-width, 100%);
    justify-self: var(--mobile-card-align, center);
  }
  .thumb.landscape,
  .thumb.wide,
  .thumb.short {
    aspect-ratio: 1.5/1;
  }
  .lightbox-image {
    max-width: calc(100vw - 28px);
    max-height: 76vh;
  }
  .audio-player {
    width: calc(100vw - 28px);
    padding: 20px 18px;
  }
  .audio-cover {
    width: min(72vw, 300px);
    max-height: 38vh;
  }
  .gallery-shell {
    width: calc(100vw - 28px);
    max-height: 86vh;
    padding: 20px 14px 16px;
  }
  .gallery-image {
    max-height: 52vh;
  }
  .gallery-nav {
    width: 36px;
    height: 36px;
  }
  .gallery-prev {
    left: 4px;
  }
  .gallery-next {
    right: 4px;
  }
  .text-reader {
    width: calc(100vw - 28px);
    max-height: 82vh;
    padding: 32px 22px 28px;
  }
  .text-body {
    padding-right: 6px;
    font-size: 14px;
  }
}
