:root {
  --paper: #f7efe1; --panel: #fff8ec; --ink: #5b3f2e; --ink-soft: #8b6a55;
  --orange: #f28c3a; --mint: #a8dcc8; --pink: #f3a6a6; --sky: #cfe8f3; --sea: #9ed0e0; --sand: #f1dcb1; --yellow: #f5c544; --green: #7cc6a0;
  --border: 3px solid var(--ink);
  --shadow: 0 4px 0 rgba(91, 63, 46, 0.18);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: Nunito, ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, -apple-system, "Segoe UI", "PingFang SC", sans-serif; font-weight: 700; }
body { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>"); }
#app { max-width: 480px; margin: 0 auto; min-height: 100%; height: 100%; display: flex; flex-direction: column; position: relative; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; flex-shrink: 0; }
.top > * + * { margin-left: 8px; }
.logo { font-size: 20px; font-weight: 900; letter-spacing: 1px; color: var(--orange); text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, 0 3px 0 rgba(91,63,46,.25); white-space: nowrap; }
.res { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.res > * { margin-left: 6px; }
.chip { background: var(--panel); border: var(--border); border-radius: 999px; padding: 3px 8px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip b { font-weight: 900; }
.chip.heart { background: #fde3e3; }
.clock { display: flex; justify-content: space-between; align-items: center; padding: 0 16px 6px; font-size: 12px; color: var(--ink-soft); flex-shrink: 0; }
.clock .attr { font-size: 11px; flex: 1; text-align: center; }
.status { border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 11px; background: #eee2cd; color: var(--ink); }
.status.on { background: var(--green); color: #fff; }

/* scene */
.booting { pointer-events: none; }
.scene { cursor: pointer; position: relative; isolation: isolate; margin: 0 10px; height: 470px; flex: 0 1 470px; min-height: 320px; border: var(--border); border-radius: 22px; overflow: hidden; background: var(--sky); box-shadow: var(--shadow); }
.scene .bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
.gate { position: absolute; left: 10px; top: 10px; font-size: 11px; background: rgba(255, 248, 236, 0.94); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 9px; z-index: 140; max-width: 58%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tint { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 1; transition: background 1.6s; mix-blend-mode: multiply; }
.scene[data-tod="dawn"] .tint { background: rgba(255, 196, 160, 0.10); }
.scene[data-tod="dusk"] .tint { background: rgba(255, 160, 90, 0.16); }
.scene[data-tod="night"] .tint { background: rgba(46, 52, 120, 0.42); }
.scene::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 2; opacity: .5; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0.09 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); }
#stars, #moon { opacity: 0; transition: opacity 1.6s; }
#sun { transition: opacity 1.6s; }
.scene[data-tod="night"] #stars, .scene[data-tod="night"] #moon { opacity: 1; }
.scene[data-tod="night"] #sun { opacity: 0; }
.cloud { animation: drift 18s ease-in-out infinite alternate; }
.cloud.c2 { animation-duration: 24s; animation-delay: -6s; }
@keyframes drift { from { transform: translateX(-10px) } to { transform: translateX(16px) } }
@supports (transform-box: fill-box) { .sparkle path { animation: twinkle 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; } }
.sparkle path:nth-child(2) { animation-delay: .9s; } .sparkle path:nth-child(3) { animation-delay: 1.8s; }
@keyframes twinkle { 0%,100% { opacity: .2; transform: scale(.6) } 50% { opacity: 1; transform: scale(1) } }
.waves path { animation: wave 3.2s ease-in-out infinite; }
.waves path:nth-child(2n) { animation-delay: -1.4s; }
@keyframes wave { 0%,100% { transform: translateX(0) } 50% { transform: translateX(6px) } }
.foam { animation: foam 6s linear infinite; }
@keyframes foam { to { stroke-dashoffset: -72; } }
.flash { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 300; }
.flash.on { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .85 } 100% { opacity: 0 } }

.visitors { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.visitors span { position: absolute; transform: translate(-50%, -100%); animation: hop 2.6s ease-in-out infinite; }
.visitors svg { display: block; }
@keyframes hop { 0%,100% { transform: translate(-50%, -100%) } 50% { transform: translate(-50%, -106%) } }
#facilities, .parkprops { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.parkprops svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.fac { position: absolute; transform: translate(-50%, -100%) scale(var(--fs, 1)); transform-origin: 50% 100%; filter: drop-shadow(0 2px 0 rgba(91,63,46,.12)); }
.fac.new { animation: built .5s ease-out; }
.fac svg { display: block; }
@keyframes built { 0% { transform: translate(-50%, -100%) scale(.4); opacity: 0 } 70% { transform: translate(-50%, -100%) scale(1.08) } 100% { transform: translate(-50%, -100%) scale(var(--fs, 1)) } }
.rope { position: absolute; left: 0; right: 0; top: 63.5%; height: 22px; pointer-events: none; }
.rope svg, .deck svg { width: 100%; height: 100%; display: block; }
.deck { position: absolute; left: 0; right: 0; top: 37.4%; height: 13px; pointer-events: none; }
.goalchip { position: absolute; right: 10px; top: 10px; z-index: 140; font: inherit; font-size: 11px; color: var(--ink); background: rgba(255,248,236,.94); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 9px; box-shadow: var(--shadow); }
.goalchip.all { background: var(--yellow); }
.seal { pointer-events: none; position: absolute; width: calc(104px * var(--k, 1) * var(--dens, 1)); transform: translate(-50%, -50%); transition: left 1.2s ease-in-out, top 1.2s ease-in-out; }
.seal.pup { width: calc(84px * var(--k, 1) * var(--dens, 1)); }
.seal.big { width: calc(150px * var(--k, 1) * var(--dens, 1)); }
.seal.water .art { clip-path: inset(0 0 30% 0); }
.seal.water::after { content: ""; position: absolute; left: 14%; right: 14%; top: 62%; height: 9px; border: 2.5px solid rgba(255,255,255,.9); border-top: none; border-radius: 0 0 50% 50%; animation: ripple 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes ripple { 0%,100% { transform: scaleX(.9); opacity: .7 } 50% { transform: scaleX(1.08); opacity: 1 } }
@supports (transform-box: fill-box) { .seal .eye { animation: blink 5.5s infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1) } 95.5% { transform: scaleY(.12) } }
.seal svg { width: 100%; height: auto; display: block; }
.seal.land .sv svg { animation: breathe 3s ease-in-out infinite; transform-origin: 50% 90%; }
.seal.water .sv svg { animation: bob 2.6s ease-in-out infinite; }
.seal.pop svg { animation: pop .5s ease-out; }
@keyframes breathe { 0%,100% { transform: scale(1,1) } 50% { transform: scale(1.02,0.98) } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1deg) } 50% { transform: translateY(5px) rotate(1.5deg) } }
@keyframes pop { 0% { transform: scale(1) } 40% { transform: scale(1.12,0.9) } 70% { transform: scale(0.96,1.06) } 100% { transform: scale(1) } }
.bubble { position: absolute; left: 60%; top: -4px; background: var(--panel); border: 2px solid var(--ink); border-radius: 14px 14px 14px 3px; padding: 2px 7px; font-size: 12px; width: max-content; max-width: 160px; line-height: 1.35; z-index: 4; box-shadow: var(--shadow); animation: bubblein .3s ease-out; }
/* 普通说话：淡淡的纸片，点了只是逗它玩 */
.bubble.say { background: rgba(255,248,236,.9); border: 1.5px solid var(--ink-soft); color: var(--ink-soft); box-shadow: none; font-weight: 600; }
/* 想要东西：亮橙边 + 跳动，req 还有倒计时条，点了有奖励 */
.bubble.req, .bubble.need { border: 2.5px solid var(--orange); }
.bubble.need { background: #fff; font-weight: 800; }
.bubble.req::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--orange); transform-origin: left; animation: reqtimer 11s linear forwards; }
@keyframes reqtimer { to { transform: scaleX(0); } }
.bubble.req { overflow: hidden; background: #fff; font-size: 13px; padding: 3px 9px; left: 50%; top: -14px; transform: translateX(-50%); border-radius: 14px; animation: reqbob 1s ease-in-out infinite; box-shadow: 0 3px 0 rgba(91,63,46,.25), 0 0 0 4px rgba(255,255,255,.5); }
@keyframes reqbob { 0%,100% { transform: translate(-50%, 0) } 50% { transform: translate(-50%, -4px) } }
.cam { position: absolute; right: 0; top: -20px; z-index: 5; font-size: 18px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.7); animation: campulse .7s ease-in-out infinite alternate; }
.cam.hidden { display: none; }
@keyframes campulse { from { transform: scale(.92) rotate(-6deg) } to { transform: scale(1.1) rotate(6deg) } }
.bubble.hidden { display: none; }
/* 靠屏幕边的海豹：泡泡和相机往里长，不能跑到屏幕外面 */
.seal.side-r .bubble, .bubwrap.side-r .bubble { left: auto; right: 34%; border-radius: 14px 14px 3px 14px; }
.seal.side-r .bubble.req, .bubwrap.side-r .bubble.req { right: 0; transform: none; border-radius: 14px; animation-name: reqbobside; }
.seal.side-l .bubble.req, .bubwrap.side-l .bubble.req { left: 0; transform: none; animation-name: reqbobside; }
.seal.side-r .cam, .bubwrap.side-r .cam { right: auto; left: 0; }
@keyframes reqbobside { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
@keyframes bubblein { from { transform: scale(.6); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.name-tag i { font-style: normal; color: #e0697a; font-weight: 900; }
.name-tag { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); font-size: 10px; background: rgba(255,248,236,.92); border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nametags { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 135; }
.nametags .name-tag { bottom: auto; transition: left 1.2s ease-in-out, top 1.2s ease-in-out; }
.float { position: absolute; transform: translate(-50%, -50%); font-size: 13px; font-weight: 900; color: var(--orange); text-shadow: -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px 1.5px 0 #fff; z-index: 230; pointer-events: none; animation: rise 1.4s ease-out forwards; white-space: nowrap; }
.float.heart { color: #e25d7a; font-size: 16px; }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, -30%) } 15% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -140%) } }

/* open button + bottom bar */
.openbtn { flex-shrink: 0; margin: 10px 12px 0; border: var(--border); border-radius: 16px; padding: 12px; font-size: 17px; font-weight: 900; color: #fff; background: var(--orange); box-shadow: var(--shadow); font-family: inherit; }
.openbtn.open { background: var(--green); }
.bottom { flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-gap: 6px; padding: 10px 10px 18px; }
.bottom button { background: var(--panel); border: var(--border); border-radius: 16px; padding: 9px 2px; font-size: 13px; font-weight: 800; color: var(--ink); box-shadow: var(--shadow); font-family: inherit; }
.bottom button .ico { display: block; font-size: 22px; margin-bottom: 2px; }

/* modal */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(91, 63, 46, 0.35); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.modal.hidden { display: none; }
.sheet { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; background: var(--panel); border: var(--border); border-bottom: none; border-radius: 26px 26px 0 0; padding: 14px 16px 24px; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
.sheet h2 { margin: 0; font-size: 21px; font-weight: 900; display: flex; align-items: baseline; flex-wrap: wrap; }
.sheet h2 small { margin-left: 8px; }
.sheet h2 small, .sheet h3 small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.sheet h3 { margin: 12px 0 4px; font-size: 15px; font-weight: 900; display: flex; align-items: baseline; flex-wrap: wrap; }
.sheet h3 small { margin-left: 6px; }
.sheet .origin { font-size: 12px; color: var(--ink-soft); margin: 2px 0 8px; line-height: 1.5; }
.card-top { display: flex; align-items: center; }
.card-top > * + * { margin-left: 10px; }
.card-top .portrait { width: 140px; flex: none; background: var(--sky); border: 2px solid var(--ink); border-radius: 18px; }
.card-top .portrait svg { width: 100%; height: auto; display: block; }
.tags { display: flex; flex-wrap: wrap; }
.tags > * { margin: 0 5px 5px 0; }
.tag { background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; font-size: 11px; padding: 1px 8px; }
.meter { margin: 8px 0 2px; font-size: 12px; }
.meter .track { height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: #eee2cd; overflow: hidden; margin-top: 3px; }
.meter .track i { display: block; height: 100%; background: var(--orange); transition: width .4s; }
.meter .track i.pink { background: var(--pink); }
.meter .track i.mint { background: var(--mint); }
.meter .track i.heart { background: linear-gradient(90deg, #f3a6a6, #e25d7a); }
.tag.fav { background: #fde3e3; }
.album { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 6px; margin-top: 6px; }
.photo { background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 4px 4px 3px; text-align: center; transform: rotate(-2deg); box-shadow: var(--shadow); }
.photo:nth-child(2n) { transform: rotate(2deg); }
.photo .ph { position: relative; background: var(--sky); border-radius: 4px; padding-top: 100%; overflow: hidden; }
.photo .ph > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.photo .ph svg { width: 100%; height: auto; display: block; }
.photo small { display: block; font-size: 9.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo.none { border-style: dashed; box-shadow: none; background: #f6efe3; }
.photo.none .ph { background: #ebe2d3; color: var(--ink-soft); font-size: 20px; }
.happy { margin-top: 10px; background: #fde9ec; border: 2px solid var(--ink); border-radius: 12px; padding: 7px 10px; font-size: 13px; line-height: 1.5; }
.goals-row { display: flex; flex-direction: column; margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.goals-row > * + * { margin-top: 2px; }
.goals-row .done { color: var(--ink); }
.stages { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-soft); margin-top: 2px; }
.kv { font-size: 13px; margin-top: 8px; line-height: 1.5; }
.kv b { color: var(--orange); }
.actions { display: flex; margin-top: 14px; }
.actions > * + * { margin-left: 8px; }
.actions button { flex: 1; border: var(--border); border-radius: 14px; padding: 10px; font-weight: 900; font-size: 15px; font-family: inherit; color: var(--ink); background: var(--panel); box-shadow: var(--shadow); }
.actions button.primary { background: var(--orange); color: #fff; }

.list { display: flex; flex-direction: column; margin-top: 8px; }
.list > * + * { margin-top: 8px; }
.item { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 14px; padding: 8px 10px; background: #fff; }
.item > * + * { margin-left: 10px; }
.item .ico { font-size: 26px; flex: none; }
.item .ico.ghost { width: 56px; height: 56px; }
.item .ico.ghost svg { width: 100%; height: 100%; }
.item .t { flex: 1; font-size: 13px; line-height: 1.4; min-width: 0; }
.item .t small { display: block; color: var(--ink-soft); font-weight: 600; }
.item button { border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; font-weight: 900; font-family: inherit; background: var(--yellow); color: var(--ink); white-space: nowrap; }
.item button:disabled { background: #e8dfd0; color: var(--ink-soft); }
.item button.dim { background: #f3e9d6; color: var(--ink-soft); }
.item button.info { background: var(--sky); color: var(--ink); } /* 能点、但只是看信息：比黄色的主操作弱，又不像灰色的不能点 */
.item.owned { background: #eef8f3; }
.item.locked .ico.ghost svg { filter: grayscale(1) contrast(0.15) brightness(0.75); opacity: .75; }

.dex { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; margin-top: 8px; }
.dex-cell { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 6px 6px 8px; text-align: center; cursor: pointer; box-shadow: var(--shadow); }
.dex-cell .ph { background: var(--sky); border-radius: 10px; overflow: hidden; }
.dex-cell .ph svg { width: 100%; height: auto; display: block; }
.dex-cell .cap { font-size: 12px; font-weight: 900; margin-top: 5px; }
.dex-cell .cap small { display: block; font-size: 10px; color: var(--ink-soft); font-weight: 600; }
.dex-cell.gold { border-color: #d9a520; box-shadow: 0 0 0 3px #f5c544, var(--shadow); }
.dex-cell.ghost { background: #efe8dc; border-style: dashed; box-shadow: none; }
.dex-cell.ghost .ph { background: #e4dccd; }
.dex-cell.ghost .ph svg { filter: grayscale(1) contrast(0.15) brightness(0.75); opacity: 0.75; }
.dex-cell.ghost .cap { color: var(--ink-soft); }

.ledger { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.ledger td { padding: 6px 4px; border-bottom: 1.5px dashed #d9cbb3; }
.ledger td.num { text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--orange); }
.ledger tr.total td { border-bottom: none; border-top: 2px solid var(--ink); font-weight: 900; font-size: 16px; }
.empty { text-align: center; color: var(--ink-soft); padding: 30px 0; font-size: 13px; }

/* 提示条：偏白、半透明的小卡片，一只豹竹趴在上沿 */
.toast { pointer-events: none; position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(255,251,243,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 18px; padding: 9px 16px 8px; font-size: 13.5px; font-weight: 800; line-height: 1.45; z-index: 30; box-shadow: 0 5px 0 rgba(91,63,46,.18); width: max-content; max-width: min(78%, 300px); text-align: center; }
.toast.pop { animation: toastin .28s ease-out; }
.toast .tseal { position: absolute; right: 12px; top: -40px; width: 58px; display: block; }
.toast .tseal svg { display: block; width: 58px; height: auto; filter: drop-shadow(0 2px 0 rgba(91,63,46,.18)); }
.toast .tmsg { display: block; }
@keyframes toastin { from { transform: translateX(-50%) translateY(8px) scale(.92); opacity: 0 } to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1 } }
.toast.hidden { display: none; }
@media (prefers-reduced-motion: reduce) { .seal svg, .seal .eye, .visitors span, .float, .cloud, .waves path, .sparkle path, .foam, .bubble.req, .bubble.req::after, .cam, .decor-duck svg, .decor-pinwheel .spin { animation: none !important; } }

/* v0.4 · 分页面板 */
.tabs { display: flex; margin: 8px 0 6px; overflow-x: auto; scrollbar-width: none; }
.tabs > * + * { margin-left: 6px; }
.tabs button { flex: 1 0 auto; border: 2px solid var(--ink); border-radius: 999px; padding: 5px 8px; font: inherit; font-size: 12.5px; font-weight: 800; background: #fff; color: var(--ink-soft); white-space: nowrap; }
.tabs button.on { background: var(--orange); color: #fff; box-shadow: var(--shadow); }
.tabbody { min-height: 150px; }
.meters2 { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 0 10px; }
.card-top .tags .origin { margin: 0 0 4px; }
.pager { display: flex; justify-content: center; align-items: center; margin-top: 8px; font-weight: 900; font-size: 13px; }
.pager > * + * { margin-left: 12px; }
.pager button { border: 2px solid var(--ink); border-radius: 999px; width: 34px; height: 30px; font: inherit; font-size: 16px; font-weight: 900; background: var(--yellow); color: var(--ink); }
.pager button:disabled { background: #e8dfd0; color: var(--ink-soft); }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: min-content; grid-gap: 6px; margin-top: 4px; min-height: 172px; }
.tiles.three { min-height: 0; }
.tiles.three { grid-template-columns: repeat(3, 1fr); grid-gap: 8px; }
.tile { border: 2px solid var(--ink); border-radius: 12px; background: #fff; padding: 6px 2px 5px; font: inherit; font-size: 11px; font-weight: 800; color: var(--ink); display: flex; flex-direction: column; align-items: center; line-height: 1.25; cursor: pointer; }
.tile > * + * { margin-top: 1px; }
.tile .big { font-size: 24px; line-height: 1.1; }
.tile small { font-size: 10px; color: var(--ink-soft); font-weight: 700; }
.tile em { font-style: normal; font-size: 9.5px; color: #4f9b78; }
.tile.owned { background: #eef8f3; }
.tile.on { background: #fff3d6; box-shadow: 0 0 0 3px var(--yellow); }
.tile.on small { color: var(--orange); }
.tiles.three .tile { font-size: 14px; padding: 8px 4px; }
.tiles.three .tile small { font-size: 12px; }
.hungry { font-size: 12px; margin: 10px 0 2px; display: flex; flex-wrap: wrap; align-items: center; color: var(--ink-soft); }
.hungry span { margin: 0 0 2px 4px; }
.hungry span { background: #fde3c8; border-radius: 999px; padding: 1px 8px; color: var(--ink); font-weight: 800; }
.picker { display: flex; overflow-x: auto; padding: 4px 2px 6px; margin: 2px -2px 0; scrollbar-width: thin; }
.picker > * + * { margin-left: 6px; }
.pk { flex: none; width: 62px; border: 2px solid transparent; border-radius: 12px; background: #fff; padding: 2px 0 3px; font: inherit; font-size: 10px; font-weight: 800; color: var(--ink); }
.pk svg { width: 100%; height: auto; display: block; }
.pk.on { border-color: var(--ink); background: #fff3d6; }
.wear-preview { display: flex; align-items: center; background: var(--sky); border-radius: 14px; padding: 2px 10px 2px 2px; }
.wear-preview > * + * { margin-left: 10px; }
.wear-preview .pv { width: 112px; flex: none; }
.wear-preview .pv svg { width: 100%; height: auto; display: block; }
.wear-preview .t { font-size: 14px; line-height: 1.5; }
.wear-preview small { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.wear-row { display: flex; align-items: baseline; margin: 6px 0; font-size: 13px; }
.wear-row > * + * { margin-left: 8px; }
.wear-row > b { flex: none; width: 34px; }
.chips { display: flex; flex-wrap: wrap; }
.chips > * { margin: 0 5px 5px 0; }
.chips small { color: var(--ink-soft); font-size: 11px; }
.chip { border: 2px solid var(--ink); border-radius: 999px; padding: 2px 9px; background: #fff; font: inherit; font-size: 12px; font-weight: 800; color: var(--ink); }
.chip.on { background: var(--yellow); }
.dex { grid-template-columns: repeat(4, 1fr); grid-gap: 8px; }
.dex-cell { padding: 4px 4px 6px; }
/* 园区装饰 */
.decor-bunting, .decor-lights { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 25; }
.decor-bunting { top: 21%; height: 5%; }
.decor-lights { top: 27.5%; height: 4%; }
.decor-bunting svg, .decor-lights svg { width: 100%; height: 100%; display: block; }
#scene[data-tod="dusk"] .decor-lights .bulb, #scene[data-tod="night"] .decor-lights .bulb { fill: #ffd66b; filter: drop-shadow(0 0 3px #ffcf5a); }
.decor-duck svg { animation: bob 3.2s ease-in-out infinite; }
@supports (transform-box: view-box) { .decor-pinwheel .spin { animation: spin 3s linear infinite; transform-box: view-box; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 420px) { .dex { grid-template-columns: repeat(5, 1fr); } }
.sheet.still { animation: none; }
/* 试戴 */
.tile.try { background: #fff; box-shadow: 0 0 0 3px var(--orange); }
.tile.try small { color: var(--orange); }
.tile.poor small { color: #b9a896; }
.wear-preview.trying { background: #fde3c8; }
.buy { display: block; margin-top: 5px; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 900; background: var(--orange); color: #fff; box-shadow: var(--shadow); }
.buy:disabled { background: #e8dfd0; color: var(--ink-soft); box-shadow: none; }
.wear-preview.decor { min-height: 104px; padding: 6px 10px; }
.wear-preview.decor .pv { width: 96px; display: grid; place-items: center; font-size: 40px; }
.wear-preview.decor .pv svg { width: 100%; height: auto; max-height: 90px; }
/* 声音按钮：小目标下面 */
.soundbtn { position: absolute; left: 10px; top: 50px; z-index: 140; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); background: var(--panel); font-size: 16px; line-height: 1; padding: 0; box-shadow: var(--shadow); cursor: pointer; }
/* 小工具容器：触摸、安全区、让开宿主按钮 */
html { touch-action: manipulation; }
body { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.top { padding-top: 12px; padding-top: calc(10px + var(--host-top, var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))); }
.bottom { padding-bottom: 18px; padding-bottom: calc(14px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
/* 矮屏幕（高度不到 720）：主画面跟着屏幕缩（见 .scene 的 flex），按钮也收紧一点，开园按钮和底部 5 个按钮不掉到屏幕外 */
@media (max-height: 720px) { .openbtn { margin-top: 8px; padding: 9px; font-size: 16px; } .bottom { padding-top: 8px; } .bottom button { padding: 6px 2px; } .bottom button .ico { font-size: 20px; margin-bottom: 0; } .scene .soundbtn { top: 42px; } .scene .parkbtn { top: 44px; } }
.sheet { padding-bottom: 24px; padding-bottom: calc(18px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }

/* v1.1 园区 */
.parkart { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.parkart svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.flake, .petal { position: absolute; top: -12px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(91,63,46,.18); animation: fall 9s linear infinite; }
.petal { width: 7px; height: 5px; border-radius: 70% 20% 70% 20%; background: #f7c3d0; box-shadow: 0 0 0 1px rgba(91,63,46,.22); }
@keyframes fall { from { transform: translate(0, 0) rotate(0) } to { transform: translate(34px, 490px) rotate(300deg) } }
.parkbtn { position: absolute; left: 52px; top: 52px; z-index: 140; font: inherit; font-size: 11px; font-weight: 800; color: var(--ink); background: rgba(255,248,236,.94); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; white-space: nowrap; box-shadow: var(--shadow); }
.fac.broken { filter: grayscale(1) opacity(.65); }
.fac.broken::after { content: "🔧"; position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); font-size: 18px; }
.parktag { font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink-soft); border: 1.5px solid var(--ink-soft); border-radius: 999px; padding: 0 5px; margin-left: 3px; white-space: nowrap; }
.parktag.home { color: #fff; background: var(--orange); border-color: var(--orange); }
.popline { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.popline button { font: inherit; font-size: 12px; font-weight: 800; color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; margin-left: 8px; white-space: nowrap; }
.signgrid { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 6px; margin-bottom: 4px; }
.signcell { border: 2px solid var(--ink); border-radius: 12px; padding: 7px 2px; text-align: center; font-size: 11px; background: #fff; min-width: 0; }
.signcell b { display: block; font-size: 10px; color: var(--ink-soft); margin-bottom: 3px; }
.signcell.big { grid-column: span 2; background: #fff3d1; }
.signcell.today { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242,140,58,.3); font-weight: 800; }
.signcell.got { opacity: .45; }
.event-art { width: 130px; margin: 2px auto 4px; }
.event-art svg { display: block; width: 100%; height: auto; }
.event-text { margin: 4px 2px 10px; font-size: 14px; line-height: 1.55; }
/* 面板打开时提示条移到上面，不挡内容 */
.modal:not(.hidden) ~ .toast { bottom: auto; top: 84px; }
.actions.stack { flex-direction: column; }
.actions.stack button { width: 100%; margin-left: 0; margin-top: 8px; flex: none; }
.actions.stack button:first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .flake, .petal { display: none; } }
.buylink { background: #fff3d1; color: var(--ink); cursor: pointer; }
.buyfav { display: block; width: 100%; margin: 0 0 10px; font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: var(--orange); border: 2px solid var(--ink); border-radius: 12px; padding: 7px 10px; text-align: center; box-shadow: var(--shadow); }
.fac.guest { pointer-events: auto; cursor: pointer; }
.guest-tag { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); font-size: 10px; font-weight: 900; background: var(--panel); border: 2px solid var(--ink); border-radius: 999px; padding: 0 6px; white-space: nowrap; }
/* 偷猎者活动：从园区边上踮着脚溜进来，戳一下抖一下，进度条满了掉头跑 */
.poacher { position: absolute; top: 76%; z-index: 220; width: 74px; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; transition: left 5s linear; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.poacher.from-l { left: -12%; } .poacher.from-l.in { left: 21%; } /* 别挡住两边换区的箭头 */
.poacher.from-r { left: 112%; } .poacher.from-r.in { left: 79%; }
.poacher .poach-art svg { width: 74px; height: auto; display: block; animation: sneak .5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.poacher.from-r .poach-art { transform: scaleX(-1); }
.poacher.hit .poach-art svg { animation: poked .25s ease-out; }
.poach-bar { position: absolute; left: 4px; right: 4px; top: -14px; height: 9px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.poach-bar i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .15s; }
.poach-tip { position: absolute; left: 50%; top: -38px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 900; color: #fff; background: #e0663a; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; animation: reqbob 1s ease-in-out infinite; }
.poacher.flee { transition: left 1s ease-in; pointer-events: none; }
.poacher.flee .poach-tip, .poacher.flee .poach-bar { display: none; }
.poacher.from-l.flee { left: -20%; } .poacher.from-r.flee { left: 120%; }
.poacher.from-l.flee .poach-art { transform: scaleX(-1); } .poacher.from-r.flee .poach-art { transform: none; }
.poacher.flee .poach-art svg { animation: sneak .12s ease-in-out infinite alternate; }
@keyframes sneak { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-3px) rotate(3deg); } }
@keyframes poked { 0% { transform: translateX(0) scale(1); } 30% { transform: translateX(-5px) scale(.93, 1.05); } 60% { transform: translateX(4px) rotate(-6deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .poacher .poach-art svg, .poach-tip { animation: none !important; } }

/* 小动作：拍肚皮、咕蛹前进、打滚……动的是 .mv（水里的海豹 .art 裁掉了水下那截，.mv 在里面动，潜水就像真的沉下去） */
.seal .mv { position: relative; transform-origin: 50% 80%; }
@keyframes galR { 0% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 5% { transform: translate(0px, 0px) rotate(0deg) scale(1.08, 0.9); } 11% { transform: translate(6px, -5px) rotate(0deg) scale(0.94, 1.07); } 16% { transform: translate(11px, 0px) rotate(0deg) scale(1.06, 0.93); } 21% { transform: translate(16px, -5px) rotate(0deg) scale(0.94, 1.07); } 26% { transform: translate(21px, 0px) rotate(0deg) scale(1.06, 0.93); } 31% { transform: translate(26px, -5px) rotate(0deg) scale(0.94, 1.07); } 36%, 50% { transform: translate(30px, 0px) rotate(0deg) scale(1, 1); } 51% { transform: translate(30px, 0px) rotate(0deg) scale(-1, 1); } 56% { transform: translate(30px, 0px) rotate(0deg) scale(-1.08, 0.9); } 62% { transform: translate(24px, -5px) rotate(0deg) scale(-0.94, 1.07); } 68% { transform: translate(18px, 0px) rotate(0deg) scale(-1.06, 0.93); } 74% { transform: translate(12px, -5px) rotate(0deg) scale(-0.94, 1.07); } 80% { transform: translate(6px, 0px) rotate(0deg) scale(-1.06, 0.93); } 86% { transform: translate(2px, -3px) rotate(0deg) scale(-0.97, 1.04); } 92%, 99% { transform: translate(0px, 0px) rotate(0deg) scale(-1, 1); } 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } }
@keyframes galL { 0% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 5% { transform: translate(0px, 0px) rotate(0deg) scale(1.08, 0.9); } 11% { transform: translate(-6px, -5px) rotate(0deg) scale(0.94, 1.07); } 16% { transform: translate(-11px, 0px) rotate(0deg) scale(1.06, 0.93); } 21% { transform: translate(-16px, -5px) rotate(0deg) scale(0.94, 1.07); } 26% { transform: translate(-21px, 0px) rotate(0deg) scale(1.06, 0.93); } 31% { transform: translate(-26px, -5px) rotate(0deg) scale(0.94, 1.07); } 36%, 50% { transform: translate(-30px, 0px) rotate(0deg) scale(1, 1); } 51% { transform: translate(-30px, 0px) rotate(0deg) scale(-1, 1); } 56% { transform: translate(-30px, 0px) rotate(0deg) scale(-1.08, 0.9); } 62% { transform: translate(-24px, -5px) rotate(0deg) scale(-0.94, 1.07); } 68% { transform: translate(-18px, 0px) rotate(0deg) scale(-1.06, 0.93); } 74% { transform: translate(-12px, -5px) rotate(0deg) scale(-0.94, 1.07); } 80% { transform: translate(-6px, 0px) rotate(0deg) scale(-1.06, 0.93); } 86% { transform: translate(-2px, -3px) rotate(0deg) scale(-0.97, 1.04); } 92%, 99% { transform: translate(0px, 0px) rotate(0deg) scale(-1, 1); } 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } }
@keyframes rollR { 0% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 50% { transform: translate(10px, -8px) rotate(180deg) scale(1, 1); } 100% { transform: translate(0px, 0px) rotate(360deg) scale(1, 1); } }
@keyframes rollL { 0% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 50% { transform: translate(-10px, -8px) rotate(-180deg) scale(1, 1); } 100% { transform: translate(0px, 0px) rotate(-360deg) scale(1, 1); } }
@keyframes leanR { 0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 18%, 82% { transform: translate(0px, -2px) rotate(-9deg) scale(1, 1); } }
@keyframes leanL { 0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 18%, 82% { transform: translate(0px, -2px) rotate(9deg) scale(1, 1); } }
@keyframes strcR { 0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 30%, 70% { transform: translate(0px, 0px) rotate(-4deg) scale(1.12, 0.9); } }
@keyframes strcL { 0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 30%, 70% { transform: translate(0px, 0px) rotate(4deg) scale(1.12, 0.9); } }
@keyframes wig { 0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 15% { transform: translate(0px, 0px) rotate(-7deg) scale(1.04, 0.96); } 30% { transform: translate(0px, 0px) rotate(6deg) scale(0.96, 1.04); } 45% { transform: translate(0px, 0px) rotate(-5deg) scale(1.03, 0.97); } 60% { transform: translate(0px, 0px) rotate(4deg) scale(0.98, 1.02); } 75% { transform: translate(0px, 0px) rotate(-2deg) scale(1, 1); } }
@keyframes jumpy { 0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 20% { transform: translate(0px, 0px) rotate(0deg) scale(1.1, 0.88); } 45% { transform: translate(0px, -16px) rotate(0deg) scale(0.94, 1.08); } 70% { transform: translate(0px, 0px) rotate(0deg) scale(1.08, 0.92); } 85% { transform: translate(0px, 0px) rotate(0deg) scale(0.98, 1.02); } }
@keyframes dive { 0% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 12% { transform: translate(0px, -4px) rotate(-6deg) scale(1, 1); } 32%, 68% { transform: translate(0, 68%) rotate(8deg); } 86% { transform: translate(0px, -3px) rotate(0deg) scale(1, 1); } 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } }
@keyframes wspin { 0% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 100% { transform: translate(0px, 0px) rotate(360deg) scale(1, 1); } }
@keyframes splash { 0%, 100% { transform: translate(0px, 0px) rotate(0deg) scale(1, 1); } 25% { transform: translate(0px, -10px) rotate(0deg) scale(0.95, 1.05); } 50% { transform: translate(0px, 4px) rotate(0deg) scale(1.06, 0.94); } 75% { transform: translate(0px, -3px) rotate(0deg) scale(1, 1); } }
@keyframes pat { from { transform: rotate(0deg); } to { transform: rotate(34deg); } }
@keyframes flapw { from { transform: rotate(-10deg); } to { transform: rotate(55deg); } }
.seal.act-galumph .mv { animation: galR 4.6s linear; } .seal.dir-l.act-galumph .mv { animation-name: galL; }
.seal.act-roll .mv { animation: rollR 1.7s ease-in-out; transform-origin: 50% 58%; } .seal.dir-l.act-roll .mv { animation-name: rollL; }
.seal.act-belly .mv, .seal.act-wave .mv { animation: leanR 1.9s ease-in-out; } .seal.dir-l.act-belly .mv, .seal.dir-l.act-wave .mv { animation-name: leanL; }
.seal.act-stretch .mv { animation: strcR 2.4s ease-in-out; } .seal.dir-l.act-stretch .mv { animation-name: strcL; }
.seal.act-wiggle .mv { animation: wig 1.5s ease-in-out; }
.seal.act-hop .mv { animation: jumpy 1s ease-out; }
.seal.act-dive .mv { animation: dive 3s ease-in-out; }
.seal.act-spin .mv { animation: wspin 1.9s ease-in-out; transform-origin: 50% 55%; }
.seal.act-splash .mv { animation: splash 1.3s ease-out; }
@supports (transform-box: view-box) { .seal .ffl { transform-box: view-box; } .seal.act-belly .ffl { animation: pat .2s ease-in-out 9 alternate; } .seal.act-wave .ffl { animation: flapw .28s ease-in-out 6 alternate; } }
@keyframes peek { 0%, 18% { transform: none; } 22%, 40% { transform: scaleX(-1); } 44%, 62% { transform: none; } 66%, 84% { transform: scaleX(-1); } 88%, 100% { transform: none; } }
.seal.act-peek .mv { animation: peek 1.6s linear; }
.float.act { font-size: 12px; color: var(--ink); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .seal .mv, .seal .ffl { animation: none !important; } }

/* 照着真事做的小动作：鼻子挂海鳗（只有幼崽、很少见）、撒沙子、滚沙子、啃雪／饿了啃沙子 */
.seal .actprop { position: absolute; pointer-events: none; }
.seal .actprop svg { width: 100%; height: auto; animation: none; }
.seal .actprop.eel { width: 15%; transform-origin: 50% 0; animation: eelHang linear both; }
@keyframes eelHang { 0%, 27% { opacity: 0; transform: translate(-50%, 0) scaleY(.2); } 31% { opacity: 1; transform: translate(-50%, 0) scaleY(1); } 40% { transform: translate(-50%, 0) rotate(11deg); } 49% { transform: translate(-50%, 0) rotate(-9deg); } 58% { transform: translate(-50%, 0) rotate(10deg); } 67% { transform: translate(-50%, 0) rotate(-7deg); } 76% { opacity: 1; transform: translate(-50%, 0) rotate(0deg); } 84% { opacity: 1; transform: translate(-50%, -6px) rotate(-35deg); } 100% { opacity: 0; transform: translate(-50%, -26px) rotate(-75deg); } }
@keyframes eelBody { 0% { transform: none; } 9%, 22% { transform: translate(0, 34%) rotate(7deg); } 31% { transform: translate(0, -16%); } 38% { transform: translate(0, -16%) rotate(-3deg); } 46% { transform: translate(0, -16%) rotate(3deg); } 54% { transform: translate(0, -16%) rotate(-3deg); } 62% { transform: translate(0, -16%) rotate(3deg); } 72% { transform: translate(0, -16%); } 82% { transform: translate(0, -19%) scale(1.03, .97); } 92% { transform: translate(0, -4%); } 100% { transform: none; } }
.seal.act-eel .mv { animation: eelBody 4.6s ease-in-out; }
@keyframes eelLand { 0%, 26% { transform: none; } 31% { transform: translate(0, -5px) scale(1.04, .96); } 36% { transform: none; } 42% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } 58% { transform: rotate(-3deg); } 66% { transform: rotate(3deg); } 74% { transform: none; } 82% { transform: translate(0, -3px) scale(1.03, .97); } 100% { transform: none; } }
.seal.land.act-eel .mv { animation-name: eelLand; }
.seal .actprop.grain { width: var(--s, 3px); height: calc(var(--s, 3px) * .75); margin: -2px 0 0 -2px; border-radius: 45% 60% 40% 55%; background: var(--c, #c9a46a); opacity: 0; animation: grain .75s ease-out both; }
.seal .actprop.grain.snow { box-shadow: 0 0 0 .6px rgba(140,175,200,.55); }
@keyframes grain { 0% { opacity: 1; transform: translate(0, 0); } 55% { opacity: 1; transform: translate(var(--tx), var(--ty)); } 100% { opacity: 0; transform: translate(calc(var(--tx) * 1.25), calc(var(--ty) * .2)); } }
@keyframes sandb { 0%, 100% { transform: none; } 20%, 60% { transform: rotate(-2deg) scale(1.02, .98); } 40%, 80% { transform: rotate(1.5deg); } }
.seal.act-sand .mv { animation: sandb 2.4s ease-in-out; }
.seal.act-sandroll .mv { animation: rollR 1.9s ease-in-out; transform-origin: 50% 58%; } .seal.dir-l.act-sandroll .mv { animation-name: rollL; }
@keyframes nib { 0%, 100% { transform: none; } 12%, 30%, 48%, 66% { transform: translate(0, 5px) scale(1.03, .95); } 21%, 39%, 57% { transform: translate(0, 2px); } }
.seal.act-nibble .mv { animation: nib 2s ease-in-out; }
@supports (transform-box: view-box) { .seal.act-sand .ffl { animation: pat .19s ease-in-out 12 alternate; } }
/* 身上沾的沙、雪：game.js coatSeal 每次随机撒一把不规则的沙粒／雪团，用海豹轮廓当遮罩，慢慢掉干净 */
.seal .coat { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity 2.5s; }
.seal .coat svg { width: 100%; height: 100%; animation: none; display: block; }
.seal .coat.off { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .seal .actprop.grain { display: none; } .seal .actprop.eel { animation: none !important; transform: translate(-50%, 0); } }

/* 设置 · 云存档 */
.tagmore { display: inline-block; font-size: 10px; font-weight: 900; color: #fff; background: var(--orange); border-radius: 999px; padding: 0 7px; margin-left: 4px; vertical-align: 1px; }
.item.best { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(242,140,58,.25); }
.actions.cloudbtns { margin-top: 8px; }
.actions.cloudbtns button { font-size: 13px; padding: 8px 6px; }
.actions.cloudbtns button:disabled { opacity: .55; }

/* 签到弹窗里的关注作者卡片 */
.followcard { display: flex; align-items: center; margin-top: 12px; border: 2px solid var(--ink); border-radius: 14px; padding: 6px 10px 6px 4px; background: #fff0f3; }
.followcard > * + * { margin-left: 8px; }
.followcard .fc-art { width: 88px; height: 92px; flex: none; display: flex; align-items: center; justify-content: center; }
.followcard .fc-art svg { width: 96px; height: 96px; flex: none; }
.followcard .t { flex: 1; font-size: 13px; font-weight: 800; line-height: 1.4; min-width: 0; }
.followcard .t b { display: block; font-size: 16px; color: #e0476b; }
.followcard .t small { display: block; color: var(--ink-soft); font-weight: 600; font-size: 11px; }
.followcard button { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px; font-weight: 900; font-family: inherit; font-size: 14px; background: #f0587a; color: #fff; white-space: nowrap; box-shadow: var(--shadow); }
.followcard button:disabled { opacity: .6; }
.followcard.done { padding: 10px; }
.followcard.done .ico { font-size: 26px; }

/* 1.0.7 特殊动作 */
.seal.act-nap .mv { animation: napb 3.4s ease-in-out; transform-origin: 50% 90%; }
@keyframes napb { 0%, 100% { transform: scale(1, 1); } 20%, 60% { transform: scale(1.035, .965); } 40%, 80% { transform: scale(.99, 1.01); } }
.seal.act-vain .mv { animation: vainT 2s ease-in-out; }
@keyframes vainT { 0%, 100% { transform: scaleX(1); } 20% { transform: translateY(-5px) scaleX(-1); } 40% { transform: scaleX(-1); } 60% { transform: translateY(-5px) scaleX(1); } 80% { transform: scaleX(1); } }
.seal.act-duck .mv { animation: splash 1.3s ease-out 2; }
.seal .actprop.duckp { font-size: calc(22px * var(--k, 1) * var(--dens, 1)); line-height: 1; transform: translate(-50%, -50%); animation: duckBob ease-in-out both; }
@keyframes duckBob { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 30% { transform: translate(-50%, -80%) rotate(-12deg); } 50% { transform: translate(-50%, -40%) rotate(10deg); } 70% { transform: translate(-50%, -85%) rotate(-8deg); } 90% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }
.seal.act-cuddle .mv { animation: leanR 1.2s ease-in-out 2; } .seal.dir-l.act-cuddle .mv { animation-name: leanL; }

/* 图鉴：海豹 / 动作相册 切换 */
.dexmode { display: flex; margin-top: 8px; background: #f1e4cc; border-radius: 999px; padding: 3px; }
.dexmode button { flex: 1; border: none; border-radius: 999px; padding: 6px 4px; font: inherit; font-size: 13px; font-weight: 900; background: transparent; color: var(--ink-soft); }
.dexmode button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 0 rgba(91,63,46,.25), 0 0 0 2px var(--ink); }
.dexmode small { font-size: 11px; color: var(--orange); }
/* 动作相册第一层：一只海豹一行 */
.milebox { margin-top: 8px; border: 2px solid var(--ink); border-radius: 14px; padding: 8px 12px 10px; background: #fff; }
.mb-t { font-size: 14px; font-weight: 800; margin-bottom: 6px; display: flex; align-items: baseline; }
.mb-t b { color: var(--orange); font-size: 18px; margin: 0 3px; }
.mb-t small { margin-left: auto; font-size: 12px; color: #e0476b; font-weight: 900; }
.pbar { position: relative; height: 20px; border: 2px solid var(--ink); border-radius: 999px; background: #eadfcb; overflow: hidden; }
.pbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); border-radius: 999px; }
.pbar b { position: relative; display: block; text-align: center; font-size: 12px; line-height: 16px; font-weight: 900; color: var(--ink); }
.actlist { display: flex; flex-direction: column; }
.actlist > * + * { margin-top: 8px; }
.alrow { display: flex; align-items: center; width: 100%; border: 2px solid var(--ink); border-radius: 16px; padding: 8px 10px; background: #fff; font: inherit; color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.alrow > * + * { margin-left: 10px; }
.alrow.gold { border-color: #d9a520; background: #fff9e6; }
.al-pic { width: 62px; height: 54px; flex: none; display: flex; align-items: center; justify-content: center; }
.al-pic svg { width: 68px; height: 68px; flex: none; }
.al-mid { flex: 1; min-width: 0; }
.al-mid b { font-size: 16px; font-weight: 900; }
.al-mid small { margin-left: 6px; font-size: 11px; font-weight: 800; color: #e0476b; }
.al-mid .pbar { margin-top: 5px; }
.al-go { font-size: 28px; font-weight: 900; color: var(--orange); flex: none; }

/* 第二层：一只海豹的照片墙 */
.backrow { display: block; width: 100%; margin-top: 8px; border: 2px solid var(--ink); border-radius: 14px; padding: 7px 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 900; color: var(--ink); text-align: left; }
.setbanner { display: flex; align-items: center; margin-top: 8px; border: 2.5px solid var(--ink); border-radius: 16px; padding: 8px 12px 10px 6px; background: #fff3e2; }
.setbanner > * + * { margin-left: 8px; }
.setbanner.gold { background: #fff9e6; border-color: #d9a520; }
.sb-pic { width: 70px; height: 60px; flex: none; display: flex; align-items: center; justify-content: center; }
.sb-pic svg { width: 76px; height: 76px; flex: none; }
.sb-mid { flex: 1; min-width: 0; }
.sb-t { font-size: 14px; font-weight: 900; margin-bottom: 6px; }
.sb-t b { color: #e0476b; }
.sb-t em { font-style: normal; font-size: 11px; color: var(--green); margin-left: 4px; }
.actcards { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 7px; margin-top: 10px; }
.acard { display: flex; flex-direction: column; align-items: center; border: 2px solid #d8c8ac; border-radius: 10px; padding: 4px 3px 4px; background: #faf5ec; font: inherit; color: var(--ink-soft); min-width: 0; }
.ac-ph { position: relative; width: 100%; padding-top: 80%; border-radius: 7px; background: #f1e7d6; overflow: hidden; }
.ac-ph svg { position: absolute; left: 50%; top: 54%; width: 112%; height: auto; transform: translate(-50%, -50%); filter: grayscale(1) contrast(.12) brightness(1.08); opacity: .6; }
.ac-ico { position: absolute; right: 2px; top: 2px; font-style: normal; font-size: 13px; line-height: 1; }
.acard small { margin-top: 3px; font-size: 10.5px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.acard.got { border-color: var(--ink); background: #fff; color: var(--ink); }
.acard.got .ac-ph { background: #fde3c8; }
.acard.got .ac-ph svg { filter: none; opacity: 1; }
.acard.lock { border-color: #c9b8e2; background: #f6f1fb; }
.acard.lock .ac-ph { background: #ece4f6; }

/* 弹出的面板最高到小红书顶部按钮下面，不盖住返回、分享 */
.sheet { max-height: 90vh; max-height: calc(100vh - var(--host-top, 8vh) - 14px); }

/* 看动作照片 */
.actphoto { position: relative; height: 200px; margin-top: 10px; border: 2.5px solid var(--ink); border-radius: 16px; overflow: hidden; background: linear-gradient(#fdf1e2 0 55%, #f1dcb1 55%); display: flex; align-items: center; justify-content: center; }
.actphoto.snow { background: linear-gradient(#eef5fb 0 55%, #ffffff 55%); }
.actphoto.w { background: linear-gradient(#fdf1e2 0 30%, #9ed0e0 30%); }
.actphoto .seal { position: relative; left: auto; top: auto; transform: none; width: 150px; transition: none; }
.ap-txt { position: absolute; left: 0; right: 0; top: 10px; text-align: center; font-weight: 900; font-size: 14px; color: var(--ink); }

/* 分享按钮 */
.sharerow { display: flex; margin-top: 10px; }
.sharerow > * + * { margin-left: 8px; }
.sharerow button { flex: 1; border: 2px solid var(--ink); border-radius: 14px; padding: 9px 6px; font: inherit; font-size: 14px; font-weight: 900; color: var(--ink); background: #fff0f3; box-shadow: var(--shadow); white-space: nowrap; }
.sharerow button:disabled { opacity: .55; }
.sharerow em { font-style: normal; font-size: 12px; color: #e0476b; }
.tagtest button { display: block; width: 100%; margin-top: 8px; text-align: left; border: 2px solid var(--ink); border-radius: 14px; padding: 9px 12px; font: inherit; color: var(--ink); background: #fff0f3; box-shadow: var(--shadow); }
.tagtest button:disabled { opacity: .55; }
.tagtest b { display: block; font-size: 14px; font-weight: 900; }
.tagtest small { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* 新朋友来啦 */
.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 4px; }
.welcome .wc-art { width: 190px; height: 170px; display: flex; align-items: center; justify-content: center; }
.welcome .wc-art svg { width: 200px; height: 200px; flex: none; }
.welcome b { font-size: 22px; font-weight: 900; color: var(--orange); }
.welcome small { font-size: 12px; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.wc-tags { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.wc-tags span { margin: 0 3px 4px; font-size: 11px; font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; background: #fff; }
/* 第一次拍到名场面 */
.event-art.shot { width: 180px; padding: 6px; border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
/* 装扮：海豹按馆分开 */
.wparks { display: flex; margin: 8px 0 2px; }
.wparks > * + * { margin-left: 5px; }
.wparks button { flex: 1; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 4px; font: inherit; font-size: 12px; font-weight: 800; background: #fff; color: var(--ink-soft); white-space: nowrap; }
.wparks button.on { background: var(--orange); color: #fff; }
.wparks small { font-size: 10px; margin-left: 2px; opacity: .8; }

/* ---------- 装扮：整页换装间 ---------- */
.dress { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 25; background: #f3e6d2; display: flex; justify-content: center; animation: dressIn .22s ease-out; }
.dress.hidden { display: none; }
@keyframes dressIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.dr-in { width: 100%; max-width: 520px; height: 100%; display: flex; flex-direction: column; padding: 0 10px; padding-top: calc(var(--host-top, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) + 6px); padding-bottom: calc(8px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
.dr-top { display: flex; align-items: center; height: 50px; flex: none; }
.dr-top > * + * { margin-left: 10px; }
.dr-back { width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--orange); color: #fff; font: inherit; font-size: 22px; font-weight: 900; line-height: 1; box-shadow: var(--shadow); padding: 0; }
.dr-title { display: flex; flex-direction: column; line-height: 1.15; }
.dr-title b { font-size: 20px; font-weight: 900; }
.dr-title small { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.dr-money { margin-left: auto; font-size: 13px; font-weight: 900; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px; background: var(--panel); }
.dr-main { flex: 1; min-height: 0; display: flex; margin-top: 4px; }
.dr-main > * + * { margin-left: 8px; }
.dr-stage { position: relative; min-width: 0; border: 2.5px solid var(--ink); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.dr-light { position: absolute; left: 50%; top: -10%; width: 150%; height: 95%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.85) 0%, rgba(255,255,255,.35) 38%, rgba(255,255,255,0) 66%); pointer-events: none; }
.dr-podium { position: absolute; left: 50%; bottom: 19%; width: 86%; height: 14%; transform: translateX(-50%); border-radius: 50%; background: #fff7ea; border: 2.5px solid var(--ink); box-shadow: 0 7px 0 #e8c79a, 0 7px 0 2.5px var(--ink); }
.dr-seal { position: absolute; left: 50%; bottom: 23%; width: 100%; max-width: 330px; transform: translateX(-50%); }
.dr-seal svg { width: 100%; height: auto; display: block; animation: breathe 3s ease-in-out infinite; transform-origin: 50% 90%; }
.dr-name { position: absolute; left: 0; right: 0; top: 12px; text-align: center; z-index: 2; }
.dr-name b { display: block; font-size: 22px; font-weight: 900; color: var(--orange); text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff; }
.dr-name small { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.dr-info { position: absolute; left: 8px; right: 8px; bottom: 8px; text-align: center; font-size: 11.5px; font-weight: 800; line-height: 1.5; color: var(--ink); background: rgba(255,250,241,.85); border-radius: 12px; padding: 4px 6px; }
.dr-buy { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; align-items: stretch; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); }
.dr-buy span { text-align: center; font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.dr-buy button { border: 2px solid var(--ink); border-radius: 12px; font: inherit; font-weight: 900; padding: 6px 4px; }
.dr-buy .go { background: var(--orange); color: #fff; font-size: 13.5px; }
.dr-buy .go:disabled { background: #e8dfd0; color: var(--ink-soft); }
.dr-buy .no { margin-top: 5px; background: #fff; font-size: 12px; color: var(--ink-soft); }
.dr-side { width: 112px; flex: none; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 2px 6px; }
.dr-side > * + * { margin-top: 7px; }
.dr-cat { display: flex; flex-direction: column; align-items: center; width: 100%; border: 2.5px solid var(--ink); border-radius: 18px; background: #fff; padding: 8px 4px 7px; font: inherit; color: var(--ink); box-shadow: var(--shadow); }
.dr-cat .ci { font-size: 30px; line-height: 1.15; }
.dr-cat b { font-size: 15px; font-weight: 900; margin-top: 2px; }
.dr-cat small { font-size: 10.5px; color: var(--ink-soft); font-weight: 800; }
.dr-cat.plain { background: #f7efe1; padding: 6px 4px; }
.dr-cat.plain .ci { font-size: 22px; }
.dr-cat.plain b { font-size: 12.5px; }
.dr-catback { width: 100%; border: 2px solid var(--ink); border-radius: 999px; background: var(--orange); color: #fff; font: inherit; font-size: 14px; font-weight: 900; padding: 5px 6px; text-align: left; position: -webkit-sticky; position: sticky; top: 0; z-index: 2; box-shadow: var(--shadow); }
.dr-item { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; border: 2px solid #d8c8ac; border-radius: 14px; background: #fff; padding: 6px 3px 5px; font: inherit; color: var(--ink); }
.dr-item .ii { font-size: 28px; line-height: 1.15; }
.dr-item b { font-size: 12px; font-weight: 900; line-height: 1.25; margin-top: 2px; text-align: center; }
.dr-item small { font-size: 10.5px; font-weight: 800; color: var(--ink-soft); }
.dr-item.own { border-color: var(--ink); }
.dr-item.on { border-color: var(--ink); background: #fff3d6; box-shadow: 0 0 0 2.5px var(--yellow); }
.dr-item.on small { color: var(--green); }
.dr-item.try { border-color: var(--orange); background: #fff0e2; box-shadow: 0 0 0 2.5px rgba(242,140,58,.45); }
.dr-item.poor:not(.own) small { color: #c8b8a0; }
.dr-item .fav { position: absolute; right: -3px; top: -6px; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; background: #e0476b; border-radius: 999px; padding: 0 5px; }
.dr-pick { flex: none; margin-top: 8px; }
.dr-parks { display: flex; }
.dr-parks > * + * { margin-left: 5px; }
.dr-parks button { flex: 1; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 4px; font: inherit; font-size: 12px; font-weight: 800; background: #fff; color: var(--ink-soft); white-space: nowrap; }
.dr-parks button.on { background: var(--orange); color: #fff; }
.dr-seals { display: flex; overflow-x: auto; padding: 6px 2px 2px; scrollbar-width: none; }
.dr-seals > * + * { margin-left: 6px; }
.dr-seals button { flex: none; width: 60px; border: 2px solid transparent; border-radius: 12px; background: #fff; padding: 2px 0 3px; font: inherit; font-size: 10px; font-weight: 800; color: var(--ink); }
.dr-seals button svg { width: 100%; height: auto; display: block; }
.dr-seals button.on { border-color: var(--ink); background: #fff3d6; }
/* 装扮的样子（不用 emoji） */
.oart { display: inline-block; width: 1em; height: 1em; vertical-align: middle; }
.oart.ghost { opacity: .28; filter: grayscale(1); }
.dr-cat .ci, .dr-item .ii { display: flex; align-items: center; justify-content: center; }
.dr-cat .ci { width: 52px; height: 44px; font-size: 44px; }
.dr-item .ii { width: 46px; height: 40px; font-size: 40px; }
.dr-item .ii.none { width: 30px; height: 30px; margin: 5px 0; border: 2.5px dashed #cdbda2; border-radius: 50%; }
.dr-info .mini { font-size: 24px; margin: 0 3px; }
.wchip .oart { font-size: 16px; margin-right: 3px; }
.oemoji { font-size: .7em; }
/* 试戴：买的那一行在舞台下面，不挡海豹 */
.dr-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dr-left .dr-stage { flex: 1; min-height: 0; }
.dr-buyrow { flex: none; height: 84px; margin-top: 6px; border: 2.5px solid var(--ink); border-radius: 16px; background: #fff; padding: 5px 7px 7px; box-shadow: var(--shadow); overflow: hidden; }
.dr-buyrow .br1 { display: flex; align-items: center; }
.dr-buyrow .br1 > * + * { margin-left: 6px; }
.dr-buyrow .bi { width: 30px; height: 28px; font-size: 28px; display: flex; align-items: center; justify-content: center; flex: none; }
.dr-buyrow .br1 b { font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dr-buyrow .br1 small { margin-left: auto; font-size: 11px; color: var(--orange); font-weight: 800; white-space: nowrap; }
.dr-buyrow .br2 { display: flex; margin-top: 5px; }
.dr-buyrow .br2 > * + * { margin-left: 6px; }
.dr-buyrow button { border: 2px solid var(--ink); border-radius: 12px; font: inherit; font-weight: 900; padding: 6px 8px; white-space: nowrap; }
.dr-buyrow .go { flex: 1; background: var(--orange); color: #fff; font-size: 13.5px; }
.dr-buyrow .go:disabled { background: #e8dfd0; color: var(--ink-soft); }
.dr-buyrow .no { background: #fff; color: var(--ink-soft); font-size: 12.5px; }
/* 签到格子、关注卡片：手绘图标代替 emoji */
.signcell span { display: flex; flex-direction: column; align-items: center; font-weight: 800; }
.signcell .sa { display: flex; align-items: center; justify-content: center; height: 30px; font-size: 28px; font-style: normal; margin-bottom: 2px; }
.signcell.big .sa { height: 36px; font-size: 34px; }
.followcard .t .mini { font-style: normal; font-size: 22px; margin-right: 3px; vertical-align: -4px; }
.followcard.done .ico { font-size: 36px; display: flex; }
.sheet h2 small .hs { font-style: normal; font-size: 13px; vertical-align: -2px; }
/* 设置：兑换码 */
.redeem { display: flex; }
.redeem > * + * { margin-left: 8px; }
.redeem input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; font: inherit; font-size: 15px; font-weight: 800; letter-spacing: 1px; color: var(--ink); background: #fff; text-transform: uppercase; }
.redeem input::placeholder { color: #cdbda2; letter-spacing: 1px; }
.redeem button { border: 2px solid var(--ink); border-radius: 12px; padding: 8px 16px; font: inherit; font-size: 15px; font-weight: 900; background: var(--orange); color: #fff; box-shadow: var(--shadow); }
.redeem-msg { min-height: 0; font-size: 12.5px; font-weight: 800; margin-top: 6px; }
.redeem-msg:empty { display: none; }
.redeem-msg.ok { color: var(--green); }
.redeem-msg.no { color: #c0573f; }
.redeem-msg .mini { font-style: normal; font-size: 18px; vertical-align: -3px; }
/* 设置：声音一行两个开关 */
.sndrow { display: flex; }
.sndrow > * + * { margin-left: 8px; }
.sndrow button { flex: 1; display: flex; align-items: center; justify-content: space-between; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 800; background: #fff; color: var(--ink-soft); }
.sndrow button b { font-size: 12px; border-radius: 999px; padding: 1px 9px; background: #e8dfd0; color: var(--ink-soft); }
.sndrow button.on { color: var(--ink); }
.sndrow button.on b { background: var(--orange); color: #fff; }

/* 气泡单独一层：在名牌（135）上面、园区按钮（140）下面，不会被别的海豹、鸭子、名牌挡住 */
.bubbles { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 138; }
.bubwrap { position: absolute; transform: translate(-50%, -50%); pointer-events: none; transition: left 1.2s ease-in-out, top 1.2s ease-in-out; }

/* 设施升级：列表里的等级和下一档，场景里升过级的房子头顶有小星星 */
.item .lv { font-style: normal; font-size: 10px; font-weight: 900; margin-left: 6px; padding: 0 6px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--yellow); vertical-align: 1px; white-space: nowrap; }
.item .nx { display: block; font-weight: 800; color: #4f9b78; }
.item .ico.art { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.item .ico.art svg { display: block; max-width: 100%; max-height: 100%; }
.fac .pips { position: absolute; left: 50%; top: -7px; transform: translateX(-50%); display: flex; pointer-events: none; }
.fac .pips svg { width: 10px; height: 10px; margin: 0 -0.5px; }

/* 全园 ❤️ 礼物：下一份还差多少 */
.giftline { display: flex; align-items: center; font-size: 12px; font-weight: 800; color: var(--ink); background: #fff3f5; border: 2px dashed #f0a8b8; border-radius: 12px; padding: 6px 10px; margin-top: 8px; }
.giftline .oart { font-size: 16px; margin-right: 6px; flex: none; }
.item .ico.art .oart, .item .ico.art .oemoji { font-size: 34px; }

/* 手绘小图标：馆徽、装饰格子、买鱼格子 */
.parkbtn .oart { font-size: 14px; margin-right: 3px; vertical-align: -2px; }
.dr-parks .oart { font-size: 13px; vertical-align: -2px; }
h2 small .oart { font-size: 14px; vertical-align: -2px; }
.tile .big.art { height: 30px; display: flex; align-items: center; justify-content: center; }
.tile .big.art svg { display: block; width: auto; height: 28px; max-width: 44px; }
.buyfav .oart, .origin b .oart { font-size: 18px; vertical-align: -4px; }

/* 装扮页：底下那一格没在试戴时的样子（和购买时一样高） */
.dr-buyrow.idle { display: flex; flex-direction: column; justify-content: center; background: #fffaf1; }
.dr-buyrow.idle .br1 { min-width: 0; }
.dr-buyrow.idle .lab { margin-left: 0; color: var(--ink-soft); font-size: 11px; }
.dr-buyrow.idle .bi { width: 26px; height: 24px; font-size: 24px; }
.dr-buyrow.idle .br1 > .bi + .bi { margin-left: 2px; }
.dr-buyrow.idle .hint { margin-top: 6px; font-size: 11.5px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 舞台上的三束灯：两边是彩色的、从角上的小灯打下来，中间一束白光，慢慢摇 */
.dr-lights { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; }
.dr-lights i { position: absolute; top: -3%; height: 82%; width: 56%; transform-origin: 50% 0; clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); -webkit-clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); }
.dr-lights .b1 { left: -14%; background: linear-gradient(rgba(255,150,190,.62), rgba(255,170,200,.22) 70%, rgba(255,170,200,0)); animation: beamL 5.5s ease-in-out infinite alternate; }
.dr-lights .b3 { right: -14%; background: linear-gradient(rgba(255,214,90,.7), rgba(255,220,120,.24) 70%, rgba(255,220,120,0)); animation: beamR 6.2s ease-in-out infinite alternate; }
.dr-lights .b2 { left: 22%; width: 56%; top: -6%; height: 86%; background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.35) 70%, rgba(255,255,255,0)); animation: beamC 7s ease-in-out infinite alternate; }
@keyframes beamL { from { transform: rotate(-11deg); } to { transform: rotate(-19deg); } }
@keyframes beamR { from { transform: rotate(12deg); } to { transform: rotate(19deg); } }
@keyframes beamC { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
/* 角上的小灯 */
.dr-lights s { position: absolute; top: -5px; width: 30px; height: 22px; border: 2.5px solid var(--ink); border-radius: 0 0 12px 12px; background: #5a4636; }
.dr-lights s::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 2px; height: 6px; border-radius: 0 0 8px 8px; }
.dr-lights .l1 { left: 12%; transform: rotate(-14deg); } .dr-lights .l1::after { background: #ff9fc2; }
.dr-lights .l3 { right: 12%; transform: rotate(14deg); } .dr-lights .l3::after { background: #ffd65a; }
@media (prefers-reduced-motion: reduce) { .dr-lights i { animation: none; } }
/* 舞台上的海豹：能戳、能做动作 */
.dr-seal .seal { position: relative; left: auto; top: auto; width: 100%; transform: none; transition: none; pointer-events: auto; cursor: pointer; }
.dr-say { position: absolute; left: 50%; bottom: 62%; transform: translateX(-50%); z-index: 3; max-width: 86%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 900; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 3px 10px; box-shadow: var(--shadow); pointer-events: none; }
.dr-say.hidden { display: none; }
.dr-say.on { animation: drsay .35s ease-out; }
@keyframes drsay { from { opacity: 0; transform: translate(-50%, 6px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }

/* 装扮页的背景板 */
.dr-bg { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; }
.dr-bg svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.dr-shadow { position: absolute; left: 50%; bottom: 28.5%; width: 56%; height: 4.5%; transform: translateX(-50%); border-radius: 50%; background: rgba(60,40,25,.18); pointer-events: none; }
.dr-stage:not(.bg-stage) .dr-name small { background: rgba(255,250,241,.85); border-radius: 999px; padding: 1px 8px; }
.dr-stage:not(.bg-stage) .dr-info { background: rgba(255,250,241,.92); }
.dr-cat .ci.bgt, .dr-item .ii.bgt { position: relative; width: 70px; height: 44px; font-size: 0; border: 2px solid var(--ink); border-radius: 9px; overflow: hidden; background: #fff; }
.dr-item .ii.bgt { margin: 2px 0 1px; }
.bgt svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }

/* 顶上的钱/鱼/❤️、底下五个按钮、小目标：手绘图标 */
.chip .ci { display: inline-block; font-style: normal; font-size: 17px; line-height: 1; margin-right: 4px; vertical-align: -4px; }
.chip .ci .oart { display: block; }
.bottom button .ico { height: 28px; display: flex; align-items: center; justify-content: center; }
.bottom button .ico .oart { font-size: 27px; }
.goalchip .oart { font-size: 15px; margin-right: 4px; vertical-align: -3px; }
@media (max-height: 720px) { .bottom button .ico { height: 24px; } .bottom button .ico .oart { font-size: 23px; } }
.bottom button .ico[data-ico="fish"] .oart { font-size: 33px; } /* 鱼是扁长的，放大一点才和别的一样显眼 */
@media (max-height: 720px) { .bottom button .ico[data-ico="fish"] .oart { font-size: 28px; } }

/* 替换 emoji 的手绘小图标：跟着字号走，和字对齐 */
.ic { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -.25em; font-style: normal; line-height: 1; }
.ic .oart { display: block; width: 100%; height: 100%; font-size: inherit; }
.ac-ico { width: 18px; height: 18px; background: rgba(255,250,241,.9); border-radius: 50%; padding: 2px; }
.ac-ico .oart { display: block; width: 100%; height: 100%; }
/* 动作相册：每个馆一页小卡片，一行三张 */
.albgrid { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 12px 8px; margin-top: 12px; }
.albcard { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; background: #fff8ec; border: 2.5px solid var(--ink); border-radius: 14px; padding: 10px 4px 7px; font: inherit; color: var(--ink); box-shadow: var(--shadow); }
.albcard .tape { position: absolute; top: -7px; left: 50%; width: 38px; height: 13px; transform: translateX(-50%) rotate(-3deg); background: rgba(168,220,200,.8); border-radius: 2px; }
.albcard .ap { display: block; width: 86%; height: 62px; overflow: hidden; }
.albcard .ap svg { width: 100%; height: 100%; display: block; }
.albcard b { font-size: 13.5px; font-weight: 900; margin-top: 3px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.albcard .apb { display: block; width: 78%; height: 8px; margin-top: 4px; border: 1.8px solid var(--ink); border-radius: 999px; background: #efe3cc; overflow: hidden; }
.albcard .apb i { display: block; height: 100%; background: var(--green); }
.albcard small { font-size: 11px; font-weight: 800; color: var(--ink-soft); margin-top: 1px; }
.albcard.gold { background: #fff3d0; box-shadow: 0 0 0 2.5px var(--yellow), var(--shadow); }
.albcard .done { position: absolute; right: 4px; top: 5px; width: 18px; height: 18px; }
.albcard .done svg { display: block; width: 100%; height: 100%; }
.albcard.none { background: #f4ead8; border-style: dashed; box-shadow: none; }
.albcard.none b { color: var(--ink-soft); }
.albcard.none .ap svg { filter: brightness(0); opacity: .22; } /* 没迎接的：只看得到剪影 */
.mb-t .ic { margin-right: 4px; }
/* 图鉴卡片：名字后面小字写亲密度；做客的野生海豹淡蓝底 */
.albcard b em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--orange); margin-left: 3px; }
.albcard.guest { background: #eaf6fb; }
.albcard.none small { text-align: center; line-height: 1.3; }
/* 资料卡相册里的「动作 / 名场面」小分页 */
.subtabs .tabs { margin-top: 2px; }
.subtabs .tabs button { padding: 4px 6px; font-size: 12.5px; }
.setbanner.slim { padding: 8px 12px 10px; }
/* 资料卡里的动作格子：只露两行多，里面上下滑 */
.actscroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin-top: 10px; padding: 2px; border-radius: 12px; background: #f6eedf; }
.actscroll .actcards { margin-top: 0; padding: 4px; }
.setbanner.slim { margin-top: 6px; padding: 6px 12px 8px; }
.setbanner.slim .sb-t { margin-bottom: 4px; }
.actgoal { margin-top: 6px; font-size: 12px; font-weight: 800; color: #e0476b; }
.actgoal.done { color: var(--green); }
.actgoal + .actscroll { margin-top: 6px; }
#btn-feed { white-space: nowrap; }

/* 苹果馆分区：两边的箭头写着隔壁区的名字；不在大湾时海豹那一层不显示 */
.areabtn { position: absolute; top: 50%; z-index: 141; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; justify-content: center; width: 30px; min-height: 64px; padding: 6px 0; font: inherit; font-size: 22px; font-weight: 900; line-height: 1; color: var(--ink); background: rgba(255,248,236,.9); border: 2px solid var(--ink); box-shadow: var(--shadow); }
.areabtn small { font-size: 10.5px; font-weight: 800; writing-mode: vertical-rl; letter-spacing: 1px; margin: 3px 0; }
.areabtn.left { left: 0; border-left: none; border-radius: 0 14px 14px 0; }
.areabtn.right { right: 0; border-right: none; border-radius: 14px 0 0 14px; }
.areabtn.hidden { display: none; }
.areabtn.alert::after { content: ""; position: absolute; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: #e0476b; border: 2px solid #fff; animation: areaPing 1s ease-in-out infinite alternate; }
.areabtn.left.alert::after { right: -4px; } .areabtn.right.alert::after { left: -4px; }
@keyframes areaPing { from { transform: scale(.85); } to { transform: scale(1.15); } }
/* 每只海豹只在它住的那个区显示（game.js 里按区把别的区的海豹藏起来）；只有入口没有海豹 */
#scene[data-area="gate"] #seals, #scene[data-area="gate"] #nametags, #scene[data-area="gate"] #bubbles { visibility: hidden; pointer-events: none; }
#parkart.slide { animation: areaIn .28s ease-out; }
@keyframes areaIn { from { opacity: .35; } to { opacity: 1; } }
#scene { touch-action: pan-y; }

/* 点头哈腰的鞠躬：身子以尾巴那头为轴，往前一点一点地低头，连鞠三下 */
.seal.act-bow .mv { animation: bowR 2.2s ease-in-out; transform-origin: 20% 92%; } .seal.dir-l.act-bow .mv { animation-name: bowL; transform-origin: 80% 92%; }
@keyframes bowR { 0%, 100% { transform: rotate(0deg); } 12%, 24% { transform: rotate(13deg) translateY(2px); } 33% { transform: rotate(0deg); } 45%, 57% { transform: rotate(13deg) translateY(2px); } 66% { transform: rotate(0deg); } 78%, 90% { transform: rotate(13deg) translateY(2px); } }
@keyframes bowL { 0%, 100% { transform: rotate(0deg); } 12%, 24% { transform: rotate(-13deg) translateY(2px); } 33% { transform: rotate(0deg); } 45%, 57% { transform: rotate(-13deg) translateY(2px); } 66% { transform: rotate(0deg); } 78%, 90% { transform: rotate(-13deg) translateY(2px); } }

/* 卡老痰的咯痰：先往后一仰，再往前一抖一抖（像在清嗓子） */
.seal.act-cough .mv { animation: coughR 2s ease-in-out; transform-origin: 30% 90%; } .seal.dir-l.act-cough .mv { animation-name: coughL; transform-origin: 70% 90%; }
@keyframes coughR { 0%, 100% { transform: none; } 15% { transform: rotate(-8deg) translateY(-2px); } 30% { transform: rotate(5deg) scale(1.04, .96); } 38% { transform: rotate(-3deg); } 46% { transform: rotate(5deg) scale(1.04, .96); } 54% { transform: rotate(-3deg); } 62% { transform: rotate(5deg) scale(1.04, .96); } 75% { transform: rotate(-6deg) translateY(-2px); } }
@keyframes coughL { 0%, 100% { transform: none; } 15% { transform: rotate(8deg) translateY(-2px); } 30% { transform: rotate(-5deg) scale(1.04, .96); } 38% { transform: rotate(3deg); } 46% { transform: rotate(-5deg) scale(1.04, .96); } 54% { transform: rotate(3deg); } 62% { transform: rotate(-5deg) scale(1.04, .96); } 75% { transform: rotate(6deg) translateY(-2px); } }

/* 嘎哒嘴打快板：头一下一下快速地点、身子跟着一缩一缩 */
.seal.act-clack .mv { animation: clack 1.8s linear; transform-origin: 50% 90%; }
@keyframes clack { 0%, 100% { transform: none; } 6%, 18%, 30%, 42%, 54%, 66%, 78% { transform: rotate(-3deg) scale(1.03, .97); } 12%, 24%, 36%, 48%, 60%, 72%, 84% { transform: rotate(3deg) scale(.98, 1.02); } 92% { transform: rotate(-2deg); } }

/* 大宝仰着睡：翻过身四脚朝天，睡一会儿再翻回来 */
.seal.act-backnap .mv { animation: backnap 3.2s ease-in-out; transform-origin: 50% 62%; }
@keyframes backnap { 0%, 100% { transform: none; } 20%, 80% { transform: rotate(172deg) translateY(4px); } 50% { transform: rotate(168deg) translateY(4px) scale(1.02, .98); } }
/* 大小眼横冲直撞：先往后一缩，再猛地往前一冲 */
.seal.act-charge .mv { animation: chargeR 1.6s ease-out; } .seal.dir-l.act-charge .mv { animation-name: chargeL; }
@keyframes chargeR { 0%, 100% { transform: none; } 20% { transform: translateX(-5px) scale(.95, 1.05); } 42% { transform: translateX(16px) scale(1.08, .92); } 55% { transform: translateX(12px); } 70% { transform: translateX(14px) rotate(-3deg); } }
@keyframes chargeL { 0%, 100% { transform: none; } 20% { transform: translateX(5px) scale(.95, 1.05); } 42% { transform: translateX(-16px) scale(1.08, .92); } 55% { transform: translateX(-12px); } 70% { transform: translateX(-14px) rotate(3deg); } }
/* 坏豹假装路过：慢慢挪过去，突然一拍（身子一沉一弹） */
.seal.act-prank .mv { animation: prankR 2.4s ease-in-out; transform-origin: 50% 85%; } .seal.dir-l.act-prank .mv { animation-name: prankL; }
@keyframes prankR { 0%, 100% { transform: none; } 40% { transform: translateX(9px); } 52% { transform: translateX(9px) translateY(-7px) rotate(-7deg); } 60% { transform: translateX(9px) translateY(3px) rotate(5deg) scale(1.08, .9); } 72% { transform: translateX(9px); } }
@keyframes prankL { 0%, 100% { transform: none; } 40% { transform: translateX(-9px); } 52% { transform: translateX(-9px) translateY(-7px) rotate(7deg); } 60% { transform: translateX(-9px) translateY(3px) rotate(-5deg) scale(1.08, .9); } 72% { transform: translateX(-9px); } }

/* 大胖趴着放空：慢慢一摊，摊一会儿再收回来 */
.seal.act-slack .mv { animation: slack 3s ease-in-out; transform-origin: 50% 95%; }
@keyframes slack { 0%, 100% { transform: none; } 25%, 80% { transform: scale(1.08, .88); } 50% { transform: scale(1.09, .87) rotate(1deg); } }

/* 豹富仰泳：翻过身漂过去，再翻回来 */
.seal.act-backswim .mv { animation: backswimR 3s ease-in-out; transform-origin: 50% 55%; } .seal.dir-l.act-backswim .mv { animation-name: backswimL; }
@keyframes backswimR { 0%, 100% { transform: none; } 18% { transform: rotate(170deg); } 50% { transform: translateX(10px) rotate(176deg); } 82% { transform: translateX(4px) rotate(168deg); } }
@keyframes backswimL { 0%, 100% { transform: none; } 18% { transform: rotate(-170deg); } 50% { transform: translateX(-10px) rotate(-176deg); } 82% { transform: translateX(-4px) rotate(-168deg); } }

/* 装扮页：苹果馆按区选海豹 */
.dr-areas { display: flex; margin-top: 5px; }
.dr-areas > * + * { margin-left: 5px; }
.dr-areas button { flex: 1; border: 1.8px solid var(--ink); border-radius: 999px; padding: 2px 4px; font: inherit; font-size: 11.5px; font-weight: 800; background: #fff8ec; color: var(--ink-soft); }
.dr-areas button.on { background: #fde3c8; color: var(--ink); }

/* 图鉴一页海豹多于 9 只时一行四张，一屏放得下 */
.albgrid.four { grid-template-columns: repeat(4, 1fr); grid-gap: 10px 6px; }
.albgrid.four .albcard { padding: 9px 3px 6px; }
.albgrid.four .ap { height: 50px; }
.albgrid.four b { font-size: 12px; }
.albgrid.four b em { display: block; margin-left: 0; text-align: center; }
/* 园区地图 */
.parkmap { margin-top: 8px; border: 2.5px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.parkmap svg { display: block; width: 100%; height: auto; }
.mapinfo { display: flex; align-items: center; margin-top: 10px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; padding: 8px 10px; }
.mapinfo > * + * { margin-left: 10px; }
.mapinfo .ico.art { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; }
.mapinfo .ico.art svg { width: 100%; height: 100%; }
.mapinfo .t { flex: 1; min-width: 0; font-size: 15px; }
.mapinfo .t small { display: block; font-size: 11.5px; color: var(--ink-soft); font-weight: 700; line-height: 1.45; }
.mapinfo button { flex: none; border: 2px solid var(--ink); border-radius: 12px; padding: 7px 10px; font: inherit; font-size: 13px; font-weight: 900; background: #fff8ec; color: var(--ink); white-space: nowrap; }
.mapinfo button.primary { background: var(--orange); color: #fff; }
.mapinfo button:disabled { opacity: .55; }
.parkbtn.alert::after { content: ""; position: absolute; top: -5px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #e0476b; border: 2px solid #fff; animation: areaPing 1s ease-in-out infinite alternate; }
/* 苹果馆入口能点进去的店和拍照板 */
.fac.tap { pointer-events: auto; cursor: pointer; }
.fac.alert::after { content: ""; position: absolute; top: 2px; right: 0; width: 12px; height: 12px; border-radius: 50%; background: #e0476b; border: 2px solid #fff; animation: areaPing 1s ease-in-out infinite alternate; }
/* 饮品店、周边铺 */
.list.store { max-height: 56vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.list.store > * + * { margin-top: 6px; }
.srow { padding: 6px 8px; }
.srow > * + * { margin-left: 8px; }
.srow .ico.art svg { width: 34px; height: 34px; display: block; }
.srow:not(.on) { background: #f6f0e4; }
.srow:not(.on) .ico.art { opacity: .55; }
.srow .t b { font-size: 13px; }
.srow .t small { font-size: 11px; }
.sline { display: flex; align-items: center; margin-top: 3px; }
.spr { display: inline-flex; align-items: center; }
.spr button { width: 24px; height: 24px; padding: 0; border-radius: 50%; font-size: 15px; line-height: 1; background: #fff; }
.spr b { min-width: 46px; text-align: center; font-size: 13px; }
.stk { margin-left: 8px; font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.stk.low { color: #d9822b; }
.stk.out { color: #e0476b; }
.sbtn { display: flex; flex-direction: column; flex: none; }
.sbtn button + button { margin-top: 4px; }
.sbtn button { font-size: 12px; padding: 3px 9px; }
.sbtn button small { display: block; font-size: 10px; font-weight: 700; color: var(--ink-soft); }
/* 照相馆：报纸预览、取景框 */
.booth { margin-top: 8px; text-align: center; }
.booth .bpaper { width: auto; max-width: 100%; max-height: 52vh; border: 2px solid var(--ink); border-radius: 6px; background: #f6f3ec; display: inline-block; min-height: 120px; }
.booth .bcam { position: relative; width: 100%; padding-top: 62.5%; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: #222; }
.booth .bcam video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.sbtn button[data-on] { background: #fff; }
.sbtn button[data-on].primary { background: var(--yellow); }
/* 果园票亭：售票窗口 */
.tbooth { position: relative; margin-top: 8px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.tbooth .twin { display: block; width: 100%; height: auto; }
.tbooth .tw-seal, .tbooth .tw-sign { cursor: pointer; }
.tbooth .tw-seal.hop { animation: twHop .45s ease-out; }
.tbooth .tw-sign.shake { animation: twShake .5s ease-in-out; }
@keyframes twHop { 0%,100% { transform: translateY(0) } 40% { transform: translateY(-7px) } }
@keyframes twShake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-3px) } 50% { transform: translateX(3px) } 75% { transform: translateX(-2px) } }
.tw-say { position: absolute; left: 24%; top: 5%; max-width: 62%; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 4px 9px; font-size: 13px; font-weight: 900; box-shadow: var(--shadow); transition: opacity .2s; }
.tw-say::after { content: ""; position: absolute; left: 22px; bottom: -8px; border: 7px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.tw-say.hidden { opacity: 0; pointer-events: none; }
.actions button.primary:disabled { background: #e8dfd0; color: var(--ink-soft); }
/* 盖章处 */
.sdesk { position: relative; margin-top: 8px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.sdesk .stable { display: block; width: 100%; height: auto; }
.sdesk .slyr { transition: opacity .35s ease-out; }
.sdesk .slyr.on { opacity: .92; }
.spress { position: absolute; left: 10%; top: 12.5%; width: 80%; height: 66.7%; border-radius: 6px; border: 3px solid var(--ink); opacity: 0; pointer-events: none; }
.spress::before { content: ""; position: absolute; left: 30%; right: 30%; top: -22px; height: 22px; background: #c98c5a; border: 3px solid var(--ink); border-bottom: 0; border-radius: 10px 10px 0 0; }
.spress.go { animation: sPress .9s ease-in-out; }
@keyframes sPress { 0% { opacity: 0; transform: translateY(-38%) } 35% { opacity: .9; transform: translateY(0) } 48% { opacity: .9; transform: translateY(0) scale(.97) } 62% { opacity: .9; transform: translateY(0) } 100% { opacity: 0; transform: translateY(-38%) } }
.stamps { display: flex; justify-content: space-between; margin-top: 10px; }
.stamps button { flex: 1; margin: 0 3px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; padding: 4px 0 3px; font-family: inherit; color: var(--ink); box-shadow: var(--shadow); }
.stamps button svg { display: block; margin: 0 auto; }
.stamps button small { display: block; font-size: 11px; font-weight: 900; }
.stamps button.done { background: #eef8f3; box-shadow: none; opacity: .8; }

/* 排行榜 */
.scene .rankbtn { top: 92px; }
.rankbtn.hidden { display: none; }
@media (max-height: 720px) { .scene .rankbtn { top: 82px; } }
.rankbox { min-height: 180px; }
.rankme { background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 7px 10px; font-size: 13.5px; margin: 4px 0 8px; box-shadow: var(--shadow); }
.ranklist { max-height: 46vh; overflow-y: auto; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.rankrow { display: flex; align-items: center; padding: 7px 10px; font-size: 13.5px; border-bottom: 1.5px dashed #e3d6c0; }
.rankrow:last-child { border-bottom: none; }
.rankrow .rk { width: 30px; flex: none; text-align: center; font-weight: 900; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rankrow.top .rk { font-size: 17px; }
.rankrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.rankrow b { color: var(--orange); font-variant-numeric: tabular-nums; }
.rankrow b small { font-size: 11px; color: var(--ink-soft); font-weight: 600; margin-left: 2px; }
.rankrow.me { background: #fff1d6; }
.rankbox .empty button { margin-top: 10px; font: inherit; font-size: 13px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; padding: 5px 14px; }

/* ================= 网页版（英文）追加 ================= */
html, body { overflow: hidden; overscroll-behavior: none; }
#app { height: 100vh; height: 100dvh; min-height: 0; }
/* 手机竖屏：高一点的手机让主画面跟着长高（最多到宽的 1.5 倍，画面再瘦就要裁掉两边了），矮的手机照旧往下缩 */
.scene { flex: 1 1 470px; max-height: calc((min(100vw, 480px) - 20px) * 1.5); }
#app { justify-content: center; }
/* 英文提示比中文长：装扮页底部那句提示允许折成两行 */
.dr-buyrow.idle .hint { white-space: normal; line-height: 1.3; margin-top: 4px; }
/* 图鉴卡片：长名字（Diantouhayao、Xiaoqingren…）字小一号，免得被截断 */
.albcard b.long { font-size: 11px; letter-spacing: -.3px; }
/* 场景左上的营业状态牌子不压住右边的「今日小目标」（英文的目标牌子更宽） */
.gate { max-width: min(58%, calc(100% - 135px)); }
/* 小屏手机（宽 ≤ 360，比如 iPhone SE）：顶栏、场景上的两颗小牌子收紧一点，免得换行、互相压住 */
@media (max-width: 360px) {
  .top { padding-left: 10px; padding-right: 10px; } .top > * + * { margin-left: 5px; }
  .logo { font-size: 17px; letter-spacing: 0; }
  .top .chip { padding: 2px 6px; font-size: 11px; } .top .chip .ci { font-size: 14px; margin-right: 2px; } .res { flex-wrap: nowrap; } .res > * { margin-left: 4px; }
  .clock { padding: 0 10px 6px; font-size: 10.5px; } .clock .attr { font-size: 10px; }
  .gate { max-width: calc(100% - 132px); font-size: 10.5px; padding: 3px 7px; }
  .goalchip { font-size: 10.5px; padding: 3px 7px; }
  .bottom button { font-size: 11px; }
}
button, input { font-family: inherit; }
.logo { letter-spacing: .5px; }
.sidehelp { display: none; }
/* 主画面放大时，游客、偷猎者跟着放大（设施和海豹在 js 里已经跟着放大了） */
.visitors span svg { transform: scale(var(--sc, 1)); transform-origin: 50% 100%; }
.poacher .poach-art { zoom: var(--sc, 1); }
/* 英文比中文长：几处小字再收一点 */
.clock { font-size: 11.5px; } .clock .attr { font-size: 10.5px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom button { font-size: 12.5px; line-height: 1.15; }
.sharerow button { width: 100%; }

/* ---------- 电脑、平板横屏：左边是主画面，右边一栏是数值、开园按钮、五个入口；弹窗在右边这一栏里打开，主画面一直看得见 ---------- */
@media (min-width: 760px) and (min-aspect-ratio: 11/10) {
  body { background-color: #efe4d0; }
  #app { --pad: 16px; --sh: min(calc(100vh - 2 * var(--pad)), 900px); max-width: none; width: -moz-fit-content; width: fit-content; margin: 0 auto; padding: var(--pad) 18px; display: grid; grid-template-columns: auto minmax(330px, 430px); grid-template-rows: 1fr auto auto auto auto auto 1.2fr; grid-template-areas: "scene ." "scene top" "scene clock" "scene open" "scene nav" "scene help" "scene ."; column-gap: 20px; align-content: center; }
  @supports (height: 100dvh) { #app { --sh: min(calc(100dvh - 2 * var(--pad)), 900px); } }
  .scene { grid-area: scene; margin: 0; height: var(--sh); width: calc(var(--sh) * 0.8); max-width: calc(100vw - 400px); flex: none; align-self: center; border-radius: 26px; }
  .top { grid-area: top; padding: 2px 2px 10px; } .logo { font-size: 28px; }
  .chip { font-size: 14px; padding: 4px 11px; }
  .clock { grid-area: clock; padding: 0 4px 10px; font-size: 13px; } .clock .attr { font-size: 12px; }
  .openbtn { grid-area: open; margin: 4px 0 0; padding: 14px; font-size: 19px; cursor: pointer; }
  .bottom { grid-area: nav; padding: 14px 0 0; grid-gap: 8px; } .bottom button { padding: 12px 2px; font-size: 13.5px; cursor: pointer; }
  .bottom button:hover, .openbtn:hover { filter: brightness(1.04); transform: translateY(-1px); }
  .sidehelp { grid-area: help; display: block; align-self: start; margin-top: 22px; border: 2px dashed #cdb590; border-radius: 18px; padding: 12px 16px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); background: rgba(255,248,236,.6); }
  .sidehelp b { color: var(--ink); } .sidehelp ul { margin: 6px 0 0; padding-left: 18px; } .sidehelp li { margin: 2px 0; }
  /* 弹窗：只盖住右边这一栏 */
  .modal { position: absolute; grid-column: 2; grid-row: 1 / -1; top: 0; right: 0; bottom: 0; left: 0; margin: calc(var(--pad) * -1 + 8px) -10px; padding: 8px 10px; background: rgba(239, 228, 208, .86); align-items: flex-start; border-radius: 26px; }
  .sheet { max-width: none; width: 100%; max-height: 100%; border-bottom: var(--border); border-radius: 24px; padding-bottom: 18px; box-shadow: 0 8px 0 rgba(91,63,46,.14); animation: sideIn .22s ease-out; }
  @keyframes sideIn { from { transform: translateX(26px); opacity: 0 } to { transform: none; opacity: 1 } }
  .toast { position: absolute; grid-area: scene; left: 50%; bottom: 34px; font-size: 14.5px; max-width: 86%; }
  .modal:not(.hidden) ~ .toast { bottom: 34px; top: auto; }
  /* 装扮页（整页）：居中一栏，两边留白 */
  .dress { background: rgba(60, 42, 30, .45); align-items: center; padding: 16px; }
  .dress > .dr-in { max-width: 600px; height: min(100%, 900px); background: #f3e6d2; border: 2.5px solid var(--ink); border-radius: 26px; overflow: hidden; box-shadow: 0 10px 0 rgba(91,63,46,.2); padding: 8px 14px 12px; }
  .dr-side { width: 128px; }
  .dr-cat, .dr-item, .dr-back, .dr-pick button { cursor: pointer; }
}
@media (min-width: 760px) and (min-aspect-ratio: 11/10) and (max-height: 560px) {
  #app { --pad: 8px; } .sidehelp { display: none; } .logo { font-size: 22px; } .openbtn { padding: 9px; font-size: 16px; } .bottom button { padding: 7px 2px; }
}

/* ===== 网页版：自建云存档、排行榜名字、长按保存图片 ===== */
.savecode { display: flex; align-items: center; margin-top: 8px; border: 2px dashed var(--ink); border-radius: 14px; padding: 8px 10px; background: #fffaf1; }
.savecode .t { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-soft); font-weight: 800; }
.savecode b { display: block; font-size: 19px; letter-spacing: 1.5px; color: var(--ink); font-variant-numeric: tabular-nums; user-select: all; -webkit-user-select: all; }
.savecode button { flex: none; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font: inherit; font-weight: 900; padding: 6px 12px; }
.rankname { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 13px; }
.rankname span { flex: 1; min-width: 0; }
.rankname input { flex: 1; min-width: 0; font: inherit; font-size: 15px; border: 2px solid var(--ink); border-radius: 12px; padding: 6px 10px; }
.rankname button { border: 2px solid var(--ink); border-radius: 12px; background: #fff; font: inherit; font-weight: 900; padding: 6px 10px; }
.rankname button.primary { background: var(--orange); color: #fff; }
.holdsave { position: fixed; inset: 0; z-index: 60; background: rgba(40, 28, 20, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.holdsave img { max-width: 100%; max-height: calc(100% - 130px); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); -webkit-touch-callout: default; user-select: auto; }
.holdsave .hs-tip { color: #fff8ec; font-weight: 800; font-size: 15px; text-align: center; margin-bottom: 12px; line-height: 1.4; }
.holdsave button { margin-top: 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; font: inherit; font-weight: 900; font-size: 15px; padding: 8px 28px; }

/* ===== 开场故事 + 园长胸牌（#intro 盖在最上面，弹窗之上、提示条之下） ===== */
.intro { position: fixed; inset: 0; z-index: 28; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(ellipse at 50% 30%, rgba(143, 203, 220, .55), rgba(60, 42, 30, .62)); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fadeIn .3s ease-out; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.ipaper { position: relative; width: 100%; max-width: 420px; background: #fffaf0; border: 2.5px solid var(--ink); border-radius: 22px; box-shadow: 0 10px 0 rgba(91,63,46,.22); padding: 18px 20px 18px; color: var(--ink); animation: paperIn .4s cubic-bezier(.2,.9,.3,1.2); margin: auto; }
@keyframes paperIn { from { transform: translateY(24px) rotate(-1.5deg); opacity: 0 } to { transform: none; opacity: 1 } }
.ipaper h2 { margin: 4px 0 10px; font-size: 22px; font-weight: 900; text-align: center; }
.ipaper p { margin: 0 0 9px; font-size: 14.5px; line-height: 1.55; font-weight: 700; }
.ipaper button { font: inherit; font-weight: 900; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); padding: 10px 16px; box-shadow: var(--shadow); cursor: pointer; }
.ipaper button.primary { display: block; width: 100%; margin-top: 12px; background: var(--orange); color: #fff; font-size: 16.5px; }
.ipaper button:disabled { opacity: .5; cursor: default; }
.ipaper .iart { width: 130px; margin: -6px auto 0; } .ipaper .iart svg { width: 100%; height: auto; display: block; }
.letter { background: #fffaf0 repeating-linear-gradient(0deg, transparent 0 27px, rgba(91,63,46,.07) 27px 28px); }
.letter .sign { text-align: right; font-family: Caveat, cursive; font-size: 22px; font-weight: 700; margin-top: 4px; }
.deed { border-width: 3px; outline: 2px dashed #cdb590; outline-offset: -11px; padding: 22px 24px 20px; }
.deed .dtop { text-align: center; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink-soft); font-weight: 900; }
.deed h2 { font-family: Georgia, "Times New Roman", serif; font-size: 25px; color: #a2302a; margin-top: 2px; }
.sigline { display: flex; align-items: flex-end; gap: 10px; margin: 16px 0 4px; }
.sigline span { font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 17px; padding-bottom: 6px; }
.sigline input { flex: 1; min-width: 0; border: 0; border-bottom: 2.5px solid var(--ink); background: transparent; font-family: Caveat, "Segoe Script", "Bradley Hand", cursive; font-size: 34px; font-weight: 700; color: #1d3f8f; padding: 0 4px; line-height: 1.1; outline: none; }
.sigline input::placeholder { color: #cbbfae; }
.sigmsg { font-size: 12px; color: var(--ink-soft); font-weight: 700; text-align: center; margin-top: 4px; min-height: 16px; }
.sigmsg.no { color: #c8402e; }
.dfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--ink-soft); font-weight: 800; min-height: 64px; }
.stamp { display: inline-flex; align-items: center; justify-content: center; text-align: center; width: 76px; height: 76px; border: 3px solid #c8402e; border-radius: 50%; color: #c8402e; font-style: normal; font-size: 10.5px; font-weight: 900; line-height: 1.15; letter-spacing: .5px; transform: rotate(-14deg); animation: stampIn .35s cubic-bezier(.3,1.6,.5,1); box-shadow: inset 0 0 0 3px #fffaf0, inset 0 0 0 4.5px #c8402e; }
@keyframes stampIn { from { transform: rotate(-14deg) scale(2.2); opacity: 0 } to { transform: rotate(-14deg) scale(1); opacity: .92 } }
.badgecard { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #fff3d6, #ffe2c2); border: 2.5px solid var(--ink); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.bav { flex: none; width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--ink); background: #cfeaf3; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.bav svg, .bav img, .bav video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bav video { transform: scaleX(-1); }
.bname { flex: 1; min-width: 0; font-size: 21px; font-weight: 900; overflow-wrap: anywhere; }
.bname small { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 800; margin-top: 2px; }
.bname input { width: 100%; font: inherit; font-size: 19px; font-weight: 900; border: 2px solid var(--ink); border-radius: 12px; padding: 5px 8px; background: #fff; }
.bbtns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.bbtns button { padding: 9px 4px; font-size: 12.5px; border-radius: 14px; line-height: 1.25; }
.bact { display: flex; gap: 8px; margin-top: 4px; } .bact button { flex: 1; } .bact button.primary { flex: 2; }
/* 设置里的园长一行、排行榜上的小头像 */
.profrow { display: flex; align-items: center; gap: 10px; border: 2.5px solid var(--ink); border-radius: 16px; background: linear-gradient(135deg, #fff3d6, #ffe9cf); padding: 8px 10px; margin-bottom: 4px; }
.profrow .pav { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 2.5px solid var(--ink); background: #cfeaf3; overflow: hidden; }
.profrow .pav svg, .profrow .pav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profrow .t { flex: 1; min-width: 0; } .profrow .t b { display: block; font-size: 17px; overflow-wrap: anywhere; } .profrow .t small { font-size: 11px; color: var(--ink-soft); font-weight: 800; }
.profrow button { flex: none; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font: inherit; font-weight: 900; padding: 6px 10px; }
.rav { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); background: #cfeaf3; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.rav svg, .rav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rankrow { align-items: center; } .rankrow .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankname .me { flex: 1; min-width: 0; }
@media (min-width: 760px) and (min-aspect-ratio: 11/10) { .ipaper { max-width: 460px; } }
.rankname .rav { flex: none; width: 34px; height: 34px; margin-right: 0; }
/* 开场故事、胸牌盖着的时候：提示条挪到最上面，不压在信纸上，也不被挡住 */
body:has(#intro) .toast { z-index: 29; top: 14px; bottom: auto; }
/* 分享面板：Instagram / X / Facebook / 存图（盖在最上面，关掉回到原来的弹窗） */
.sharesheet { position: fixed; inset: 0; z-index: 60; background: rgba(40, 28, 20, .55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: bubblein .18s ease-out; }
.ss-card { width: 100%; max-width: 380px; max-height: 100%; overflow: auto; background: var(--panel); border: var(--border); border-radius: 22px; padding: 12px 14px 14px; box-shadow: 0 8px 0 rgba(91,63,46,.18); }
.ss-head { display: flex; align-items: center; justify-content: space-between; } .ss-head b { font-size: 20px; font-weight: 900; }
.ss-x { display: flex; align-items: center; justify-content: center; padding: 0; border: 2px solid var(--ink); background: #fff; border-radius: 50%; width: 32px; height: 32px; font: inherit; font-weight: 900; font-size: 15px; color: var(--ink); cursor: pointer; }
.ss-img { display: block; max-width: 100%; max-height: 34vh; margin: 10px auto; border-radius: 10px; border: 2px solid var(--ink); background: #fff; }
.ss-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 8px; }
.ss-grid button { border: 2px solid var(--ink); border-radius: 16px; background: #fff; padding: 8px 2px 6px; font: inherit; font-size: 12.5px; font-weight: 900; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; box-shadow: var(--shadow); }
.ss-grid button svg { display: block; margin-bottom: 4px; }
.ss-grid button:active { transform: translateY(2px); box-shadow: none; }
.ss-tip { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-soft); text-align: center; min-height: 19px; }
.ss-tip.ok { color: #2f8f5e; } .ss-tip b { color: var(--ink); } .ss-tip a { color: var(--orange); font-weight: 900; }
.ss-alt { margin-top: 8px; font-size: 12px; text-align: center; color: var(--ink-soft); } .ss-alt a { color: var(--ink); font-weight: 900; }
