:root {
  color-scheme: dark;
  --ink: #241c16;
  --paper: #f3ead6;
  --cinnabar: #9d291f;
  --cinnabar-ink: #f6efe4;
  --table: #12100e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Cormorant Garamond", "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  color: var(--paper);
  background-color: var(--table);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(92, 68, 44, 0.45), transparent 52%),
    radial-gradient(ellipse 42% 36% at 8% 88%, rgba(36, 26, 18, 0.85), transparent 60%),
    radial-gradient(ellipse 34% 42% at 96% 62%, rgba(92, 28, 22, 0.16), transparent 58%),
    linear-gradient(#1a1613, #0c0b0a);
}

body::before {
  content: "";
  position: fixed;
  width: min(78vmax, 820px);
  height: min(78vmax, 820px);
  border-radius: 50%;
  border: 1px solid rgba(243, 234, 214, 0.07);
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

::selection {
  background: #e4c4bc;
  color: var(--ink);
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.scroll {
  width: min(420px, 100%);
  animation: unroll 680ms cubic-bezier(0.16, 0.84, 0.32, 1) both;
}

.roller {
  position: relative;
  z-index: 2;
  height: 16px;
  margin: 0 -4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #947053 0%, #3c281b 46%, #6d4a33 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 190, 0.38),
    0 1px 0 #120e0b;
}

.roller::before,
.roller::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 15px;
  height: 24px;
  border-radius: 3px;
  background: linear-gradient(90deg, #24160f, #6a4630 46%, #1a110c);
}

.roller::before {
  left: -1px;
}

.roller::after {
  right: -1px;
}

.roller-top {
  margin-bottom: -8px;
}

.roller-bottom {
  margin-top: -8px;
}

.paper {
  position: relative;
  padding: 32px 22px 26px;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 18% 0%, rgba(255, 252, 245, 0.7), transparent 46%),
    radial-gradient(ellipse at 100% 100%, rgba(92, 58, 28, 0.09), transparent 42%),
    linear-gradient(180deg, #f7f1e4 0%, #efe3cc 100%);
  box-shadow:
    inset 0 0 0 1px rgba(70, 48, 28, 0.06),
    0 22px 44px rgba(0, 0, 0, 0.38);
}

.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.seal {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid var(--cinnabar);
  border-radius: 50%;
  color: var(--cinnabar);
  font-family: "Yu Mincho", "Yu Gothic", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif;
  font-size: 26px;
  line-height: 1;
  transform: rotate(8deg);
  opacity: 0.92;
  pointer-events: none;
}

.seal span {
  transform: rotate(-8deg);
}

h1 {
  margin: 6px 36px 0 8px;
  font-size: clamp(44px, 12vw, 64px);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-align: left;
}

body[data-page="gate"] h1 {
  margin: 64px 8px 0;
  line-height: 1;
  text-align: center;
}

.lead {
  margin: 14px 0 0;
  max-width: 18em;
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.28;
}

.frames {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.media-slot {
  aspect-ratio: 1;
  min-height: 120px;
  background:
    linear-gradient(#f7f1e3, #efe4d0);
  box-shadow:
    inset 0 0 0 1px rgba(36, 28, 22, 0.72),
    inset 0 0 0 8px #f3ead6,
    inset 0 0 0 9px rgba(36, 28, 22, 0.38);
}

.hint {
  display: none;
  margin: 18px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--cinnabar);
  font-size: 16px;
  font-style: italic;
  line-height: 1.3;
}

body.is-inapp .hint {
  display: block;
}

.cta {
  display: block;
  margin-top: 18px;
  padding: 13px 16px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--cinnabar-ink);
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.16), transparent 46%),
    linear-gradient(180deg, #b1332a 0%, #8d241c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 220, 0.28),
    0 8px 18px rgba(80, 16, 12, 0.18);
  transform: rotate(-0.3deg);
}

.cta-label {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.cta:active {
  transform: rotate(-0.3deg) translateY(1px);
}

.cta-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 18px;
  font-style: italic;
  line-height: 1.25;
}

.socials {
  list-style: none;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(36, 28, 22, 0.18);
}

.socials a {
  display: block;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
}

.socials .name {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.socials .desc {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  font-style: italic;
  line-height: 1.25;
  opacity: 0.82;
}

.studio {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.62;
}

.langs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.langs a {
  display: block;
  padding: 10px 4px;
  color: var(--ink);
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.langs a + a {
  border-top: 1px solid rgba(36, 28, 22, 0.16);
}

a:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 3px;
}

@media (max-width: 359px) {
  .frames {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll {
    animation: none;
  }
}

@keyframes unroll {
  from {
    clip-path: inset(0 0 100% 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}
