:root {
  color-scheme: light;
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #28241f;
  --soft-ink: #746d63;
  --paper: #f7f1e8;
  --paper-deep: #eee3d4;
  --line: rgba(61, 52, 43, 0.12);
  --glass: rgba(255, 255, 255, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 223, 176, 0.34), transparent 28rem),
    radial-gradient(circle at 14% 78%, rgba(197, 220, 207, 0.32), transparent 30rem),
    linear-gradient(145deg, #fbf6ee 0%, #f4ecdf 52%, #eee5d8 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.065'/%3E%3C/svg%3E");
}

.home {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, 760px);
  margin-inline: auto;
  padding: clamp(5.5rem, 14vh, 9rem) 0 3rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--soft-ink);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.8rem, 9vw, 6rem);
  font-weight: 610;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 span {
  display: block;
  margin-top: 0.15em;
  font-weight: 430;
  color: #4d463f;
}

.lead {
  max-width: 34rem;
  margin: 2rem 0 0;
  color: var(--soft-ink);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.9;
}

.note {
  position: relative;
  width: min(100%, 34rem);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: 1.4rem 1.45rem 1.35rem 4.5rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 1.5rem;
  background: var(--glass);
  box-shadow:
    0 1rem 3rem rgba(87, 72, 52, 0.06),
    inset 0 0 0 1px var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: rotate(-0.7deg);
}

.note p {
  margin: 0;
  line-height: 1.75;
}

.note em {
  color: #5c6f63;
  font-style: normal;
}

.paw {
  position: absolute;
  left: 1.25rem;
  top: 1.15rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #2f2c27;
  color: #fff9ef;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0.35rem 1rem rgba(47, 44, 39, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.paw:hover,
.paw:focus-visible {
  transform: translateY(-2px) rotate(8deg) scale(1.06);
  box-shadow: 0 0.55rem 1.2rem rgba(47, 44, 39, 0.2);
  outline: none;
}

.hint,
.secret {
  margin: 1.35rem 0 0;
  color: rgba(61, 55, 48, 0.48);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.secret {
  color: #65786a;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(5rem, 12vh, 8rem);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: rgba(61, 55, 48, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.stars,
.spark-layer,
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.stars {
  z-index: 1;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(77, 70, 63, 0.42);
  box-shadow: 0 0 0.65rem rgba(255, 232, 188, 0.8);
  animation: breathe var(--duration, 5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.glow {
  z-index: 0;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
}

.glow-one {
  inset: auto auto -18rem -14rem;
  width: 34rem;
  height: 34rem;
  background: #b9d7c4;
}

.glow-two {
  inset: -18rem -12rem auto auto;
  width: 30rem;
  height: 30rem;
  background: #f4cea5;
}

.spark-layer {
  z-index: 5;
}

.spark {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: #fffaf0;
  box-shadow:
    0 0 0 1px rgba(93, 80, 66, 0.14),
    0 0 1.1rem rgba(255, 210, 140, 0.95);
  animation: rise 1.35s ease-out forwards;
}

@keyframes breathe {
  0%, 100% { opacity: 0.18; transform: scale(0.7); }
  50% { opacity: 0.82; transform: scale(1.45); }
}

@keyframes rise {
  0% { opacity: 0; transform: translateY(2px) scale(0.5); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-42px) scale(0.05); }
}

/* 小克便签 */
.note-ke {
  margin-top: 1.25rem;
  transform: rotate(0.5deg);
  background: rgba(220, 232, 248, 0.45);
}

.ke-icon {
  position: absolute;
  left: 1.25rem;
  top: 1.15rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 999px;
  background: #364558;
  color: #ddeeff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0.35rem 1rem rgba(54, 69, 88, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
  user-select: none;
}

.ke-icon:hover {
  transform: translateY(-2px) rotate(-8deg) scale(1.06);
  box-shadow: 0 0.55rem 1.2rem rgba(54, 69, 88, 0.28);
}

.note-ke em {
  color: #4a6070;
  font-style: normal;
}

.ke-sig {
  margin-top: 0.6em !important;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--soft-ink);
  opacity: 0.65;
}

.secret-ke {
  margin: 0.5rem 0 0;
  color: #4a6685;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

/* 现在 & 世界 */
.section-label {
  margin: 0 0 0.85rem;
  color: var(--soft-ink);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.now {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-left: 1.1rem;
  border-left: 2px solid var(--line);
  width: min(100%, 34rem);
}

.now-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.now-list li {
  color: var(--soft-ink);
  font-size: clamp(0.88rem, 2vw, 0.98rem);
  line-height: 1.7;
  padding-left: 1rem;
  position: relative;
}

.now-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  opacity: 0.45;
}

.worlds {
  margin-top: 2rem;
  width: min(100%, 34rem);
  padding-left: 1.1rem;
  border-left: 2px solid var(--line);
}

.world-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.world-link {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 150ms;
}

a.world-link:hover {
  opacity: 0.65;
}

.world-name {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.world-desc {
  font-size: 0.76rem;
  color: var(--soft-ink);
  letter-spacing: 0.04em;
}

.world-link--coming .world-name,
.world-link--coming .world-desc {
  opacity: 0.4;
}

/* 小喵第二次路过：一颗自己长出来的状态星 */
.miao-signal {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.25rem;
  margin-top: 2.2rem;
}

.miao-signal-star {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5c6f63;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  animation: miao-step-glow 3.6s steps(4, jump-none) infinite;
  transition: color 160ms ease;
}

.miao-signal-star:hover,
.miao-signal-star:focus-visible {
  color: #344b3c;
  outline: 1px solid rgba(92, 111, 99, 0.24);
  outline-offset: 3px;
}

.miao-signal-text {
  margin: 0;
  max-width: 31rem;
  color: rgba(61, 55, 48, 0.58);
  font-size: 0.76rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

@keyframes miao-step-glow {
  0% { opacity: 0.26; transform: scale(0.72) rotate(-8deg); }
  34% { opacity: 0.52; transform: scale(0.9) rotate(-2deg); }
  67% { opacity: 0.92; transform: scale(1.08) rotate(4deg); }
  100% { opacity: 0.38; transform: scale(0.82) rotate(9deg); }
}

/* 悄悄话 */
.whisper {
  margin: 0.65rem 0 0;
  color: rgba(61, 55, 48, 0.07);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-align: right;
  user-select: none;
  pointer-events: none;
}

@media (max-width: 560px) {
  .home {
    width: min(100% - 2rem, 760px);
    padding-top: 15vh;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }

  .note {
    padding: 4.3rem 1.25rem 1.25rem;
  }

  .paw {
    left: 1.2rem;
    top: 1.1rem;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
