@font-face {
  font-family: 'ZB Serif';
  src: url('../fonts/serif.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'ZB Hand';
  src: url('../fonts/hand.woff2') format('woff2');
  font-display: swap;
}

:root {
  --felt: #a29d94;
  --felt-d: #8b867d;
  --kraft: #d6b98d;
  --paper: #fbf7ef;
  --paper-2: #f2ebdf;
  --wallc: #efe8dc;
  --ink: #221e1a;
  --ink-2: #4b443d;
  --ink-3: #7a7168;
  --red: #d2412f;
  --gold: #e3a83c;
  --pink: #f4c6cc;
  --blush: #f5d6d2;
  --blue: #c9ddf2;
  --sky: #d3e3ef;
  --cream: #f6e7b8;
  --mint: #cfe6d3;
  --wood: #b9834f;
  --f-serif: 'ZB Serif', 'Songti SC', 'STSong', 'Noto Serif SC', serif;
  --f-hand: 'ZB Hand', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --pw: min(100vw, 460px);
  --u: calc(var(--pw) / 100);
  --vh: 100vh;
  --torn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 16' preserveAspectRatio='none'%3E%3Cpath d='M0 0H140V7L134 9.5 128 6 121 10.5 115 7 108 11.5 101 8 95 12 88 8.5 82 10.5 76 6.5 69 11 62 8 56 12.5 49 9 43 11 36 7 30 10.5 23 8 17 12 10 8 4 10.5 0 8Z'/%3E%3C/svg%3E");
}
@supports (height: 100svh) {
  :root { --vh: 100svh; }
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--felt-d);
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--felt-d) url('../img/felt.webp');
  background-size: 256px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
.page {
  position: relative;
  width: var(--pw);
  margin: 0 auto;
  overflow: hidden;
  overflow: clip;
  box-shadow: 0 0 80px rgba(0, 0, 0, .28);
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
img { display: block; max-width: 100%; -webkit-user-drag: none; }
svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
/* 段落最后一行别只剩一个字 */
p, li, figcaption, blockquote { text-wrap: pretty; }
/* 介绍卡原话、相处 tips 都是短句：放不下时在逗号处换行，不把词拆开 */
.dp-hook, .dp-lines li, .dp-tips li { word-break: keep-all; overflow-wrap: anywhere; }
/* 图鉴卡上那句话折行时两行一样长 */
.card-hook { text-wrap: balance; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sec { position: relative; }
/* 段与段之间的接缝轮换着用：撕纸、毛毡板木框、和纸胶带。 */
.sec[data-edge]::before {
  content: '';
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
.sec[data-edge='torn']::before {
  left: 0;
  right: 0;
  top: -1px;
  height: 15px;
  background: var(--edge);
  -webkit-mask: var(--torn) repeat-x 0 0 / 140px 15px;
  mask: var(--torn) repeat-x 0 0 / 140px 15px;
}
.sec[data-edge='frame']::before {
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  background: linear-gradient(#cf9f68, #b9834f 70%, #a5713f);
  border-bottom: 2px solid rgba(34, 30, 26, .35);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
}
.sec[data-edge='tape']::before {
  left: -6%;
  right: -6%;
  top: -15px;
  height: 30px;
  background: rgba(244, 198, 204, .92) repeating-linear-gradient(-45deg, transparent 0 9px, rgba(255, 255, 255, .35) 9px 14px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
  transform: rotate(-1.8deg);
}

/* ---------- 通用小部件 ---------- */
.bubble {
  position: absolute;
  z-index: 20;
  max-width: 230px;
  padding: 6px 11px 5px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 rgba(34, 30, 26, .14);
  font-family: var(--f-hand);
  font-size: 15.5px;
  line-height: 1.32;
  color: var(--ink);
  pointer-events: none;
  will-change: transform;
}
.bubble::after {
  content: '';
  position: absolute;
  left: var(--tail, 50%);
  bottom: -8px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: var(--paper);
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) skew(6deg, 6deg);
}
.bubble.is-below::after { bottom: auto; top: -8px; transform: rotate(225deg) skew(6deg, 6deg); }
.bubble span { display: block; }
.bubble.is-me { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bubble.is-me::after { background: var(--ink); }

.pt { position: absolute; left: 0; top: 0; z-index: 21; pointer-events: none; will-change: transform; }
.pt svg { width: 100%; height: 100%; }
.pt-heart { color: #e8566f; }
.pt-spark { color: var(--gold); }
.pt-note { color: var(--ink); }
.pt-puff { border-radius: 50%; box-shadow: inset -2px -3px 0 rgba(34, 30, 26, .08); }
.pt-text {
  font-family: var(--f-hand);
  font-size: 19px;
  line-height: 1;
  white-space: nowrap;
  color: var(--red);
  text-shadow: 2px 2px 0 var(--paper), -2px 2px 0 var(--paper), 2px -2px 0 var(--paper), -2px -2px 0 var(--paper), 0 3px 0 var(--paper);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 7px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  transition: transform .08s, box-shadow .08s;
}
.pill:active, .pill.is-down { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.pill-ink { background: var(--ink); color: var(--paper); }
.pill[hidden] { display: none; }

.tap-ring {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--red);
}
.tap-ring::before, .tap-ring::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--red);
  border-radius: 50%;
  animation: ring 1.6s cubic-bezier(.2, .7, .3, 1) infinite;
}
.tap-ring::after { animation-delay: .5s; }
@keyframes ring {
  from { transform: scale(.7); opacity: 1; }
  to { transform: scale(2.4); opacity: 0; }
}

.rosette { position: absolute; width: calc(var(--u) * 17); aspect-ratio: 64 / 96; pointer-events: none; }
.rosette svg { width: 100%; height: 100%; }
.rosette span {
  position: absolute;
  left: 0;
  right: 0;
  top: 33.3%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 3.2);
  line-height: 1.12;
  color: var(--paper);
}

/* ---------- 开场 ---------- */
.hero {
  min-height: var(--vh);
  display: flex;
  flex-direction: column;
  padding: calc(var(--u) * 5) calc(var(--u) * 5) 0;
  background: var(--felt) url('../img/felt.webp');
  background-size: 256px;
  overflow: hidden;
}
.hero-top {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.kicker {
  padding: 5px 10px 4px;
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  transform: rotate(-2deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .1);
}

.hero-stage {
  position: relative;
  margin-top: max(calc(var(--u) * 33), calc(var(--vh) * .2));
}
.title {
  position: relative;
  z-index: 1;
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 40);
  line-height: .96;
  letter-spacing: -.03em;
  color: var(--ink);
}
.title-line {
  display: flex;
  justify-content: center;
  transform-origin: 50% 100%;
  will-change: transform;
}
.title-line > span { display: block; will-change: transform; transform-origin: 50% 85%; }
/* 开场脚本接手前先藏起标题字；脚本出错时 2.5 秒后照常显示 */
.js .title-line > span { opacity: 0; animation: zbShow 0s 2.5s forwards; }
@keyframes zbShow { to { opacity: 1; } }
.title-line.l1 { margin-left: calc(var(--u) * -6); }
.title-line.l2 { margin-left: calc(var(--u) * 8); margin-top: calc(var(--u) * 1.5); }
.hero-jiumi {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  width: calc(var(--u) * 50);
  transform-origin: 50% 100%;
  will-change: transform;
  touch-action: manipulation;
  visibility: hidden;
}
.hero-jiumi img { width: 100%; height: auto; pointer-events: none; }
.hero-rosette {
  z-index: 3;
  right: calc(var(--u) * -1);
  top: calc(var(--u) * -30);
  transform-origin: 50% 0;
}
.hero-hint {
  position: absolute;
  z-index: 3;
  left: calc(var(--u) * -1);
  top: calc(var(--u) * -27);
  display: flex;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--f-hand);
  font-size: calc(var(--u) * 5.6);
  color: var(--paper);
  pointer-events: none;
  transition: opacity .35s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.hero-hint svg { width: calc(var(--u) * 13); height: calc(var(--u) * 9); color: var(--paper); transform: translateY(-40%) rotate(-8deg); }
.hero-hint.is-gone { opacity: 0; transform: scale(.6) rotate(-10deg); }
.hero-fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.hero-fx .pt-text { font-size: calc(var(--u) * 8); }

.hero-foot {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* 底下留出图图探头的地方：它从播报条后面冒出来，不跟字叠在一起 */
  padding: calc(var(--u) * 9) 0 calc(var(--u) * 40);
}
.hero-sub {
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 6.4);
  line-height: 1.42;
  color: var(--ink);
}
.hero-sub em {
  font-style: normal;
  background: linear-gradient(transparent 52%, var(--cream) 52%, var(--cream) 92%, transparent 92%);
  padding: 0 .05em;
}
.hero-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-right: calc(var(--u) * 1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  writing-mode: vertical-rl;
  color: var(--ink);
}
.hero-cue svg { width: 18px; height: 30px; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
.hero-tutu {
  position: absolute;
  z-index: 1;
  right: calc(var(--u) * 30);
  bottom: 0;
  width: calc(var(--u) * 28);
  transform-origin: 50% 100%;
  will-change: transform;
  touch-action: manipulation;
}
.hero-tutu img { width: 100%; height: auto; pointer-events: none; }

/* ---------- 刷新播报条 ---------- */
.ticker {
  position: relative;
  z-index: 6;
  margin: calc(var(--u) * -12) calc(var(--u) * -6) calc(var(--u) * -6);
  padding: 9px 0 8px;
  background: var(--kraft) url('../img/kraft.webp');
  background-size: 256px;
  box-shadow: 0 4px 0 rgba(34, 30, 26, .14), 0 10px 18px -8px rgba(0, 0, 0, .3);
  transform: rotate(-4deg);
  overflow: hidden;
  pointer-events: none;
}
.ticker::before, .ticker::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1.5px dashed rgba(34, 30, 26, .28);
}
.ticker::before { top: 4px; }
.ticker::after { bottom: 4px; }
.ticker-track { display: flex; align-items: center; width: max-content; will-change: transform; }
.tk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}
.tk img { width: 30px; height: 30px; object-fit: contain; }
.tk em { font-style: normal; color: var(--red); }
.tk-dot { color: var(--ink); opacity: .5; font-size: 12px; }

/* ---------- 两层楼 ---------- */
.intro {
  padding: calc(var(--u) * 26) calc(var(--u) * 7) calc(var(--u) * 18);
  background: var(--paper) url('../img/wall.webp');
  background-size: 256px;
}
.intro-text {
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 7.6);
  line-height: 1.66;
  letter-spacing: .01em;
}
.intro-text .ln {
  display: block;
  opacity: 0;
  transform: translate3d(0, 18px, 0) rotate(1.5deg);
  transform-origin: 0 100%;
  transition: opacity .5s, transform .7s cubic-bezier(.2, 1.5, .4, 1);
}
.intro-text .ln.is-in { opacity: 1; transform: none; }
.intro-text .in { padding-left: 2.3em; }
.intro-text .gap { display: block; height: .7em; }
.chip {
  display: inline-block;
  position: relative;
  width: 2.1em;
  height: 1.3em;
  margin-right: .12em;
  vertical-align: -0.2em;
  touch-action: manipulation;
}
.chip img {
  position: absolute;
  left: 50%;
  bottom: -.1em;
  height: 2em;
  width: auto;
  max-width: none;
  transform-origin: 50% 100%;
  transform: translateX(-50%) scale(0);
  will-change: transform;
  pointer-events: none;
}
mark {
  position: relative;
  z-index: 0;
  background: none;
  color: inherit;
}
mark::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: -.1em;
  right: -.1em;
  bottom: .1em;
  height: .5em;
  background: var(--hl, #f2c94c);
  border-radius: .12em .4em .2em .5em;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0)) skewX(-10deg);
  opacity: .9;
}
.intro-fx { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

/* ---------- 逗猫 ---------- */
.toy {
  padding: calc(var(--u) * 4) 0 calc(var(--u) * 12);
  background: var(--paper) url('../img/wall.webp');
  background-size: 256px;
}
.toy-head {
  position: relative;
  z-index: 8;
  padding: 0 calc(var(--u) * 5);
  margin-bottom: calc(var(--u) * -6);
}
.notice {
  position: relative;
  display: inline-block;
  padding: 20px 22px 16px;
  background: #fffdf8;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 14px 22px -12px rgba(0, 0, 0, .4);
  transform: rotate(-2deg);
}
.notice-tape {
  position: absolute;
  left: 50%;
  top: -12px;
  width: 92px;
  height: 24px;
  margin-left: -46px;
  background: rgba(246, 231, 184, .92);
  transform: rotate(3deg);
  clip-path: polygon(0 6%, 6% 0, 12% 8%, 18% 0, 82% 4%, 88% 0, 94% 7%, 100% 2%, 100% 96%, 94% 100%, 88% 92%, 82% 100%, 18% 97%, 12% 100%, 6% 92%, 0 100%);
}
.notice-kicker {
  display: inline-block;
  padding: 2px 8px 1px;
  border: 2px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .16em;
  transform: rotate(-3deg);
}
.notice h2, .index-card h2, .wall-title h2 {
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 10.6);
  line-height: 1.14;
  letter-spacing: -.01em;
}
.notice h2 { margin: 10px 0 6px; }
.notice p { font-size: 14px; color: var(--ink-2); }

.stage {
  position: relative;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.scene {
  position: relative;
  width: min(100%, calc(var(--vh) * .72 * .8));
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  overflow: hidden;
  border-top: 2.5px solid var(--ink);
  background: #f6f1e8 url('../img/wall.webp');
  background-size: 256px;
  touch-action: manipulation;
}
.scene-bg, .scene-fg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scene-shadows, .scene-cats, .scene-ui { position: absolute; inset: 0; }
.scene-shadows, .scene-ui { pointer-events: none; }
.scene-fg { z-index: 600; }
.scene-ui { z-index: 700; }
.cat {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 100%;
  will-change: transform;
  touch-action: manipulation;
}
.cat img { width: 100%; height: 100%; pointer-events: none; }
.shadow {
  position: absolute;
  z-index: 605;
  left: 0;
  top: 0;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(34, 30, 26, .3), rgba(34, 30, 26, 0));
  will-change: transform, opacity;
}
.scene-log {
  position: absolute;
  left: 10px;
  top: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.log-line {
  padding: 3px 10px 3px 8px;
  border-radius: 6px;
  background: rgba(34, 30, 26, .86);
  color: var(--paper);
  font-size: 12.5px;
  line-height: 1.45;
  white-space: nowrap;
  animation: logIn .45s cubic-bezier(.2, 1.5, .4, 1) both;
}
.log-line b { color: var(--gold); font-weight: 700; }
.log-line.is-out { animation: logOut .35s ease-in both; }
@keyframes logIn {
  from { transform: translateX(-30px) scale(.8); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes logOut {
  to { transform: translateY(-8px) scale(.9); opacity: 0; }
}
.scene-score {
  position: absolute;
  right: 10px;
  top: 18px;
  padding: 4px 12px 3px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--cream);
  font-size: 13px;
  font-weight: 800;
  transform-origin: 100% 0;
}
.scene-score[hidden] { display: none; }
.scene-score b { font-size: 16px; color: var(--red); }

.tray {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: calc(var(--u) * 1.5);
  padding: calc(var(--u) * 4) calc(var(--u) * 3) calc(var(--u) * 3);
  border-top: 2.5px solid var(--ink);
  background: var(--kraft) url('../img/kraft.webp');
  background-size: 256px;
}
.toy-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  touch-action: none;
}
.toy-ico {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 15);
  height: calc(var(--u) * 15);
  max-width: 66px;
  max-height: 66px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s, box-shadow .2s;
}
.toy-ico svg { width: 82%; height: 82%; transition: opacity .15s; }
.toy-lb { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.toy-btn:active .toy-ico { transform: translateY(2px) scale(.96); box-shadow: 0 1px 0 var(--ink); }
.toy-btn.is-out .toy-ico { background: rgba(251, 247, 239, .35); border-style: dashed; box-shadow: none; }
.toy-btn.is-out .toy-ico svg { opacity: 0; }
.toy-btn.is-back .toy-ico { animation: toyBack .5s cubic-bezier(.3, 1.7, .5, 1); }
@keyframes toyBack {
  from { transform: scale(.72); }
  to { transform: none; }
}
.tray-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--u) * 31);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 99px;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  z-index: 696;
  transform: translateX(-50%);
  pointer-events: none;
  animation: hintBob 2.2s ease-in-out infinite;
  transition: opacity .3s;
}
.tray-hint.is-gone { opacity: 0; animation: none; }
@keyframes hintBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}
.stage-fx { position: absolute; left: 0; top: 0; z-index: 690; pointer-events: none; }
.stage-ui { position: absolute; inset: 0; z-index: 695; pointer-events: none; }
.ball-hit {
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
}
.ball-hit[hidden] { display: none; }

/* ---------- 拍拍腿 ---------- */
.lap {
  --edge: var(--paper);
  padding: calc(var(--u) * 15) 0 calc(var(--u) * 12);
  background: var(--kraft) url('../img/kraft.webp');
  background-size: 256px;
}
.lap-head { position: relative; z-index: 4; padding: 0 calc(var(--u) * 6); }
.lap-kicker { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.say-big {
  position: relative;
  display: inline-block;
  margin: 12px 0 0 calc(var(--u) * 4);
  padding: 12px 24px 10px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(-2.5deg);
}
.say-big::after {
  content: '';
  position: absolute;
  left: 58%;
  bottom: -15px;
  width: 22px;
  height: 22px;
  background: var(--paper);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(52deg) skew(14deg, 14deg);
}
.say-big h2 {
  font-family: var(--f-hand);
  font-weight: 400;
  font-size: calc(var(--u) * 10);
  line-height: 1.18;
}
.lap-stage {
  position: relative;
  margin-top: calc(var(--u) * -3);
  aspect-ratio: 400 / 520;
  overflow: hidden;
  border-top: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.lap-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lap-legs { transform-origin: 50% 100%; transform-box: fill-box; }
.lap-cat {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 100%;
  will-change: transform;
}
.lap-cat img { width: 100%; height: auto; pointer-events: none; }
.lap-fx { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.lap-fx .pt-text { font-size: 26px; }
.lap-pats {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(var(--u) * 5);
  display: flex;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 99px;
  background: rgba(251, 247, 239, .9);
  border: 2px solid var(--ink);
  transform: translateX(-50%);
  pointer-events: none;
}
.lap-pats i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  transition: background .15s, transform .25s cubic-bezier(.3, 1.8, .5, 1);
}
.lap-pats i.on { background: var(--red); transform: scale(1.25); }
.lap-stamp {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 9%;
  padding: 6px 14px 4px;
  border: 3.5px solid var(--red);
  border-radius: 10px;
  color: var(--red);
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 8.4);
  letter-spacing: .08em;
  background: rgba(251, 247, 239, .55);
  transform: translateX(-50%) rotate(-10deg) scale(2.4);
  opacity: 0;
  pointer-events: none;
}
.lap-stamp.is-on {
  opacity: .92;
  transform: translateX(-50%) rotate(-10deg) scale(1);
  transition: transform .32s cubic-bezier(.5, 0, .7, 1.3), opacity .1s;
}
.lap-tip {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 66%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 99px;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity .3s;
}
.lap-tip.is-gone { opacity: 0; }
.lap-tip.is-low { top: auto; bottom: calc(var(--u) * 4.5); }
.lap-pats[hidden] { display: none; }
/* 拍腿：手掌拍下去再抬起来，腿上荡开一圈 */
.lap-slap {
  position: absolute;
  width: 104px;
  height: 104px;
  margin: -80px 0 0 -54px;
  animation: slap .62s cubic-bezier(.3, .7, .4, 1) forwards;
}
.lap-slap svg { display: block; width: 100%; height: 100%; transform: scaleX(-1); }
.lap-slap.is-r svg { transform: none; }
@keyframes slap {
  0% { transform: translateY(-34px) scale(1.18) rotate(-6deg); opacity: 0; }
  22% { transform: translateY(0) scale(1.04, .94); opacity: 1; }
  36% { transform: translateY(2px) scale(1.08, .9); }
  60% { transform: translateY(-6px) scale(1); opacity: 1; }
  100% { transform: translateY(-26px) scale(.96); opacity: 0; }
}
.lap-ripple {
  position: absolute;
  width: 96px;
  height: 34px;
  margin: -17px 0 0 -48px;
  border: 2.5px solid rgba(34, 30, 26, .55);
  border-radius: 50%;
  animation: ripple .55s .08s ease-out both;
}
@keyframes ripple {
  from { transform: scale(.3); opacity: .9; }
  to { transform: scale(1.4); opacity: 0; }
}
.lap-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: calc(var(--u) * 5) calc(var(--u) * 6) 0;
}
.lap-score { margin-left: auto; font-size: 13px; color: var(--ink-2); }
.lap-score b { font-size: 16px; color: var(--red); }
.lap-reply {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: calc(var(--u) * 4) calc(var(--u) * 6) 0;
}
.lap-reply[hidden] { display: none; }
.lap-reply-q { width: 100%; font-size: 14px; font-weight: 700; }

/* ---------- 图鉴 ---------- */
.dex {
  padding: calc(var(--u) * 16) calc(var(--u) * 4) calc(var(--u) * 18);
  background: var(--felt) url('../img/felt.webp');
  background-size: 256px;
}
.dex-head { position: relative; padding: 0 calc(var(--u) * 2); }
.index-card {
  position: relative;
  width: 74%;
  padding: 22px 18px 14px;
  background: #fffdf8 repeating-linear-gradient(transparent 0 25px, rgba(110, 150, 200, .26) 25px 26px);
  background-position: 0 62px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 14px 22px -12px rgba(0, 0, 0, .45);
  transform: rotate(-2deg);
}
.index-card h2 { padding-bottom: 6px; border-bottom: 1.5px solid rgba(210, 65, 47, .55); }
.index-card p { margin-top: 8px; font-size: 14px; line-height: 26px; color: var(--ink-2); }
.ic-pin { position: absolute; left: 50%; top: -12px; width: 30px; height: 30px; margin-left: -15px; color: var(--red); }
.ic-pin svg { width: 100%; height: 100%; }
.dex-filters {
  display: flex;
  gap: 8px;
  margin: calc(var(--u) * 6) calc(var(--u) * -4) 0;
  padding: 4px calc(var(--u) * 6) 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dex-filters::-webkit-scrollbar { display: none; }
.fchip {
  flex: none;
  padding: 7px 15px 6px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .1s, box-shadow .1s, background .15s, color .15s;
}
.fchip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.fchip[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.fchip i { font-style: normal; font-weight: 600; opacity: .6; margin-left: 3px; }
.dex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--u) * 7) calc(var(--u) * 5);
  padding: calc(var(--u) * 8) calc(var(--u) * 1) 0;
}
.card {
  position: relative;
  display: block;
  padding: 9px 9px 12px;
  color: inherit;
  text-decoration: none;
  background: var(--paper);
  text-align: left;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 12px 20px -10px rgba(0, 0, 0, .42);
  transform-origin: 50% 4px;
  transform: rotate(var(--r, 0deg));
  will-change: transform;
  transition: opacity .35s, filter .35s;
}
.card:nth-child(even) { margin-top: calc(var(--u) * 12); margin-bottom: calc(var(--u) * -12); }
.card.is-dim { opacity: .35; filter: grayscale(.7); }
.card-pin { position: absolute; z-index: 2; left: 50%; top: -11px; width: 28px; height: 28px; margin-left: -14px; color: var(--pin, var(--red)); }
.card-pin svg { width: 100%; height: 100%; }
.card-ph {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 1 / 1.02;
  background: var(--tint, var(--paper-2));
  overflow: hidden;
}
.card-ph img { width: auto; height: 88%; max-width: 104%; object-fit: contain; margin-bottom: 2%; }
.card-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 9px;
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 6);
  line-height: 1.15;
}
.card-name small { font-family: var(--f-body); font-weight: 700; font-size: 11.5px; color: var(--ink-3); }
.card-breed { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.card-hook { display: block; margin-top: 5px; font-family: var(--f-hand); font-size: 15.5px; line-height: 1.3; color: var(--red); }
.card .rosette { right: -10px; top: 42%; width: 40px; z-index: 2; }
.card .rosette span { font-size: 9px; }

/* ---------- 猫咪详情 ---------- */
.detail { position: fixed; inset: 0; z-index: 80; }
.detail[hidden] { display: none; }
/* 详情打开时锁住后面的页面 */
html.is-locked, html.is-locked body { overflow: hidden; }
.detail-bg {
  position: absolute;
  inset: 0;
  background: var(--felt-d) url('../img/felt.webp');
  background-size: 256px;
  opacity: 0;
}
.detail-shell {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--pw);
  margin-left: calc(var(--pw) / -2);
  overflow: hidden;
}
.detail-track { position: absolute; inset: 0; }
.dp {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: calc(96px + env(safe-area-inset-top)) calc(var(--u) * 6) calc(118px + env(safe-area-inset-bottom));
  will-change: transform;
}
.dp-card {
  position: relative;
  padding: 10px 10px 24px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 24px 32px -16px rgba(0, 0, 0, .55);
  transform: rotate(var(--r, -1deg));
  transform-origin: 50% 0;
}
.dp-pin { position: absolute; z-index: 5; left: 50%; top: -15px; width: 34px; height: 34px; margin-left: -17px; color: var(--pin, var(--red)); }
.dp-pin svg { width: 100%; height: 100%; }
.dp-ph { position: relative; height: calc(var(--u) * 72); background: var(--tint, var(--paper-2)); }
.dp-cat {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 3%;
  max-width: none;
  transform-origin: 50% 100%;
  will-change: transform;
  touch-action: pan-y;
  cursor: pointer;
}
.dp-fx { position: absolute; z-index: 4; left: 0; right: 0; top: -40%; bottom: 0; pointer-events: none; }
.dp-ph .rosette { z-index: 3; right: -14px; top: 12px; width: calc(var(--u) * 16); }
.dp-ph .rosette span { font-size: calc(var(--u) * 2.8); }
.dp-rub {
  position: absolute;
  z-index: 3;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 7px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: rgba(251, 247, 239, .94);
  font-size: 12.5px;
  font-weight: 800;
  pointer-events: none;
  transition: opacity .3s;
}
.dp-rub .tap-ring { width: 12px; height: 12px; }
.dp-rub.is-gone { opacity: 0; }
.dp-body { padding: 18px 8px 0; }
.dp-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 12.5);
  line-height: 1.05;
}
.dp-name small { font-family: var(--f-body); font-size: 15px; font-weight: 700; color: var(--ink-3); }
.dp-hook { margin-top: 8px; font-family: var(--f-hand); font-size: 21px; line-height: 1.3; color: var(--red); }
.dp-fields { display: grid; gap: 8px; margin-top: 16px; }
.dp-field { display: flex; align-items: stretch; }
.lbl {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 17px 3px 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.dp-field .val {
  flex: 1;
  margin-left: -8px;
  padding: 4px 10px 3px 16px;
  border: 1.5px solid var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.45;
}
.dp-sec { margin-top: 24px; }
.dp-sec > .lbl { margin-bottom: 10px; }
.dp-lines {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 4px 12px 8px 40px;
  background: #fffdf8 repeating-linear-gradient(transparent 0 33px, rgba(110, 150, 200, .32) 33px 34px);
  background-position: 0 4px;
  box-shadow: inset 0 0 0 1.5px rgba(34, 30, 26, .1);
  font-family: var(--f-hand);
  font-size: 18.5px;
  line-height: 34px;
  color: #2b3a5a;
}
.dp-lines::before { content: ''; position: absolute; left: 28px; top: 0; bottom: 0; width: 1.5px; background: rgba(210, 65, 47, .45); }
.dp-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.dp-tips li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 600; line-height: 1.45; }
.dp-tips svg { width: 24px; height: 24px; flex: none; }
.dp-kin, .dp-go { display: flex; flex-wrap: wrap; gap: 10px; }
.dp-go { margin-top: 26px; }
.dp-kin .pill img, .dp-go .pill img { width: 30px; height: 30px; object-fit: contain; margin: -6px 0 -6px -8px; }
.dp-kin .pill small { font-weight: 600; color: var(--ink-3); font-size: 12.5px; }
.detail-bar {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 14px 0;
  pointer-events: none;
}
.detail-bar > * { pointer-events: auto; }
.detail-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
}
.detail-close svg { width: 18px; height: 18px; }
.detail-close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.detail-idx {
  padding: 5px 13px 4px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}
.detail-idx b { color: var(--gold); }
.detail-nav {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 30px 12px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(139, 134, 125, 0), rgba(139, 134, 125, .92) 55%);
  pointer-events: none;
}
.detail-prev, .detail-next {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 48%;
  padding: 5px 12px 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: auto;
}
.detail-next { padding: 5px 8px 5px 12px; }
.detail-prev:active, .detail-next:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.detail-prev img, .detail-next img { width: 30px; height: 30px; object-fit: contain; margin: -6px 0; }
.detail-prev svg, .detail-next svg { width: 16px; height: 16px; flex: none; }

/* ---------- 照片墙 ---------- */
.wall {
  padding: calc(var(--u) * 14) 0 calc(var(--u) * 10);
  background: #ebe4d8 url('../img/wall.webp');
  background-size: 256px;
}
.wall-board { position: relative; height: calc(var(--u) * 282); }
.pol {
  position: absolute;
  margin: 0;
  width: calc(var(--u) * 42);
  padding: calc(var(--u) * 2.6) calc(var(--u) * 2.6) calc(var(--u) * 10);
  background: #fffdf9;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .07), 0 14px 22px -12px rgba(0, 0, 0, .45);
  transform-origin: 50% 0;
  transform: rotate(var(--r, 0deg));
  will-change: transform;
  cursor: pointer;
}
.pol > img, .dev-frame { width: 100%; aspect-ratio: 1; object-fit: cover; background: #ddd5c8; }
.pol figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--u) * 2.6);
  text-align: center;
  font-family: var(--f-hand);
  font-size: calc(var(--u) * 4.4);
  line-height: 1.2;
  color: var(--ink-2);
}
.washi {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(var(--u) * -3);
  width: calc(var(--u) * 18);
  height: calc(var(--u) * 6);
  margin-left: calc(var(--u) * -9);
  background: rgba(244, 198, 204, .82);
  transform: rotate(-5deg);
  clip-path: polygon(0 6%, 6% 0, 12% 8%, 18% 0, 82% 4%, 88% 0, 94% 7%, 100% 2%, 100% 96%, 94% 100%, 88% 92%, 82% 100%, 18% 97%, 12% 100%, 6% 92%, 0 100%);
}
.washi.w2 { background: rgba(201, 221, 242, .88); transform: rotate(4deg); }
.washi.w3 { background: rgba(246, 231, 184, .92); transform: rotate(-2deg); }
.note {
  position: absolute;
  width: calc(var(--u) * 34);
  padding: calc(var(--u) * 4) calc(var(--u) * 3) calc(var(--u) * 3.6);
  background: var(--pink);
  font-family: var(--f-hand);
  font-size: calc(var(--u) * 5);
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 10px 16px -10px rgba(0, 0, 0, .4);
  transform-origin: 50% 0;
  transform: rotate(var(--r, 0deg));
  will-change: transform;
}
.note::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -7px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 12%, var(--pin, var(--red)) 30% 100%);
  box-shadow: 2px 3px 3px rgba(0, 0, 0, .22);
}
.wall-title {
  --r: -3deg;
  left: calc(var(--u) * 5);
  top: calc(var(--u) * 3);
  width: calc(var(--u) * 54);
  padding: calc(var(--u) * 7) calc(var(--u) * 5) calc(var(--u) * 5);
  background: var(--cream);
  text-align: left;
}
.wall-title h2 { font-size: calc(var(--u) * 11.5); }
.wall-title p { margin-top: 8px; font-family: var(--f-body); font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.p2 { --r: 6deg; left: calc(var(--u) * 61); top: calc(var(--u) * 7); width: calc(var(--u) * 35); }
.p1 { --r: -4deg; left: calc(var(--u) * 4); top: calc(var(--u) * 56); width: calc(var(--u) * 46); }
.n1 { --r: 5deg; left: calc(var(--u) * 57); top: calc(var(--u) * 60); }
.p3 { --r: -3deg; left: calc(var(--u) * 52); top: calc(var(--u) * 90); width: calc(var(--u) * 44); }
.p4 { --r: 4deg; left: calc(var(--u) * 7); top: calc(var(--u) * 118); width: calc(var(--u) * 40); }
.n2 { --r: -5deg; left: calc(var(--u) * 57); top: calc(var(--u) * 148); background: var(--cream); --pin: var(--gold); }
.p6 { --r: 3deg; left: calc(var(--u) * 5); top: calc(var(--u) * 172); width: calc(var(--u) * 52); }
.p5 { --r: -6deg; left: calc(var(--u) * 61); top: calc(var(--u) * 180); width: calc(var(--u) * 35); }
.n3 { --r: 3deg; left: calc(var(--u) * 55); top: calc(var(--u) * 228); width: calc(var(--u) * 40); background: var(--blue); }
.p7 { --r: -3deg; left: calc(var(--u) * 9); top: calc(var(--u) * 238); width: calc(var(--u) * 34); }
.n4 { --r: -4deg; left: calc(var(--u) * 47); top: calc(var(--u) * 256); width: calc(var(--u) * 40); background: var(--blue); --pin: var(--gold); }
.dev { cursor: default; }
.dev-frame { position: relative; overflow: hidden; }
.dev-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.25) sepia(.35) brightness(1.05) blur(2px); transition: filter 1.6s; }
.dev-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.dev.is-done .dev-frame img { filter: none; }
.dev-done { display: none; }
.dev.is-done .dev-hint { display: none; }
.dev.is-done .dev-done { display: inline; }
.dev-hint { color: var(--red); }
.blank { cursor: default; }
.blank-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px dashed rgba(34, 30, 26, .32);
  font-family: var(--f-hand);
  font-size: calc(var(--u) * 5);
  line-height: 1.4;
  text-align: center;
  color: var(--ink-3);
}

/* ---------- 结尾：甜瓜蹭手，营业时间 ---------- */
.end {
  --edge: #ebe4d8;
  padding: calc(var(--u) * 16) calc(var(--u) * 6) calc(var(--u) * 10 + env(safe-area-inset-bottom));
  background: var(--kraft) url('../img/kraft.webp');
  background-size: 256px;
}
.palm-head blockquote {
  margin: 0;
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 7.6);
  line-height: 1.5;
}
.palm-sign {
  margin-top: 6px;
  text-align: right;
  font-family: var(--f-hand);
  font-size: 20px;
  color: var(--ink-2);
}
.palm-stage {
  position: relative;
  height: calc(var(--u) * 84);
  margin: calc(var(--u) * 4) calc(var(--u) * -6) 0;
  overflow: hidden;
}
.palm-stage::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--u) * 12);
  background: #ead7b9;
  border-top: 2.5px solid var(--ink);
}
.palm-cat {
  position: absolute;
  z-index: 2;
  left: calc(var(--u) * 6);
  bottom: calc(var(--u) * 9);
  width: calc(var(--u) * 46);
  transform-origin: 50% 100%;
  will-change: transform;
}
.palm-cat img { width: 100%; height: auto; pointer-events: none; }
.palm-kid { z-index: 1; width: calc(var(--u) * 30); left: calc(var(--u) * -40); }
.palm-hand {
  position: absolute;
  z-index: 3;
  right: calc(var(--u) * 6);
  bottom: 0;
  width: calc(var(--u) * 30);
  transform-origin: 50% 100%;
  transform: translateY(62%);
  will-change: transform;
}
.palm-hand svg { width: 100%; height: auto; aspect-ratio: 120 / 170; }
.palm-sleeve {
  position: absolute;
  left: 18%;
  right: 12%;
  top: 92%;
  height: 110%;
  background: var(--blue) repeating-linear-gradient(90deg, transparent 0 7px, rgba(34, 30, 26, .1) 7px 9px);
  border: 2.5px solid var(--ink);
  border-radius: 8px 8px 0 0;
}
.palm-fx { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.palm-count {
  position: absolute;
  z-index: 6;
  right: calc(var(--u) * 6);
  top: calc(var(--u) * 3);
  padding: 4px 12px 3px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 800;
}
.palm-count b { font-size: 16px; color: var(--red); }
.palm-btn {
  display: block;
  width: 100%;
  margin-top: calc(var(--u) * 5);
  padding: 17px 16px 16px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .06em;
  box-shadow: 0 5px 0 #000;
  touch-action: none;
  -webkit-touch-callout: none;
  transition: transform .08s, box-shadow .08s;
}
.palm-btn.is-down { transform: translateY(4px); box-shadow: 0 1px 0 #000; }

.sign-wrap { position: relative; height: calc(var(--u) * 96); margin-top: calc(var(--u) * 18); perspective: 1000px; }
.nail {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 12%, #a39d95 40%, #4b443d 100%);
  box-shadow: 1px 3px 4px rgba(0, 0, 0, .35);
}
.sign-swing {
  position: absolute;
  left: 50%;
  top: 7px;
  width: calc(var(--u) * 76);
  margin-left: calc(var(--u) * -38);
  transform-origin: 50% 0;
  will-change: transform;
  transform-style: preserve-3d;
}
.sign-cord { width: 100%; height: calc(var(--u) * 15); }
.sign {
  position: relative;
  display: block;
  width: 100%;
  height: calc(var(--u) * 66);
  margin-top: -3px;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.3, 1.35, .5, 1);
}
.sign.is-flipped { transform: rotateY(180deg); }
.sign-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 3);
  padding: calc(var(--u) * 5);
  border: 3px solid var(--ink);
  border-radius: 16px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: 0 18px 26px -14px rgba(0, 0, 0, .55);
}
.sign-front {
  background: #c99a66 repeating-linear-gradient(176deg, transparent 0 18px, rgba(120, 72, 30, .13) 18px 20px, transparent 20px 37px, rgba(255, 240, 220, .12) 37px 39px);
  color: var(--paper);
}
.sign-front::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1.5px dashed rgba(251, 247, 239, .55);
  border-radius: 10px;
  pointer-events: none;
}
.sign-back { background: var(--paper); transform: rotateY(180deg); }
.sign-title {
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 9);
  line-height: 1;
  letter-spacing: .08em;
  color: var(--paper);
  text-shadow: 0 2px 0 rgba(90, 50, 20, .35);
}
.hours { display: grid; gap: 4px; text-align: center; }
.hours .h-days { font-size: calc(var(--u) * 4.6); font-weight: 700; letter-spacing: .3em; }
.hours .h-time { font-family: var(--f-serif); font-weight: 900; font-size: calc(var(--u) * 9); line-height: 1.1; letter-spacing: .02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hours .h-note { font-size: calc(var(--u) * 4); font-weight: 600; opacity: .92; }
.sign-big {
  font-family: var(--f-serif);
  font-weight: 900;
  font-size: calc(var(--u) * 11);
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
}
.sign-paws { display: flex; gap: calc(var(--u) * 3); color: var(--red); opacity: .8; }
.sign-paws svg { width: calc(var(--u) * 6); height: calc(var(--u) * 6); transform: rotate(-14deg); }
.sign-paws svg:nth-child(2) { transform: translateY(calc(var(--u) * -2.4)) rotate(6deg); }
.sign-paws svg:nth-child(3) { transform: rotate(-10deg); }
.sign-tip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--u) * 1);
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-2);
}
.app { margin-top: calc(var(--u) * 6); text-align: center; }
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 16px 16px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: 0 5px 0 #000;
}
.app-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #000; }
.app-btn svg { width: 22px; height: 22px; color: var(--gold); }
.app-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px 13px;
  border: 2px dashed rgba(34, 30, 26, .45);
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.app-info svg { width: 24px; height: 24px; flex: none; color: var(--red); }
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: calc(var(--u) * 12);
  font-size: 12px;
  color: var(--ink-2);
}
.foot-name { font-family: var(--f-serif); font-weight: 900; font-size: 20px; letter-spacing: .1em; color: var(--ink); }

.rotate { display: none; }
@media (orientation: landscape) and (max-height: 520px) and (hover: none) {
  .rotate {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: var(--felt) url('../img/felt.webp');
    background-size: 256px;
    font-family: var(--f-serif);
    font-weight: 900;
    font-size: 22px;
  }
}
.noscript { padding: 40px 24px; text-align: center; background: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  .hero-cue svg, .tray-hint, .tap-ring::before, .tap-ring::after { animation: none; }
  .intro-text .ln { transition: opacity .3s; transform: none; }
}
