:root {
  color-scheme: light;
  --ink: #171513;
  --muted: #6f6860;
  --soft: #958b7f;
  --border: rgba(23, 21, 19, 0.12);
  --border-strong: rgba(23, 21, 19, 0.2);
  --surface: #fffaf2;
  --surface-2: #f6efe2;
  --tile: #ffffff;
  --accent: #d97918;
  --accent-2: #1b9a8a;
  --accent-3: #31415f;
  --danger: #d64c3b;
  --shadow: 0 22px 60px rgba(39, 31, 18, 0.12);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1160px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 8px;
  box-shadow: 4px 4px 0 rgba(23, 21, 19, 0.18);
}

.logo-text {
  font-size: 18px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  background: rgba(217, 121, 24, 0.1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--tile);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.main-content {
  overflow: hidden;
}

.hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 76% 18%, rgba(27, 154, 138, 0.16), transparent 28%),
    radial-gradient(circle at 18% 88%, rgba(217, 121, 24, 0.12), transparent 32%),
    linear-gradient(180deg, #fffaf2 0%, #f6efe2 100%);
}

.hero-inner {
  width: min(1160px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  padding: 76px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: center;
  gap: 68px;
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.hero-badge {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(217, 121, 24, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #8b4a12;
  font-family: var(--font-mono);
  font-size: 12px;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.hero-desc {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-weight: 700;
}

.btn.primary {
  background: var(--ink);
  color: #fffaf2;
  box-shadow: 4px 4px 0 rgba(23, 21, 19, 0.16);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.58);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
}

.stat {
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.62);
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.pet-stage {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 78%, rgba(217, 121, 24, 0.18), transparent 34%),
    #fffdf8;
  background-size: 32px 32px, 32px 32px, auto, auto;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.status-card {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-family: var(--font-mono);
  font-size: 12px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(27, 154, 138, 0.15);
}

.speech-bubble {
  position: absolute;
  right: 24px;
  top: 74px;
  max-width: 230px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: #ffffff;
  box-shadow: 5px 5px 0 rgba(23, 21, 19, 0.14);
  font-family: var(--font-mono);
  font-size: 13px;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -10px;
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #fff;
  transform: rotate(45deg);
}

.orbit-grid {
  position: absolute;
  inset: 90px 42px 96px;
  border: 1px dashed rgba(23, 21, 19, 0.13);
}

.orbit-grid span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--ink);
  animation: blink-block 2.8s infinite;
}

.orbit-grid span:nth-child(1) { left: 12%; top: 18%; }
.orbit-grid span:nth-child(2) { right: 16%; top: 34%; animation-delay: 0.4s; background: var(--accent-2); }
.orbit-grid span:nth-child(3) { left: 22%; bottom: 22%; animation-delay: 0.9s; background: var(--accent-3); }
.orbit-grid span:nth-child(4) { right: 26%; bottom: 14%; animation-delay: 1.3s; }

.pixel-pet {
  position: absolute;
  left: 50%;
  bottom: 110px;
  width: 168px;
  height: 188px;
  transform: translateX(-50%);
  image-rendering: pixelated;
  animation: pet-breathe 1.8s ease-in-out infinite;
}

.pixel-pet span {
  position: absolute;
  display: block;
}

.antenna {
  left: 78px;
  top: 0;
  width: 12px;
  height: 34px;
  background: var(--ink);
}

.antenna::before {
  content: "";
  position: absolute;
  left: -8px;
  top: -12px;
  width: 28px;
  height: 18px;
  background: #70d6c8;
  border: 4px solid var(--ink);
  animation: signal-glow 1.4s infinite;
}

.ear {
  top: 46px;
  width: 34px;
  height: 44px;
  background: #f2cf6a;
  border: 5px solid var(--ink);
}

.ear.left { left: 4px; transform: rotate(-8deg); }
.ear.right { right: 4px; transform: rotate(8deg); }

.head {
  left: 28px;
  top: 28px;
  width: 112px;
  height: 94px;
  border: 6px solid var(--ink);
  border-radius: 8px;
  background: #f8e8b2;
  box-shadow: inset -12px -10px 0 rgba(217, 121, 24, 0.12);
}

.eye {
  top: 34px;
  width: 18px;
  height: 22px;
  background: #121919;
  box-shadow: 0 0 0 5px rgba(27, 154, 138, 0.18);
  animation: eye-blink 4.6s infinite;
}

.eye.left { left: 28px; }
.eye.right { right: 28px; }

.visor {
  left: 22px;
  bottom: 18px;
  width: 68px;
  height: 9px;
  background: #1b9a8a;
  box-shadow: 0 0 18px rgba(27, 154, 138, 0.48);
}

.body {
  left: 42px;
  top: 112px;
  width: 84px;
  height: 58px;
  border: 6px solid var(--ink);
  border-radius: 8px;
  background: #31415f;
}

.core {
  left: 30px;
  top: 16px;
  width: 24px;
  height: 24px;
  background: #70d6c8;
  border: 4px solid var(--ink);
}

.badge-dot {
  right: 10px;
  top: 10px;
  width: 10px;
  height: 10px;
  background: #f2cf6a;
}

.arm {
  top: 126px;
  width: 30px;
  height: 16px;
  background: #f2cf6a;
  border: 5px solid var(--ink);
}

.arm.left { left: 14px; transform-origin: right center; animation: left-arm 1.6s infinite; }
.arm.right { right: 14px; transform-origin: left center; animation: right-arm 1.6s infinite; }

.leg {
  bottom: 0;
  width: 28px;
  height: 34px;
  background: #f2cf6a;
  border: 5px solid var(--ink);
}

.leg.left { left: 52px; animation: left-leg 1.2s infinite; }
.leg.right { right: 52px; animation: right-leg 1.2s infinite; }

.tail {
  right: 10px;
  top: 138px;
  width: 40px;
  height: 18px;
  background: #70d6c8;
  border: 5px solid var(--ink);
  transform-origin: left center;
  animation: tail-sway 1.5s infinite;
}

.pet-shadow {
  position: absolute;
  left: 50%;
  bottom: 78px;
  width: 190px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(23, 21, 19, 0.16);
  filter: blur(2px);
  animation: shadow-breathe 1.8s ease-in-out infinite;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.latest-posts,
.pet-library,
.motion-band,
.category-nav {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-head h2,
.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.section-head a {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card,
.cat-card,
.motion-tile {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--tile);
  box-shadow: 0 16px 40px rgba(39, 31, 18, 0.06);
}

.post-card {
  min-height: 300px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post-cat {
  color: #9b5616;
}

.post-card-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.post-card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.featured-pet-card {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--tile);
  box-shadow: var(--shadow);
  padding: 28px;
}

.featured-pet-visual,
.pet-card-image,
.pet-detail-art,
.asset-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    #fffdf8;
  background-size: 24px 24px;
  overflow: hidden;
}

.asset-card {
  margin: 0;
}

.pet-card-image {
  aspect-ratio: 1 / 1;
  max-height: 340px;
}

.featured-pet-visual img,
.pet-card-image img,
.pet-detail-art img,
.asset-card img {
  display: block;
  width: 100%;
  height: auto;
}

.pet-card-image img {
  height: 100%;
  object-fit: contain;
  padding: 22px;
  box-sizing: border-box;
}

.featured-pet-copy {
  display: grid;
  gap: 16px;
}

.featured-pet-copy h2,
.pet-card-body h2,
.install-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.06;
}

.featured-pet-copy p,
.pet-card-body p,
.install-panel p {
  margin: 0;
  color: var(--muted);
}

.install-row {
  max-width: 100%;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #171513;
  color: #fffaf2;
}

.install-row code {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.subpage-hero {
  padding: 72px 0 44px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fffaf2 0%, #f6efe2 100%);
}

.subpage-hero .container {
  display: grid;
  gap: 18px;
}

.subpage-hero .hero-desc {
  width: 100%;
  max-width: min(680px, 100%);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  gap: 18px;
  justify-content: start;
}

.pet-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--tile);
  box-shadow: 0 16px 40px rgba(39, 31, 18, 0.06);
  overflow: hidden;
}

.pet-card-body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.pet-card-body h2 {
  font-size: 24px;
}

.pet-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pet-card-actions .btn {
  min-height: 40px;
}

.pet-detail-hero {
  padding: 64px 0;
  background:
    radial-gradient(circle at 70% 18%, rgba(27, 154, 138, 0.12), transparent 28%),
    linear-gradient(180deg, #fffaf2 0%, #f6efe2 100%);
  border-bottom: 1px solid var(--border);
}

.pet-detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 500px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.pet-detail-art {
  position: relative;
  isolation: isolate;
}

.pet-detail-art::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 11%;
  height: 24px;
  border-radius: 50%;
  background: rgba(23, 21, 19, 0.12);
  filter: blur(4px);
  z-index: 0;
  animation: detail-shadow-pulse 2.6s ease-in-out infinite;
}

.pet-detail-art img {
  position: relative;
  z-index: 1;
  transform-origin: 50% 82%;
  animation: detail-pet-idle 2.6s ease-in-out infinite;
  will-change: transform;
}

.pet-detail-copy {
  display: grid;
  gap: 20px;
}

.pet-detail-copy h1 {
  font-size: clamp(42px, 6vw, 72px);
}

.install-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.pet-assets-section {
  padding: 72px 0;
}

.asset-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 18px;
}

.asset-card {
  padding: 16px;
  color: var(--ink);
}

.asset-card strong {
  display: block;
  margin-top: 12px;
  font-size: 18px;
}

.tag-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(27, 154, 138, 0.24);
  border-radius: 999px;
  background: rgba(27, 154, 138, 0.08);
  color: #17796e;
  font-family: var(--font-mono);
  font-size: 12px;
}

.motion-band {
  background: #171513;
  color: #fffaf2;
}

.motion-band .section-head {
  border-color: rgba(255, 250, 242, 0.18);
}

.motion-band .section-head a {
  color: rgba(255, 250, 242, 0.68);
}

.motion-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.motion-tile {
  min-height: 190px;
  padding: 18px;
  background: #211e1a;
  border-color: rgba(255, 250, 242, 0.13);
}

.motion-tile.active {
  background: #2d281f;
  border-color: rgba(242, 207, 106, 0.46);
}

.motion-tile strong {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
}

.motion-tile p {
  margin: 6px 0 0;
  color: rgba(255, 250, 242, 0.62);
  font-size: 13px;
}

.mini-pet {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
}

.mini-pet::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 10px;
  width: 34px;
  height: 28px;
  background: #f2cf6a;
  border: 4px solid #fffaf2;
  box-shadow: 0 34px 0 -10px #31415f;
}

.mini-pet::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 21px;
  width: 5px;
  height: 7px;
  background: #171513;
  box-shadow: 12px 0 0 #171513;
}

.mini-pet.walk { animation: mini-walk 1s infinite; }
.mini-pet.think::after { box-shadow: 12px 0 0 #171513, 30px -14px 0 #70d6c8; }
.mini-pet.jump { animation: mini-jump 0.9s infinite; }
.mini-pet.fail::before { background: #d64c3b; }
.mini-pet.review::after { height: 4px; }

.category-nav {
  background: var(--surface-2);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.cat-card {
  padding: 22px;
}

.cat-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.cat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  padding: 56px 0 28px;
  background: #171513;
  color: #fffaf2;
}

.footer-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 28px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-desc,
.footer-col a {
  color: rgba(255, 250, 242, 0.66);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 250, 242, 0.14);
  color: rgba(255, 250, 242, 0.52);
  font-size: 13px;
}

@keyframes pet-breathe {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes shadow-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(0.88); opacity: 0.72; }
}

@keyframes eye-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
}

@keyframes signal-glow {
  0%, 100% { background: #70d6c8; }
  50% { background: #f2cf6a; }
}

@keyframes tail-sway {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(-12deg); }
}

@keyframes left-arm {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

@keyframes right-arm {
  0%, 100% { transform: rotate(12deg); }
  50% { transform: rotate(-8deg); }
}

@keyframes left-leg {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@keyframes right-leg {
  0%, 100% { transform: translateY(5px); }
  50% { transform: translateY(0); }
}

@keyframes blink-block {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes mini-walk {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes mini-jump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes detail-pet-idle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.018); }
}

@keyframes detail-shadow-pulse {
  0%, 100% { opacity: 0.82; transform: scaleX(1); }
  50% { opacity: 0.52; transform: scaleX(0.84); }
}

@media (prefers-reduced-motion: reduce) {
  .pet-detail-art img,
  .pet-detail-art::after {
    animation: none;
  }
}

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 38px;
  }

  .pet-stage {
    min-height: 460px;
  }

  .post-grid,
  .library-grid,
  .cat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-pet-card,
  .pet-detail-layout,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .motion-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    border-radius: 8px;
  }

  .hero-inner {
    padding: 46px 0 42px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.04;
  }

  .hero-desc {
    font-size: 16px;
  }

  .subpage-hero .hero-desc {
    max-width: calc(100vw - 32px);
    line-height: 1.7;
    word-break: break-all;
  }

  .hero-stats,
  .post-grid,
  .library-grid,
  .cat-grid,
  .motion-grid,
  .footer-cols {
    grid-template-columns: 1fr;
  }

  .pet-stage {
    min-height: 420px;
  }

  .pixel-pet {
    transform: translateX(-50%) scale(0.82);
    transform-origin: bottom center;
  }

  @keyframes pet-breathe {
    0%, 100% { transform: translateX(-50%) scale(0.82) translateY(0); }
    50% { transform: translateX(-50%) scale(0.82) translateY(-8px); }
  }

  .speech-bubble {
    right: 14px;
    max-width: 190px;
  }
}
