:root {
  --bg: #FFF9F3;
  --card: #FFFFFF;
  --ink: #2B2118;
  --muted: #7A6E64;
  --line: #EFE3D8;
  --accent: #FF8C3C;
  --accent-deep: #E8701F;
  --soft: #FFEBDC;
  --green: #2E8B57;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-deep); text-decoration: none; }
img { max-width: 100%; display: block; }
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
header.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 17px; text-align: center;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(255,140,60,.32); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.btn small { font-weight: 400; font-size: 13px; opacity: .85; }

.hero { text-align: center; padding: 70px 0 40px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.2; margin: 0 0 18px; letter-spacing: 1px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hint { margin-top: 14px; font-size: 14px; color: var(--muted); }
.toys { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--soft); color: var(--accent-deep); border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.chip:hover { background: #FFDCC2; }

section { padding: 56px 0; }
section h2 { text-align: center; font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 10px; }
section .sub { text-align: center; color: var(--muted); margin: 0 0 36px; }

.gallery { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: 0 12px 40px rgba(120,80,40,.06); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { font-size: 30px; }
.feature h3 { margin: 8px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 22px 22px 22px 70px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 22px; top: 22px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
.step b { display: block; margin-bottom: 4px; }
.step span { color: var(--muted); font-size: 15px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 760px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; }
.plan.pro { border: 2px solid var(--accent); box-shadow: 0 14px 40px rgba(255,140,60,.15); }
.plan h3 { margin: 0; font-size: 20px; }
.plan .price { font-size: 40px; font-weight: 800; margin: 8px 0 2px; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan ul { padding: 0; list-style: none; margin: 16px 0 24px; flex: 1; }
.plan li { padding: 5px 0 5px 26px; position: relative; color: var(--ink); }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; color: var(--muted); }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 2px; color: var(--muted); }

footer { padding: 36px 0 48px; text-align: center; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); }

/* 购买 / 找回页 */
.panel { max-width: 460px; margin: 30px auto 60px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px; text-align: center; box-shadow: 0 14px 40px rgba(120,80,40,.07); }
.panel h1 { font-size: 24px; margin: 6px 0 4px; }
.panel .price { font-size: 46px; font-weight: 800; margin: 6px 0; }
.panel .price small { font-size: 18px; font-weight: 500; color: var(--muted); }
.panel ul { text-align: left; margin: 14px auto 22px; padding-left: 20px; max-width: 320px; color: var(--muted); }
.panel .btn { width: 100%; }
.qr { width: 220px; height: 220px; margin: 8px auto 10px; border-radius: 12px; border: 1px solid var(--line); padding: 8px; background: #fff; }
.code-box { margin: 14px 0; padding: 16px; border-radius: 12px; background: var(--soft); font: 700 22px/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 1px; color: var(--ink); user-select: all; word-break: break-all; }
.ok-title { color: var(--green); }
.muted { color: var(--muted); font-size: 14px; }
.howto { text-align: left; background: var(--bg); border-radius: 12px; padding: 12px 16px 12px 34px; font-size: 15px; margin: 16px 0 0; }
.hidden { display: none !important; }
.err { color: #C0392B; font-size: 14px; min-height: 20px; margin-top: 10px; }
.code-list { text-align: left; }
.code-list .row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.code-list code { font-weight: 700; font-size: 17px; }

.wx-mask { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 100; color: #fff; text-align: right; padding: 18px 24px; font-size: 18px; }
.wx-mask p { margin: 10px 0; }

/* 首屏：猫看屏幕的视频铺满背景，底部渐隐到页面底色 */
.hero-shell { position: relative; overflow: hidden; color: #fff; min-height: min(100vh, 860px); display: flex; }
.hero-shell > .wrap { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%); mask-image: linear-gradient(to bottom, #000 70%, transparent 100%); }
.hero-shade { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(30,20,10,.55) 0%, rgba(30,20,10,.25) 55%, rgba(30,20,10,0) 80%),
    linear-gradient(to bottom, rgba(30,20,10,.45) 0%, rgba(30,20,10,.15) 45%, rgba(255,249,243,0) 70%, var(--bg) 100%); }
.hero-shell .brand, .hero-shell .nav-links a { color: #fff; }
.hero-shell .nav-links a { opacity: .85; }
.hero-shell .nav-links a:hover { opacity: 1; color: #fff; }
.hero-shell .hero { flex: 1; display: flex; flex-direction: column; justify-content: center; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero-shell .hero h1 em { color: #FFB27A; }
.hero-shell .hero p.lead { color: rgba(255,255,255,.9); }
.hero-shell .hint { color: rgba(255,255,255,.8); }
.hero-shell .chip { background: rgba(255,255,255,.18); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-shadow: none; }
.hero-shell .chip:hover { background: rgba(255,255,255,.3); }
.hero-shell .chip-play { background: var(--accent); }
.hero-shell .btn-primary { text-shadow: none; }
.hero-credit { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 22px; text-shadow: none; }

/* 灵感来源：照片边缘羽化，和底色融在一起 */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; max-width: 900px; margin: 0 auto; }
.story-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 30%; display: block;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 52%, transparent 71%); mask-image: radial-gradient(circle at 50% 45%, #000 52%, transparent 71%); }
.story-text h2 { text-align: left; }
.story-text p { color: var(--muted); font-size: 17px; }
@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; gap: 0; text-align: center; }
  .story-photo { max-width: 300px; margin: 0 auto; }
  .story-text h2 { text-align: center; }
}

/* 让猫玩 20 秒：只剩小动物 */
.chip-play { background: var(--accent); color: #fff; }
.chip-play:hover { background: var(--accent-deep); }
body.play { overflow: hidden; cursor: none; background: #FBF4EA; }
body.play .wrap, body.play .hero-shell, body.play .modal, body.play .wx-mask { visibility: hidden; }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(43,33,24,.45); display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); border-radius: 24px; padding: 28px 24px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.modal-card h3 { margin: 4px 0 8px; font-size: 22px; }
.modal-card p { color: var(--muted); margin: 0 0 20px; }
.modal-card .btn { width: 100%; margin-top: 10px; }

/* 后台 */
.input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; margin: 14px 0 12px; }
.input:focus { outline: none; border-color: var(--accent); }
.admin-h { text-align: left; font-size: 18px; margin: 28px 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.tile span { color: var(--muted); font-size: 14px; }
.tile b { font-size: 28px; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-table th, .stat-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; }
.stat-table th { color: var(--muted); font-weight: 600; background: var(--bg); }
.stat-table tr.zero td { color: #BFB3A8; }
.stat-table tr:last-child td { border-bottom: 0; }
.bar-cell { position: relative; min-width: 110px; }
.bar-cell i { position: absolute; right: 12px; top: 50%; height: 18px; transform: translateY(-50%); background: var(--soft); border-radius: 4px; max-width: calc(100% - 24px); }
.bar-cell span { position: relative; }
.admin #note { margin: 18px 0 40px; }

@media (max-width: 640px) {
  .nav-links a.opt { display: none; }
  .hero { padding-top: 40px; }
  section { padding: 40px 0; }
  .btn { width: 100%; }
}
