:root {
  --ink: #060d0b;
  --paper: #ebe6d8;
  --paper-soft: rgba(235, 230, 216, 0.62);
  --paper-dim: rgba(235, 230, 216, 0.34);
  --line: rgba(235, 230, 216, 0.13);
  --jade: #a9c3b2;
  --serif: Georgia, "Times New Roman", "Noto Serif", "Songti SC", STSong, "SimSun", serif;
  --sans: "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--sans);
  background:
    radial-gradient(120% 90% at 50% -15%, #12251f 0%, #0a1512 42%, #050b09 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.fog {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.fog--a {
  width: 120vmax;
  height: 120vmax;
  left: -40vmax;
  top: -58vmax;
  background: radial-gradient(circle at 50% 50%, rgba(118, 160, 140, 0.13), rgba(118, 160, 140, 0.04) 42%, transparent 68%);
  animation: fogA 56s ease-in-out infinite alternate;
}

.fog--b {
  width: 96vmax;
  height: 96vmax;
  right: -34vmax;
  bottom: -44vmax;
  background: radial-gradient(circle at 50% 50%, rgba(150, 180, 160, 0.09), transparent 64%);
  animation: fogB 72s ease-in-out infinite alternate;
}

.fog--c {
  width: 64vmax;
  height: 64vmax;
  left: 34%;
  top: 12%;
  background: radial-gradient(circle at 50% 50%, rgba(205, 224, 210, 0.055), transparent 60%);
  animation: fogC 42s ease-in-out infinite alternate;
}

.glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
  transition: opacity 0.8s ease;
}

body.has-pointer .glow {
  opacity: 1;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(135% 110% at 50% 42%, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}

.wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 640px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding:
    max(28px, env(safe-area-inset-top))
    clamp(22px, 6vw, 40px)
    max(20px, env(safe-area-inset-bottom));
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(24px, 7vh, 64px) clamp(16px, 3vh, 32px);
}

.hero {
  text-align: center;
}

.mark {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(64px, min(22vw, 17vh), 132px);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-shadow: 0 0 70px rgba(180, 215, 195, 0.12);
  animation: markIn 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.mark .dot {
  color: var(--jade);
  letter-spacing: 0;
  text-shadow: 0 0 26px rgba(169, 195, 178, 0.5);
}

.tagline {
  margin: clamp(18px, 3.2vh, 26px) 0 0;
  font-family: var(--serif);
  font-size: clamp(12px, 3.2vw, 13.5px);
  font-weight: 300;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--paper-soft);
  animation: fadeUp 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s both;
}

.rule {
  width: 1px;
  height: clamp(26px, 6vh, 48px);
  margin: clamp(26px, 5.5vh, 50px) auto;
  background: linear-gradient(to bottom, transparent, rgba(235, 230, 216, 0.26), transparent);
  animation: fadeIn 1.4s ease 0.7s both;
}

.portals {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  animation: fadeIn 1.4s ease 0.7s both;
}

.portal {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(13px, 3.6vw, 19px);
  min-height: 64px;
  padding: 10px 6px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  -webkit-tap-highlight-color: transparent;
  animation: rowIn 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: 0.95s;
}

.portal:nth-child(2) {
  animation-delay: 1.04s;
}

.portal:nth-child(3) {
  animation-delay: 1.13s;
}

.portal:nth-child(4) {
  animation-delay: 1.22s;
}

.portal:nth-child(5) {
  animation-delay: 1.31s;
}

.portal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(169, 195, 178, 0.065), transparent 68%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.portal:hover::after,
.portal:focus-visible::after {
  opacity: 1;
}

.sigil {
  width: 1.6em;
  flex: none;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(20px, 5.6vw, 22px);
  color: var(--paper-soft);
  transition: color 0.45s ease, transform 0.45s ease;
}

.portal:hover .sigil,
.portal:focus-visible .sigil {
  color: var(--jade);
  transform: translateX(2px);
}

.body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 5px;
  min-width: 0;
  padding-block: 6px;
}

.label {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--paper);
}

.hint {
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--paper-dim);
}

.arrow {
  flex: none;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--paper-dim);
  opacity: 0.7;
  transform: translateX(-4px);
  transition: color 0.45s ease, opacity 0.45s ease, transform 0.45s ease;
}

.portal:hover .arrow,
.portal:focus-visible .arrow {
  color: var(--jade);
  opacity: 1;
  transform: translateX(0);
}

:focus-visible {
  outline: 1px solid rgba(169, 195, 178, 0.65);
  outline-offset: 3px;
  border-radius: 2px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: clamp(24px, 4.5vh, 40px);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: rgba(235, 230, 216, 0.27);
  animation: fadeIn 1.6s ease 1.6s both;
}

footer .sep {
  font-size: 8px;
  color: rgba(235, 230, 216, 0.18);
}

@keyframes markIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fogA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
}

@keyframes fogB {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-7vmax, -3vmax, 0) scale(1); }
}

@keyframes fogC {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-4vmax, 5vmax, 0); }
}

@media (min-width: 720px) {
  .portal {
    min-height: 72px;
    padding-inline: 10px;
  }
  .label {
    font-size: 14.5px;
  }
  .hint {
    font-size: 12px;
  }
}

@media (max-height: 720px) {
  .content {
    padding-block: 6px;
  }
  .tagline {
    margin-top: 14px;
  }
  .rule {
    height: 24px;
    margin-block: 18px;
  }
  .portal {
    min-height: 54px;
    padding: 6px;
  }
  .body {
    padding-block: 2px;
    gap: 3px;
  }
  footer {
    padding-top: 12px;
  }
}

@media (max-height: 520px) {
  .content {
    padding-block: 0;
  }
  .mark {
    font-size: clamp(38px, min(16vw, 14vh), 64px);
  }
  .tagline {
    margin-top: 8px;
    font-size: 11px;
    letter-spacing: 0.28em;
  }
  .rule {
    display: none;
  }
  .portals {
    margin-top: 12px;
  }
  .portal {
    min-height: 44px;
    padding: 4px 6px;
    gap: 10px;
  }
  .body {
    padding-block: 1px;
    gap: 1px;
  }
  .sigil {
    font-size: 18px;
  }
  .label {
    font-size: 13px;
  }
  .hint {
    font-size: 10px;
  }
  footer {
    padding-top: 8px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .fog {
    animation: none;
  }
}
