:root {
  color-scheme: dark;
  --ink: #1a120b;
  --paper: #d9bb78;
  --paper-soft: #efd99e;
  --red: #8f2f1f;
  --green: #526a42;
  --text: #fff4d0;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(239, 217, 158, 0.2), transparent 34rem),
    linear-gradient(120deg, #130d08, #21150c 48%, #090705);
  color: var(--text);
  font-family:
    "Noto Serif SC",
    "Songti SC",
    "SimSun",
    serif;
}

button {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 187, 120, 0.2), transparent 20rem),
    rgba(12, 8, 5, 0.94);
  transition:
    opacity 600ms ease,
    visibility 600ms ease;
}

.gate.is-open {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.gate-cat {
  position: relative;
  width: clamp(8rem, 22vw, 14rem);
  aspect-ratio: 1;
  border: 1px solid rgba(239, 217, 158, 0.55);
  border-radius: 50%;
  background: rgba(239, 217, 158, 0.08);
  cursor: pointer;
  box-shadow:
    0 0 0 0 rgba(239, 217, 158, 0.28),
    inset 0 0 3rem rgba(217, 187, 120, 0.12);
  animation: pulse 1.8s ease-in-out infinite;
}

.cat-face {
  position: absolute;
  inset: 22%;
  border-radius: 48% 48% 44% 44%;
  background: var(--paper-soft);
  box-shadow: inset 0 -1.3rem 0 rgba(82, 106, 66, 0.16);
}

.ear {
  position: absolute;
  top: -15%;
  width: 34%;
  aspect-ratio: 1;
  background: var(--paper-soft);
  transform: rotate(45deg);
}

.ear-left {
  left: 4%;
}

.ear-right {
  right: 4%;
}

.eye,
.nose {
  position: absolute;
  background: var(--ink);
}

.eye {
  top: 42%;
  width: 10%;
  aspect-ratio: 1;
  border-radius: 50%;
}

.eye-left {
  left: 31%;
}

.eye-right {
  right: 31%;
}

.nose {
  left: 46%;
  top: 58%;
  width: 8%;
  aspect-ratio: 1;
  transform: rotate(45deg);
}

.gate-copy {
  margin: 0;
  color: rgba(255, 244, 208, 0.78);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0;
}

.hero {
  min-height: 100vh;
  padding: clamp(1rem, 2.2vw, 2rem);
  opacity: 0.52;
  filter: saturate(0.78);
  transition:
    opacity 700ms ease,
    filter 700ms ease;
}

.hero.is-awake {
  opacity: 1;
  filter: saturate(1);
}

.topbar,
.info {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper-soft);
  font-weight: 700;
}

.seal {
  display: grid;
  width: 2.35rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 0.35rem;
  background: var(--red);
  color: #f8e6bd;
}

.sound {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(239, 217, 158, 0.42);
  border-radius: 50%;
  background: rgba(26, 18, 11, 0.5);
  color: var(--paper-soft);
  cursor: pointer;
}

.scroll-wrap {
  position: relative;
  width: min(100%, 92rem);
  margin: clamp(1.25rem, 3.4vw, 3rem) auto 0;
  overflow: hidden;
  border: 1px solid rgba(239, 217, 158, 0.28);
  border-radius: 0.5rem;
  background: #2a1a0d;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.38);
}

.scroll-art {
  display: block;
  width: 100%;
  height: clamp(20rem, 56vh, 42rem);
  object-fit: cover;
  object-position: center;
}

.hot-cat {
  position: absolute;
  width: clamp(2.2rem, 5vw, 4rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 244, 208, 0.65);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 244, 208, 0.9) 0 12%, transparent 13%),
    rgba(143, 47, 31, 0.38);
  cursor: pointer;
  box-shadow: 0 0 1.3rem rgba(255, 244, 208, 0.45);
}

.hot-cat-a {
  left: 23%;
  top: 31%;
}

.hot-cat-b {
  left: 51%;
  top: 48%;
}

.hot-cat-c {
  right: 18%;
  top: 37%;
}

.info {
  width: min(100%, 92rem);
  margin: 1.25rem auto 0;
  align-items: end;
}

h1 {
  margin: 0;
  color: var(--paper-soft);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.info p {
  margin: 0.65rem 0 0;
  color: rgba(255, 244, 208, 0.72);
}

.contract {
  max-width: 100%;
  border: 1px solid rgba(239, 217, 158, 0.34);
  border-radius: 0.45rem;
  padding: 0.8rem 1rem;
  background: rgba(26, 18, 11, 0.58);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.contract span {
  display: block;
  color: rgba(255, 244, 208, 0.6);
  font-size: 0.78rem;
}

.contract strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(0.78rem, 1.5vw, 1rem);
  font-weight: 500;
}

.status {
  min-height: 1.4rem;
  font-size: 0.9rem;
}

@keyframes pulse {
  70% {
    box-shadow:
      0 0 0 1.4rem rgba(239, 217, 158, 0),
      inset 0 0 3rem rgba(217, 187, 120, 0.12);
  }
}

@media (max-width: 720px) {
  .info {
    display: block;
  }

  .contract {
    width: 100%;
    margin-top: 1rem;
  }

  .scroll-art {
    height: 54vh;
    min-height: 20rem;
  }
}
