/* 九龄猫官网 · 共用样式
 * 风格：晚风旧书店。暖纸色底、墨色手绘线、年糕的橘色、项圈的绿色。
 * 标题和按钮用站酷快乐体（手写可爱），正文用系统字体保证好读。
 * 中文站 jiulingmao.com 和英文站 mimi.house 共用这一份，改了两边一起同步。
 */
@font-face {
  font-family: "KuaiLe";
  src: url("/assets/site/fonts/kuaile.woff?v=5") format("woff");
  font-display: swap;
}

:root {
  --paper: #fbf4e8;
  --paper-2: #f5e8d3;
  --card: #fffdf8;
  --ink: #4a3426;
  --ink-soft: #7a6050;
  --orange: #ee9a45;
  --orange-deep: #d97b25;
  --orange-soft: #fce3c4;
  --green: #5e9a5b;
  --green-soft: #ddefd6;
  --pink: #f4a9a0;
  --pink-soft: #fde4df;
  --blue-soft: #dfeaf6;
  --line: rgba(74, 52, 38, 0.16);
  --max: 1120px;
  --hand: "KuaiLe", "HanziPen SC", "Hannotate SC", "Comic Sans MS", cursive;
  --body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  /* 一点点纸纹：两层很淡的点 */
  background-image:
    radial-gradient(rgba(74, 52, 38, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(238, 154, 69, 0.06) 1px, transparent 1px);
  background-size: 22px 22px, 37px 37px;
  background-position: 0 0, 11px 17px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--hand); font-weight: 400; line-height: 1.3; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px dashed var(--orange-deep); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 8px 14px; border: 2px solid var(--ink); border-radius: 12px; }
.skip:focus { left: 12px; }
.hand { font-family: var(--hand); }
.muted { color: var(--ink-soft); }

/* ───────── 顶栏 ───────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 244, 232, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px dashed var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; }
.brand b { font-family: var(--hand); font-weight: 400; font-size: 24px; line-height: 1; }
.brand small { display: block; font-size: 10px; letter-spacing: 0.18em; color: var(--ink-soft); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--hand); font-size: 18px; text-decoration: none;
  padding: 6px 12px; border-radius: 999px; transition: background .15s, transform .15s;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--orange-soft); transform: rotate(-2deg); }
.nav-links a[aria-current="page"] { background: var(--orange-soft); }
.nav-links .nav-login { border: 2px solid var(--ink); background: var(--card); box-shadow: 2px 2px 0 var(--ink); margin-left: 6px; }
.nav-links .nav-lang { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.menu-btn { display: none; border: 2px solid var(--ink); background: var(--card); border-radius: 999px; padding: 4px 14px; font-family: var(--hand); font-size: 18px; cursor: pointer; }

@media (max-width: 1000px) {
  .menu-btn { display: block; }
  .nav-links {
    position: absolute; left: 16px; right: 16px; top: 70px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--card); border: 2.5px solid var(--ink); border-radius: 22px;
    box-shadow: 4px 4px 0 var(--ink); padding: 12px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 20px; padding: 10px 14px; }
  .nav-links .nav-login { margin: 6px 0 0; text-align: center; }
  .nav-links .nav-lang { text-align: center; }
}

/* ───────── 按钮、贴纸 ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--hand); font-size: 20px; line-height: 1;
  padding: 14px 24px; border-radius: 999px;
  background: var(--orange); color: #fff; text-decoration: none;
  border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer; transition: transform .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-1px, -2px) rotate(-1deg); box-shadow: 4px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.alt { background: var(--card); color: var(--ink); }
.btn.green { background: var(--green); }
.btn.small { font-size: 17px; padding: 10px 18px; }
.btn img { height: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.sticker {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--hand); font-size: 16px; line-height: 1.2;
  padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--ink);
  transform: rotate(-2deg);
}
.sticker.orange { background: var(--orange-soft); }
.sticker.green { background: var(--green-soft); }
.sticker.pink { background: var(--pink-soft); }
.sticker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(94, 154, 91, .25); }
.sticker.off .dot { background: #b9a898; box-shadow: none; }

/* 手绘下划线：标题里要强调的词 */
.squiggle { position: relative; white-space: nowrap; }
.squiggle::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: -0.12em; height: 0.36em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q 15 2 30 7 T 60 7 T 90 7 T 118 6' fill='none' stroke='%23ee9a45' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  z-index: -1;
}

/* ───────── 卡片 ───────── */
.card {
  position: relative;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 26px 20px 28px 18px;
  box-shadow: 5px 5px 0 rgba(74, 52, 38, 0.9);
  padding: 26px;
}
.card.tilt-l { transform: rotate(-0.8deg); }
.card.tilt-r { transform: rotate(0.8deg); }

/* ───────── 区块 ───────── */
.section { padding: 76px 0; }
.section.tint { background: rgba(245, 232, 211, 0.6); border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 44px); }
.section-head p { margin-top: 12px; color: var(--ink-soft); font-size: 17px; }
.eyebrow { display: inline-block; font-family: var(--hand); color: var(--orange-deep); font-size: 18px; margin-bottom: 6px; }

/* ───────── 首屏 ───────── */
.hero { padding: 48px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.18; margin-top: 16px; }
.hero .lead { font-size: 18px; margin-top: 18px; max-width: 30em; }
.hero .hint { margin-top: 18px; font-family: var(--hand); color: var(--ink-soft); font-size: 17px; }
.hero .hint b { color: var(--orange-deep); font-weight: 400; }
@media (max-width: 860px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .actions { justify-content: center; }
}

/* 年糕和锅贴待的地方：书店的木地板 + 窗 */
.stage {
  position: relative; height: 420px;
  border: 2.5px solid var(--ink); border-radius: 34px 28px 38px 26px;
  background: #f6dba8;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  touch-action: manipulation;
}
.stage .scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.stage .scene .rays { animation: rays 6s ease-in-out infinite; }
.stage .scene .sunspot { animation: rays 6s ease-in-out infinite reverse; }
.stage .scene .motes circle { animation: mote 7s ease-in-out infinite; transform-box: fill-box; }
.stage .scene .plant { transform-origin: 550px 330px; animation: sway 5s ease-in-out infinite; }
@keyframes rays { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
@keyframes mote { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: .9; } 50% { transform: translate(10px, -22px); } 80% { opacity: .9; } 100% { transform: translate(-6px, -44px); opacity: 0; } }
@keyframes sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(1.6deg); } }
.stage .shop-sign {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%) rotate(-2deg); z-index: 2;
  font-family: var(--hand); font-size: 17px; background: var(--card);
  border: 2px solid var(--ink); border-radius: 10px; padding: 2px 14px; white-space: nowrap;
}
.stage .cat-niangao { position: absolute; left: 24%; bottom: 18px; width: 48%; max-width: 280px; z-index: 3; }
.stage .cat-guotie { position: absolute; right: 5%; bottom: 16px; width: 25%; max-width: 150px; z-index: 3; }
.stage .can { position: absolute; left: 6%; bottom: 30px; z-index: 4; }
.stage .payslip {
  position: absolute; left: 4%; bottom: 92px; z-index: 6; width: max-content; max-width: 46%;
  transform: rotate(-4deg) scale(.6); opacity: 0; transform-origin: left bottom;
  background: #fffdf2; border: 2px solid var(--ink); border-radius: 8px;
  padding: 8px 14px; font-family: var(--hand); font-size: 17px; line-height: 1.4; text-align: center;
  box-shadow: 3px 3px 0 var(--ink); pointer-events: none; transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .25s;
}
.stage .payslip.show { opacity: 1; transform: rotate(-4deg) scale(1); }
.stage .payslip small { display: block; font-size: 15px; color: var(--green); margin-top: 2px; }
@media (max-width: 520px) {
  .stage { height: 340px; }
  .stage .cat-niangao { left: 18%; width: 54%; }
  .stage .cat-guotie { right: 3%; width: 29%; }
}

/* ───────── 猫（SVG 由 cats.js 画） ───────── */
.cat { position: relative; display: block; cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
.cat svg { width: 100%; height: auto; overflow: visible; display: block; }
.cat .c-stroke { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cat .c-tail { transform-origin: 140px 212px; animation: tail 3.6s ease-in-out infinite; }
.cat .c-ear { transform-box: fill-box; transition: transform .18s; }
.cat .c-ear-l { transform-origin: 70% 100%; }
.cat .c-ear-r { transform-origin: 30% 100%; }
.cat.twitch-l .c-ear-l { transform: rotate(-12deg); }
.cat.twitch-r .c-ear-r { transform: rotate(12deg); }
.cat:hover .c-ear-l { transform: rotate(-6deg); }
.cat:hover .c-ear-r { transform: rotate(6deg); }
.cat.slowblink .c-eye { transform: scaleY(0.1); transition: transform .35s ease; }
.cat .c-body { animation: breathe 3.4s ease-in-out infinite; }
.cat .c-meow { display: none; }
.cat.meowing .c-meow { display: inline; }
.cat.meowing .c-mouth { display: none; }
.cat.tilt .c-head { transform: rotate(-9deg); }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.02); } }
.cat .c-eye { transform-box: fill-box; transform-origin: center; transition: transform .08s; }
.cat.blink .c-eye { transform: scaleY(0.08); }
.cat .c-closed { display: none; }
.cat.happy .c-eye, .cat.asleep .c-eye { display: none; }
.cat.happy .c-closed, .cat.asleep .c-closed { display: inline; }
.cat .c-head { transform-origin: 100px 120px; transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.cat .c-body { transform-origin: 100px 208px; transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
/* 锅贴：一看镜头就坐直 */
.cat-guotie .c-head { transform: translateY(8px) rotate(-4deg); }
.cat-guotie .c-body { transform: scaleY(.95); animation: none; }
.cat-guotie.upright .c-head { transform: translateY(-6px); }
.cat-guotie.upright .c-body { transform: scaleY(1.04); }
.cat.hop { animation: hop .45s ease; }
.cat.purr svg { animation: purr .09s linear infinite; }
.cat.asleep .c-head { transform: translateY(14px) rotate(6deg); }
.cat.asleep .c-tail { animation: none; }
.cat.munch .c-head { animation: munch .22s ease-in-out 6; }
.cat .zzz { position: absolute; right: 8%; top: 4%; font-family: var(--hand); font-size: 22px; color: var(--ink-soft); display: none; pointer-events: none; }
.cat.asleep .zzz { display: block; animation: zzz 2.4s ease-in-out infinite; }
@keyframes tail { 0%, 70%, 100% { transform: rotate(0deg); } 78% { transform: rotate(-10deg); } 86% { transform: rotate(2deg); } 92% { transform: rotate(-6deg); } }
@keyframes hop { 0% { transform: translateY(0); } 40% { transform: translateY(-18px); } 100% { transform: translateY(0); } }
@keyframes purr { 0% { transform: translateX(0); } 50% { transform: translateX(1px); } 100% { transform: translateX(-1px); } }
@keyframes munch { 50% { transform: translateY(5px); } }
@keyframes zzz { 0% { transform: translate(0, 0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(14px, -26px); opacity: 0; } }

/* 气泡：年糕的内心独白 / 锅贴的小声叫 */
.bubble {
  position: absolute; z-index: 8; left: 50%; bottom: 100%;
  transform: translate(-50%, 6px) scale(.85); opacity: 0;
  min-width: 110px; max-width: 220px; width: max-content; white-space: normal;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 18px 16px 20px 14px;
  padding: 8px 14px; font-family: var(--hand); font-size: 17px; line-height: 1.45; text-align: center;
  box-shadow: 3px 3px 0 var(--ink); pointer-events: none;
  transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 14px; height: 14px;
  background: var(--card); border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: translate(-50%, -7px) rotate(45deg);
}
.bubble.os { border-style: dashed; }
.bubble.os::before {
  content: var(--os-label, "内心"); position: absolute; left: 12px; top: -12px;
  font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 999px;
  background: var(--paper); border: 2px solid var(--ink); color: var(--ink-soft);
}
html[lang="en"] .bubble.os::before { --os-label: "thinking"; }
.bubble.show { opacity: 1; transform: translate(-50%, -4px) scale(1); }

/* 罐头 */
.can {
  width: 62px; height: 52px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  background: none; border: 0; padding: 0;
}
.can.dragging { cursor: grabbing; position: fixed; z-index: 90; pointer-events: none; transform: rotate(-12deg) scale(1.1); }
.can.eaten { visibility: hidden; }
.can svg { width: 100%; height: 100%; display: block; }

/* 点空白处留下的小爪印 */
.paw { position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 5; animation: paw 1.3s ease forwards; }
@keyframes paw { 0% { opacity: 0; transform: scale(.4) rotate(var(--r)); } 20% { opacity: .85; transform: scale(1) rotate(var(--r)); } 100% { opacity: 0; transform: scale(1) rotate(var(--r)); } }
.heart { position: absolute; pointer-events: none; z-index: 9; font-size: 20px; color: var(--pink); animation: heart 1s ease-out forwards; }
@keyframes heart { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -60px) scale(1.2); } }

/* ───────── 首页：三扇门 ───────── */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.door { display: flex; flex-direction: column; text-decoration: none; padding-top: 74px; cursor: pointer; text-align: left; transition: transform .18s, box-shadow .18s; }
.door:nth-child(1) { background: var(--orange-soft); }
.door:nth-child(2) { background: var(--green-soft); }
.door:nth-child(3) { background: var(--blue-soft); }
.door:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 7px 8px 0 var(--ink); }
.door .peek { position: absolute; left: 22px; top: -46px; width: 108px; pointer-events: none; }
.door .peek .cat { cursor: inherit; }
.door .who { font-family: var(--hand); font-size: 18px; color: var(--ink-soft); }
.door h3 { font-size: 30px; margin: 2px 0 8px; }
.door p { color: var(--ink); flex: 1; }
.door .go { margin-top: 18px; font-family: var(--hand); font-size: 20px; display: inline-flex; align-items: center; gap: 6px; }
.door .go::after { content: "→"; transition: transform .18s; }
.door:hover .go::after { transform: translateX(5px); }
.door .peek .c-head { transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.door:hover .peek .c-head, .door:focus-visible .peek .c-head { transform: translateY(-8px) rotate(-5deg); }
@media (max-width: 860px) { .doors { grid-template-columns: 1fr; gap: 56px; } }

/* ───────── 记录本（牛皮记录本的样子） ───────── */
.notebook { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.note {
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(74, 52, 38, .12) 31px 32px),
    #fff8ea;
  border: 2.5px solid var(--ink); border-radius: 10px 18px 12px 20px;
  padding: 22px 22px 22px 34px; position: relative; box-shadow: 4px 4px 0 rgba(74, 52, 38, .85);
}
.note::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; border-left: 2px solid rgba(238, 154, 69, .55); }
.note h3 { font-size: 24px; margin-bottom: 6px; }
.note .num { font-family: var(--hand); color: var(--orange-deep); font-size: 15px; }
@media (max-width: 860px) { .notebook { grid-template-columns: 1fr; } }

/* ───────── 合租的猫 ───────── */
.showcase { display: grid; grid-template-columns: 1.25fr 1fr; gap: 34px; align-items: center; }
.poster {
  position: relative; display: block; border: 3px solid var(--ink); border-radius: 24px; overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink); transform: rotate(-1.2deg); text-decoration: none; transition: transform .2s;
}
.poster:hover { transform: rotate(0deg) scale(1.01); }
.poster img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.poster .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%; background: var(--card); border: 3px solid var(--ink);
  display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink);
}
.poster .play::before { content: ""; border-left: 22px solid var(--orange-deep); border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }
.poster .count { position: absolute; left: 14px; bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  font-family: var(--hand); font-size: 17px; text-decoration: none; padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--ink); transition: transform .15s, background .15s;
}
.chip:hover { background: var(--orange-soft); transform: rotate(-3deg); }
.cast { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cast .card { padding: 0; overflow: hidden; }
.cast img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-bottom: 2.5px solid var(--ink); }
.cast .cast-body { padding: 18px 20px 22px; }
.cast h3 { font-size: 28px; }
.cast .says { margin-top: 10px; font-family: var(--hand); font-size: 17px; color: var(--ink-soft); }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cast { grid-template-columns: 1fr; } }

/* ───────── 数字 ───────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 12px; }
.stat b { display: block; font-family: var(--hand); font-weight: 400; font-size: clamp(34px, 5vw, 48px); color: var(--orange-deep); line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

/* ───────── 功能格子、步骤、截图 ───────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.feature { padding: 22px; }
.feature .icon { width: 54px; height: 54px; border-radius: 16px; border: 2px solid var(--ink); display: grid; place-items: center; font-size: 26px; margin-bottom: 12px; background: var(--orange-soft); }
.feature:nth-child(3n+2) .icon { background: var(--green-soft); }
.feature:nth-child(3n) .icon { background: var(--pink-soft); }
.feature h3 { font-size: 24px; margin-bottom: 4px; }
.feature p { color: var(--ink-soft); }

.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--hand); font-size: 26px; background: var(--orange); color: #fff; border: 2.5px solid var(--ink);
}
.step h3 { font-size: 23px; }
.step p { color: var(--ink-soft); }

.shots { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shot { flex: 0 0 auto; width: 210px; scroll-snap-align: start; text-align: center; background: none; border: 0; padding: 0; cursor: zoom-in; }
.shot img { width: 100%; border: 2.5px solid var(--ink); border-radius: 26px; box-shadow: 4px 4px 0 var(--ink); background: #fff; }
.shot span { display: block; margin-top: 10px; font-family: var(--hand); font-size: 17px; }
.shot.wide { width: min(560px, 82vw); }
.shot.wide img { border-radius: 18px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ───────── 常见问题 ───────── */
.faq { display: grid; gap: 14px; max-width: 820px; }
.faq details { background: var(--card); border: 2.5px solid var(--ink); border-radius: 18px; padding: 0 20px; box-shadow: 3px 3px 0 var(--ink); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--hand); font-size: 20px; padding: 16px 30px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 26px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-soft); }

/* ───────── 推荐给医院（复制一段话） ───────── */
.refer { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.refer blockquote {
  margin: 0; background: #fffdf2; border: 2px dashed var(--ink); border-radius: 16px; padding: 16px 18px; color: var(--ink);
}
@media (max-width: 860px) { .refer { grid-template-columns: 1fr; } }

/* ───────── 联系、页脚 ───────── */
.contact-band { padding: 64px 0; }
.contact-band .card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: var(--orange-soft); padding: 34px; }
.contact-band h2 { font-size: clamp(28px, 4vw, 38px); }
.contact-band p { color: var(--ink-soft); margin-top: 6px; }

.site-footer { border-top: 2px dashed var(--line); padding: 46px 0 30px; position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
.footer-grid h4 { font-size: 19px; margin-bottom: 8px; }
.footer-grid a { display: block; text-decoration: none; color: var(--ink-soft); padding: 3px 0; }
.footer-grid a:hover { color: var(--orange-deep); }
.footer-grid p { color: var(--ink-soft); margin-top: 10px; font-size: 14px; }
.footer-bottom { margin-top: 32px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.footer-cat { position: absolute; right: 6%; top: -62px; width: 96px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-cat { right: 16px; width: 80px; top: -52px; } }

/* ───────── 弹窗（医生登录选择、看大图） ───────── */
dialog {
  border: 2.5px solid var(--ink); border-radius: 24px; padding: 28px; background: var(--card); color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink); max-width: min(460px, calc(100% - 32px));
}
dialog::backdrop { background: rgba(74, 52, 38, .45); }
dialog h3 { font-size: 26px; margin-bottom: 6px; }
dialog .close { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 28px; cursor: pointer; line-height: 1; }
.login-list { display: grid; gap: 12px; margin-top: 18px; }
.login-list a {
  display: block; text-decoration: none; border: 2px solid var(--ink); border-radius: 16px; padding: 12px 16px;
  background: var(--paper); transition: background .15s, transform .15s;
}
.login-list a:hover { background: var(--orange-soft); transform: translateX(3px); }
.login-list b { display: block; font-family: var(--hand); font-weight: 400; font-size: 21px; }
.login-list span { font-size: 14px; color: var(--ink-soft); }
#image-viewer { max-width: min(560px, calc(100% - 24px)); padding: 18px; }
#image-viewer img { max-height: 80vh; margin: 0 auto; border-radius: 16px; }
#image-viewer p { text-align: center; margin-top: 8px; font-family: var(--hand); }

.disclaimer { font-size: 13px; color: var(--ink-soft); margin-top: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 99;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-family: var(--hand); font-size: 17px;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* ───────── 翻翻卡（年糕店长的冷知识） ───────── */
.flips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flip { background: none; border: 0; padding: 0; cursor: pointer; perspective: 900px; min-height: 200px; text-align: left; }
.flip-in { position: relative; display: block; width: 100%; height: 100%; min-height: 200px; transition: transform .5s cubic-bezier(.3,1.3,.5,1); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 22px;
  border: 2.5px solid var(--ink); border-radius: 22px 18px 24px 16px; box-shadow: 4px 4px 0 var(--ink);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flip-front { background: var(--card); }
.flip-front b { font-family: var(--hand); font-weight: 400; font-size: 24px; line-height: 1.35; }
.flip-front i { font-style: normal; margin-top: 12px; font-family: var(--hand); color: var(--orange-deep); }
.flip-back { background: var(--orange-soft); transform: rotateY(180deg); font-size: 15px; line-height: 1.7; }
.flip:nth-child(2n) .flip-front { background: var(--green-soft); }
.flip:hover .flip-front { transform: rotate(-1deg); }
@media (max-width: 860px) { .flips { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .flips { grid-template-columns: 1fr; } }

/* ───────── 时间线 ───────── */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4%; right: 4%; top: 22px; border-top: 3px dashed rgba(74, 52, 38, .35); }
.tl { position: relative; padding-top: 52px; }
.tl b {
  position: absolute; top: 0; left: 0; font-family: var(--hand); font-weight: 400; font-size: 18px;
  background: var(--orange); color: #fff; border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; box-shadow: 2px 2px 0 var(--ink);
}
.tl h3 { font-size: 21px; }
.tl p { color: var(--ink-soft); font-size: 15px; margin-top: 4px; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; gap: 22px; padding-left: 8px; }
  .timeline::before { left: 34px; right: auto; top: 10px; bottom: 10px; border-top: 0; border-left: 3px dashed rgba(74, 52, 38, .35); }
  .tl { padding: 0 0 0 96px; min-height: 44px; }
}

/* ───────── 真实检测案例（长报告点开看全图） ───────── */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case { padding: 0; overflow: hidden; cursor: zoom-in; text-align: left; font: inherit; color: inherit; transition: transform .18s, box-shadow .18s; }
.case:hover { transform: translateY(-3px) rotate(-0.5deg); box-shadow: 7px 8px 0 var(--ink); }
.case img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-bottom: 2.5px solid var(--ink); }
.case-body { display: block; padding: 14px 18px 18px; }
.case-body b { display: block; font-family: var(--hand); font-weight: 400; font-size: 20px; margin-top: 8px; }
.case-body span.muted { display: block; font-size: 14px; margin-top: 2px; }
.case .sticker { transform: rotate(-2deg); font-size: 15px; }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr 1fr; gap: 16px; } .case-body { padding: 10px 12px 14px; } .case-body b { font-size: 17px; } }
#image-viewer.tall { max-height: 92vh; overflow-y: auto; max-width: min(520px, calc(100% - 24px)); }
#image-viewer.tall img { max-height: none; width: 100%; }

/* 小程序码弹窗 */
.qr-dialog { text-align: center; }
.qr-dialog img { width: min(260px, 70vw); margin: 14px auto 10px; border-radius: 18px; border: 2.5px solid var(--ink); background: #fff; padding: 10px; }
.qr-dialog p { font-family: var(--hand); font-size: 19px; }
.qr-dialog p.muted { font-family: var(--body); font-size: 14px; margin-top: 6px; }
