body {
  margin: 0;
  background: white;
}

main {
  width: min(100%, 96vw);
}

.aa {
  font-family: "MS PGothic", "ＭＳ Ｐゴシック", "Mona", "IPA モナー Pゴシック", monospace;
  font-size: 12px;
  line-height: 1;
  white-space: pre;
}

.intro-box {
  position: relative;
  width: 100%;
  min-height: 61vh;
}

.intro-text {
  position: relative;
  z-index: 1;
}

.intro-text h1 {
  margin: 0;
}

.motion-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: min(32vw, 47vh);
  max-height: 61vh;
  transform: translateY(-50%);
  object-fit: contain;
  pointer-events: none;
}

.legal-line {
  max-width: 620px;
}

#sorry {
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  color: #151515;
  font: bold 2em Arial, sans-serif;
  line-height: 0.95;
  overflow: hidden;
  white-space: pre;
}

.portfolio-page {
  color: #151515;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

.portfolio-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.portfolio-reveal {
  position: relative;
}

.portfolio-real-content {
  position: relative;
  z-index: 1;
}

.portfolio-veil {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: calc(100vh + 4em);
  z-index: 20;
  width: 100vw;
  max-width: 100vw;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: white;
  color: #151515;
  font: bold 2em Arial, sans-serif;
  line-height: 0.95;
  white-space: pre;
  clip-path: inset(0 0 0 0);
  opacity: 1;
  pointer-events: none;
  transform: translateY(var(--sorry-offset, 0px));
  transition: clip-path 3000ms ease;
}

.portfolio-veil.is-fading {
  clip-path: inset(0 0 100% 0);
}

.portfolio-veil.is-gone {
  visibility: hidden;
}

.permission-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.permission-button {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid #151515;
  background: white;
  color: #151515;
  font: 14px Arial, sans-serif;
  cursor: pointer;
}

.permission-button:hover {
  background: #151515;
  color: white;
}

.permission-output {
  margin: 0 0 48px;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.permission-output div {
  margin: 0 0 14px;
}

.permission-output strong {
  display: block;
  margin-bottom: 4px;
}

.permission-output pre {
  margin: 0;
  padding: 10px;
  border: 1px solid #151515;
  overflow: auto;
  white-space: pre-wrap;
}

.aa-art-block {
  width: max-content;
  max-width: 100%;
  margin: 48px 0 0 auto;
}

.aa-art {
  width: max-content;
  max-width: 100%;
  margin: 0;
  overflow: auto;
  font-size: 16px;
  transform: scaleX(0.84);
  transform-origin: right top;
}

.aa-art-note {
  margin: 8px 0 0;
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

.portfolio-header {
  max-width: 760px;
  margin-bottom: 48px;
}

.portfolio-kicker {
  margin: 0 0 8px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portfolio-header h1 {
  margin: 0 0 16px;
  font-size: 42px;
  font-weight: normal;
}

.work-entry {
  display: grid;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid #d8d8d8;
}

.work-media {
  margin: 0;
  overflow: hidden;
}

.work-gallery {
  display: grid;
  gap: 18px;
}

.work-media img {
  display: block;
  width: 100%;
  min-height: 220px;
  background: #f2f2f2;
  object-fit: contain;
}

.blurred-work {
  filter: blur(12px);
  transition: filter 220ms ease;
}

.blurred-work:hover,
.blurred-work:focus {
  filter: blur(0);
  outline: none;
}

.work-media figcaption {
  margin-top: 8px;
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.work-notes {
  max-width: 680px;
}

.work-notes h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: normal;
}

.work-notes p {
  margin: 0 0 18px;
}

.spoiler {
  display: block;
  padding: 0 2px;
  background: white;
  color: inherit;
  opacity: 0;
  cursor: pointer;
  user-select: none;
  transition: opacity 520ms ease;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.spoiler.is-revealed {
  background: transparent;
  color: inherit;
  opacity: 1;
  cursor: text;
  user-select: text;
}

.sorry-tail {
  padding: 48px 0 0;
  border-top: 1px solid #d8d8d8;
  font-family: Arial, sans-serif;
  overflow-wrap: anywhere;
}

.sorry-tail p {
  margin: 0 0 8px;
}

@media (max-width: 720px) {
  .work-entry {
    grid-template-columns: 1fr;
  }

  .portfolio-header h1 {
    font-size: 34px;
  }

  .aa-art {
    margin-left: 0;
  }

  .aa-art-block {
    margin-left: 0;
  }
}
