/* 祈灵笑笑乐 · 首页样式（游戏本体在 /game/，样式互不相干） */
:root {
  --bg1: #ffecd2;
  --bg2: #fcb69f;
  --cream: #fff8f1;
  --panel: #ffffff;
  --ink: #4a2c2a;
  --muted: #8a6560;
  --line: #f3d9cc;
  --accent: #ff6b6b;
  --accent2: #ffa94d;
  --pink: #f06595;
  --ok: #37b24d;
  --shadow: 0 8px 24px rgba(160, 80, 60, .14);
  --wrap: 1080px;
  --gut: max(16px, calc((100% - var(--wrap)) / 2));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button { font: inherit; color: inherit; cursor: pointer; }
main { overflow-x: clip; }
section { scroll-margin-top: 64px; padding: 72px var(--gut); }

.kicker { margin: 0 0 6px; color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: 3px; }
section h2 { font-size: clamp(26px, 5.6vw, 38px); letter-spacing: 1px; }
.sub { margin: 10px 0 0; color: var(--muted); max-width: 640px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 800; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 0 #d9483f, 0 10px 24px rgba(255, 107, 107, .35);
  transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #d9483f, 0 4px 12px rgba(255, 107, 107, .3); }
.btn.small { padding: 6px 16px; font-size: 14px; box-shadow: 0 3px 0 #d9483f; }
.btn.small:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9483f; }
.btn.big { padding: 15px 40px; font-size: 20px; letter-spacing: 2px; }

/* ---------- 顶栏 ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gut);
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255, 244, 236, .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 18px; letter-spacing: 2px; text-decoration: none; white-space: nowrap; }
.top-nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.top-nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top-nav a:not(.btn):hover { color: var(--accent); }
@media (max-width: 560px) { .top-nav a:not(.btn) { display: none; } }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px;
  min-height: min(760px, calc(100svh - 56px));
  padding-top: 48px; padding-bottom: 64px;
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
  background: var(--cream);
  clip-path: ellipse(70% 100% at 50% 100%);
}
.float { position: absolute; inset: 0; pointer-events: none; }
.float span {
  position: absolute; opacity: .28;
  animation: bob ease-in-out infinite alternate;
}
@keyframes bob {
  from { transform: translateY(0) rotate(-8deg); }
  to { transform: translateY(-28px) rotate(8deg); }
}
.hero-text { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: 3px; color: #c0504a; }
.hero h1 { font-size: clamp(40px, 9vw, 68px); letter-spacing: 3px; font-weight: 900; }
.grad {
  background: linear-gradient(90deg, #ff6b6b, #ffa94d, #f06595);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 18px 0 30px; font-size: 17px; color: #6b4440; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.note { font-size: 14px; color: #8a5a54; }

.demo-wrap { position: relative; z-index: 1; justify-self: center; width: min(100%, 380px); }
.demo {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px;
  padding: 10px; border-radius: 22px;
  background: rgba(255, 255, 255, .55);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .7);
  transform: rotate(2deg);
}
.tile {
  aspect-ratio: 1; padding: 0; border: 0; border-radius: 22%;
  display: grid; place-items: center;
  font-size: clamp(22px, 6.4vw, 34px);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .85), transparent 45%), var(--c);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .08);
  transition: transform .12s;
}
body[data-theme="animal"] .tile, body[data-theme="fruit"] .tile { background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06); }
.tile span { line-height: 1; }
.tile:hover { transform: scale(1.08); }
.tile.pop { animation: pop .22s ease-in forwards; }
.tile.drop { animation: drop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { to { transform: scale(1.35); opacity: 0; } }
@keyframes drop { from { transform: translateY(-70%) scale(.6); opacity: 0; } }
.spark {
  position: fixed; z-index: 30; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%;
  pointer-events: none; animation: spark .5s ease-out forwards;
}
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.demo-cap { margin: 14px 0 0; text-align: center; font-size: 14px; color: #8a5a54; }
.demo-cap span { font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; text-align: center; min-height: 0; padding-top: 36px; }
  .cta { justify-content: center; }
  .lead br { display: none; }
  .demo { transform: none; }
}

/* ---------- 怎么玩 ---------- */
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: var(--panel); border-radius: 20px; padding: 24px 22px; box-shadow: var(--shadow); }
.num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 900; margin-bottom: 12px;
}
.steps h3 { font-size: 19px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 道具 ---------- */
.props { background: linear-gradient(180deg, var(--cream), #fff0e6); }
.prop-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.prop { display: flex; gap: 20px; align-items: center; background: var(--panel); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.mini { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; width: 130px; }
.m {
  position: relative; aspect-ratio: 1; border-radius: 6px; background: #f6e9e2;
  display: grid; place-items: center; font-size: 15px; font-style: normal; line-height: 1;
}
.m.on { background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(74, 44, 42, .18); }
.m.at { outline: 3px solid var(--ink); outline-offset: -1px; animation: glow 1.4s ease-in-out infinite; }
.m b {
  position: absolute; right: -6px; bottom: -6px; padding: 0 3px; border-radius: 5px;
  font-size: 9px; line-height: 14px; color: #fff; background: var(--ink);
}
@keyframes glow { 50% { transform: scale(1.12); } }
.prop.row .m.at { background: repeating-linear-gradient(0deg, var(--c) 0 3px, #fff 3px 5px); }
.prop.rainbow .m.at { background: conic-gradient(#ff6b6b, #ffd43b, #8ce99a, #74c0fc, #b197fc, #ff6b6b); }
.prop.bomb .m.at { background: radial-gradient(circle, #fff 0 20%, #ffa94d 45%, #ff6b6b); }
.prop-name { margin: 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.lv { margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--pink)); }
.prop h3 { font-size: 20px; margin: 2px 0 4px; }
.prop-txt p:last-child { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 820px) { .prop-grid { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .prop { gap: 14px; padding: 16px; } .mini { width: 104px; } .m { font-size: 12px; } }

/* ---------- 技能 ---------- */
.skills-sec { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: center; background: #fff0e6; }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.skill-list li {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  background: var(--panel); border-radius: 18px; padding: 16px 6px 14px; box-shadow: var(--shadow);
}
.sk-ico { position: relative; font-size: 32px; line-height: 1.2; }
.sk-ico em {
  position: absolute; right: -12px; top: -4px; min-width: 20px; height: 20px; border-radius: 10px;
  font-style: normal; font-size: 12px; font-weight: 800; line-height: 20px; color: #fff; background: var(--accent);
}
.skill-list b { font-size: 15px; }
.skill-list span:last-child { font-size: 12px; color: var(--muted); line-height: 1.4; }
@media (max-width: 820px) {
  .skills-sec { grid-template-columns: 1fr; }
  .skill-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 关卡 ---------- */
.road { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; counter-reset: x; }
.road li {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--panel); border-radius: 18px; padding: 16px 10px; box-shadow: var(--shadow);
}
.road li:not(:last-child)::after {
  content: ""; position: absolute; right: -10px; top: 50%; width: 8px; height: 8px;
  border-top: 3px solid var(--accent2); border-right: 3px solid var(--accent2); transform: translateY(-50%) rotate(45deg);
}
.lvl { font-size: 12px; font-weight: 800; color: var(--accent); }
.ob { font-size: 30px; line-height: 1.5; letter-spacing: -6px; }
.road b { font-size: 16px; }
.road .d { font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 900px) {
  .road { grid-template-columns: 1fr; gap: 10px; }
  .road li { flex-direction: row; text-align: left; gap: 12px; padding: 12px 16px; }
  .road li:not(:last-child)::after { display: none; }
  .lvl { flex: none; width: 46px; }
  .ob { flex: none; width: 46px; text-align: center; }
  .road b { flex: none; width: 52px; }
}
.bonus { margin-top: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bonus p { margin: 0; color: var(--muted); }
.bonus-tile {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  font-size: 26px; background: #ffd43b; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
}
.bonus-tile + .bonus-tile { background: #ff8fab; }
.bonus-tile i {
  position: absolute; right: -6px; top: -6px; font-style: normal; font-size: 11px; font-weight: 900;
  min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; text-align: center; color: #fff; background: var(--ok);
}

/* ---------- 风格 ---------- */
.themes { background: linear-gradient(180deg, #fff0e6, var(--cream)); }
.theme-tabs { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.theme-tabs button {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--panel); font-weight: 700;
}
.theme-tabs button span { font-size: 20px; }
.theme-tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); box-shadow: 0 4px 12px rgba(255, 107, 107, .2); }
.theme-preview { margin-top: 18px; padding: 22px; border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); max-width: 560px; }
.theme-preview .row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.theme-preview i {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 22%; font-style: normal; font-size: clamp(24px, 7vw, 36px);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .85), transparent 45%), var(--c);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12);
}
.th-animal i, .th-fruit i { background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06); }
.theme-preview p { margin: 14px 0 0; color: var(--muted); }
.theme-preview b { color: var(--ink); }
.ok { color: var(--ok); font-weight: 700; }

/* ---------- 更新日志 / 日程 ---------- */
.log { list-style: none; margin: 28px 0 0; padding: 0; max-width: 760px; }
.log > li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 18px 0; border-top: 1px dashed var(--line); }
.log time { font-weight: 800; color: var(--accent); font-size: 14px; padding-top: 2px; }
.log h3 { font-size: 17px; }
.log ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
@media (max-width: 560px) { .log > li { grid-template-columns: 1fr; gap: 4px; } }

.plan-sec { padding-top: 24px; }
.plan { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan li { background: var(--panel); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.plan li.st-doing { border-top-color: var(--accent); }
.plan li.st-next { border-top-color: var(--accent2); }
.when { font-weight: 800; font-size: 14px; }
.plan .tag { margin-left: 8px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #f6e9e2; color: var(--muted); }
.st-doing .tag { background: #ffe3e3; color: #e03131; }
.st-next .tag { background: #fff4e6; color: #e8590c; }
.plan h3 { font-size: 16px; margin: 10px 0 4px; }
.plan p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .plan { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plan { grid-template-columns: 1fr; } }

/* ---------- 结尾 ---------- */
.final { text-align: center; background: linear-gradient(160deg, var(--bg1), var(--bg2)); padding-top: 64px; padding-bottom: 64px; }
.final-faces { font-size: 44px; letter-spacing: 6px; }
.final h2 { margin: 8px 0 4px; }
.final p { margin: 0 0 24px; color: #6b4440; }
.final .desk-tip { margin: 22px 0 0; font-size: 14px; }
@media (pointer: coarse) { .final .desk-tip { display: none; } }

footer {
  padding: 22px var(--gut) max(22px, env(safe-area-inset-bottom));
  text-align: center; font-size: 13px; color: var(--muted); background: var(--cream);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float span, .m.at { animation: none; }
}
