/* 点击不出现浏览器的蓝色高亮块 / 聚焦框（键盘 Tab 才显示聚焦环） */
* { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
:root {
  --night: #eef0f4;
  --deep: #ffffff;
  --panel: rgba(255, 255, 255, .78);
  --line: rgba(74, 120, 194, .2);
  --cream: #2b3443;
  --muted: #7a8494;
  --gold: #4a78c2;
  --tab-active-text: #ffffff;
  --gold-hi: #6f9ae0;
  --wine: #e58aa3;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --col: 560px;
  --close: 0; /* 0→1：随滚动，纪眠慢慢变回猫，窝到陆总身边 */
  /* 会员卡底图上的落位（百分比），与 card-blank.webp 对齐，canvas 导出共用；生成素材后校准 */
  --badge-photo-top: 30.4;
  --badge-photo-w: 50.6;
  --badge-info-top: 62.6;
  --badge-no-bottom: 6;
  /* 海报配色 */
  --poster-bg: #eef0f4;
  --poster-nick: #2b3443;
  --poster-title: #4a78c2;
  --poster-days: #7a8494;
  --poster-custom: #e58aa3;
  --poster-accent: #4a78c2;
  --poster-foot: #2b3443;
  --poster-foot-muted: #7a8494;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--night); color: var(--cream); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 两个人 ───────────────────────── */
.pair { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pair img { position: absolute; bottom: 0; height: 100vh; width: auto; max-width: none; object-fit: cover; transition: transform .2s linear; }
.pair-lu { left: -6vw; -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 92%); mask-image: linear-gradient(90deg, #000 45%, transparent 92%); }
.pair-ji { right: -6vw; -webkit-mask-image: linear-gradient(270deg, #000 45%, transparent 92%); mask-image: linear-gradient(270deg, #000 45%, transparent 92%); }
/* 滚动靠近：transform 同时作用在原图和景深画布，避免错位虚影 */
.pair-lu, .pair-lu + .depth-portrait { transform: translateX(calc(var(--close) * 4vw)); }
.pair-ji, .pair-ji + .depth-portrait { transform: translateX(calc(var(--close) * -4vw)); }
.pair img, .pair .depth-portrait { transition: none; }
.pair-glow { position: absolute; left: 50%; top: 30%; width: 70vw; height: 70vh; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(74, 120, 194, calc(.08 + var(--close) * .1)), transparent); }
.pair::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 34% 100% at 50% 50%, rgba(255, 255, 255, .82), rgba(255, 255, 255, .25) 70%, transparent); }

/* ── 顶栏 ───────────────────────── */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: calc(var(--col) + 80px); margin: 0 auto; padding: 14px 20px; background: linear-gradient(var(--night) 40%, transparent); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); letter-spacing: .08em; }
.seal { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--gold); color: var(--gold); font-size: 15px; border-radius: 3px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { padding: 8px 12px; font-size: 14px; color: var(--muted); text-decoration: none; border-radius: 999px; }
.topbar nav a:hover { color: var(--cream); background: rgba(43, 52, 67, .06); }

main { position: relative; z-index: 1; max-width: var(--col); margin: 0 auto; padding: 0 20px; }

/* ── 开场 ───────────────────────── */
.opening { min-height: calc(100vh - 64px); display: flex; flex-direction: column; justify-content: center; padding: 24px 0 64px; text-align: center; }
.chat-open { display: flex; flex-direction: column; gap: 8px; margin: 0 auto 40px; width: min(100%, 340px); }
.chat-time { margin: 0 0 4px; font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.bubble { margin: 0; max-width: 82%; padding: 9px 14px; font-size: 14px; line-height: 1.55; border-radius: 16px; text-align: left; opacity: 0; animation: pop .5s ease forwards; }
.from-ji { align-self: flex-end; background: var(--cream); color: #ffffff; border-bottom-right-radius: 4px; animation-delay: .4s; }
.from-lu { align-self: flex-start; background: #e9eef7; border: 1px solid var(--line); border-bottom-left-radius: 4px; animation-delay: 1.5s; }
.from-lu.delay { animation-delay: 2.5s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
h1 { margin: 0; font: 400 clamp(52px, 13vw, 84px)/1.08 var(--serif); letter-spacing: .06em; text-shadow: 0 2px 30px rgba(255, 255, 255, .8); }
.names { margin: 18px 0 0; font-family: var(--serif); color: var(--gold); letter-spacing: .3em; }
.names i { font-style: normal; color: var(--muted); padding: 0 .3em; }
.lede { margin: 16px 0 32px; color: var(--muted); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.resume { display: inline-block; margin-top: 18px; font-size: 13px; color: var(--gold); }

.btn { white-space: nowrap; flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-size: 15px; letter-spacing: .04em; cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #ffffff; font-weight: 600; }
.btn.line { border-color: var(--line); background: rgba(255, 255, 255, .5); }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ── 区块 ───────────────────────── */
.block { padding: 72px 0; text-align: center; }
.kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .32em; color: var(--gold); }
h2 { margin: 0; font: 400 clamp(28px, 7vw, 36px)/1.35 var(--serif); letter-spacing: .04em; }
.sub { margin: 14px 0 32px; color: var(--muted); font-size: 14px; }
.hint { min-height: 1.4em; margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* ── 工牌 ───────────────────────── */
.badges { display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: 10px; margin: 8px 0 36px; }
.badge { position: relative; aspect-ratio: 500 / 945; background: center / 100% 100% no-repeat; color: #1b2624; text-align: center; container-type: inline-size; }
.badge.has-art { background-image: url(assets/badge-blank.webp); }
.badge .photo { position: absolute; top: calc(var(--badge-photo-top) * 1%); left: 50%; transform: translateX(-50%); width: calc(var(--badge-photo-w) * 1%); aspect-ratio: 1; object-fit: cover; border-radius: 3%; background: #c9c2b5; }
.badge .photo.initial { display: grid; place-items: center; font: 400 18cqi var(--serif); color: #4a5753; }
.badge .info { position: absolute; top: calc(var(--badge-info-top) * 1%); left: 12%; right: 12%; }
.badge .nick { display: block; font: 600 9.5cqi/1.25 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge .title { display: block; margin-top: 2cqi; font-size: 5.6cqi; letter-spacing: .12em; color: #6b5a3a; }
.badge .days { display: block; margin-top: 1.5cqi; font-size: 5cqi; color: #6d7774; }
.badge .no { position: absolute; bottom: calc(var(--badge-no-bottom) * 1%); left: 0; right: 0; font: 5cqi var(--serif); letter-spacing: .2em; color: #8f8574; }
.badges .badge:nth-child(2) { transform: translateY(-18px); }
.badges .badge:nth-child(2)::before { content: ""; position: absolute; inset: 20% -18% -6%; z-index: -1; background: radial-gradient(closest-side, rgba(74, 120, 194, .35), transparent); }
.badges .badge:nth-child(2)::after { content: "在职最久"; position: absolute; top: 36%; left: 50%; transform: translateX(-50%); padding: 0 8px; font-size: 5cqi; letter-spacing: .1em; color: var(--gold-hi); white-space: nowrap; }
.badges .badge:nth-child(1), .badges .badge:nth-child(3) { transform: rotate(-2deg); }
.badges .badge:nth-child(3) { transform: rotate(2deg); }

.finder { margin: 0 auto 32px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); backdrop-filter: blur(10px); }
.finder label { display: block; margin-bottom: 12px; font-family: var(--serif); font-size: 18px; }
.finder-row { display: flex; gap: 8px; }
input, textarea { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .7); color: var(--cream); }
input::placeholder, textarea::placeholder { color: #9aa3b1; }
.my-badge { width: min(240px, 70%); margin: 18px auto 0; }
.my-badge .btn { margin-top: 14px; width: 100%; }

.roster-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; text-align: left; }
.member { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 4px; border-bottom: 1px solid rgba(43, 52, 67, .06); font-size: 14px; }
.member .r { width: 28px; font: 12px var(--serif); color: var(--muted); text-align: right; flex: none; }
.member img, .member .ph { width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; background: #e3e8ef; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.member .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .d { font-size: 12px; color: var(--muted); flex: none; }
.member.high .n { color: var(--gold-hi); }
.more { margin-top: 16px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.join { margin-top: 40px; padding: 28px 22px; border-radius: 18px; background: linear-gradient(160deg, rgba(74, 120, 194, .14), rgba(229, 138, 163, .12)); border: 1px solid var(--line); }
.join p { margin: 0 0 18px; color: var(--muted); }
.join strong { color: var(--cream); font-weight: 400; font-family: var(--serif); font-size: 17px; }
.join small { display: block; margin-top: 14px; font-size: 12px; color: #9aa3b1; }

/* ── 消息 ───────────────────────── */
.phone { text-align: left; border: 1px solid var(--line); border-radius: 26px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(12px); overflow: hidden; box-shadow: 0 30px 60px rgba(43, 52, 67, .12); }
.phone-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.phone-head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.phone-head strong { display: block; font-family: var(--serif); font-weight: 400; }
.phone-head small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.thread { height: min(62vh, 560px); overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.msg { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg .who { font-size: 12px; color: var(--muted); padding: 0 6px; }
.msg .who time { margin-left: 6px; opacity: .7; }
.msg .text { max-width: 82%; padding: 9px 14px; border-radius: 16px 16px 4px 16px; background: var(--cream); color: #ffffff; white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.6; }
.msg .ops { display: flex; gap: 10px; padding: 0 6px; }
.msg .ops button { border: 0; background: none; padding: 2px 0; font-size: 12px; color: var(--muted); cursor: pointer; }
.msg .ops button:hover { color: var(--gold); }
.reply { display: flex; gap: 8px; align-items: flex-end; align-self: flex-start; max-width: 88%; }
.reply img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.reply .text { max-width: none; border-radius: 16px 16px 16px 4px; background: #e9eef7; color: var(--cream); border: 1px solid var(--line); }
.reply.role .text { background: linear-gradient(160deg, #dfe8f8, #eef3fb); border-color: rgba(74, 120, 194, .5); }
.reply.role .who { color: var(--gold); }
.reply.fan { align-self: flex-end; flex-direction: row-reverse; }
.reply.fan .text { background: rgba(43, 52, 67, .14); color: var(--cream); border: 0; border-radius: 16px 16px 4px 16px; }
.reply .ph { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #dfe5ee; font-size: 12px; flex: none; }
.reply-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.reply.fan .reply-body { align-items: flex-end; }
.empty { white-space: pre-line; margin: auto; text-align: center; color: var(--muted); font-size: 14px; }
.composer { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .7); display: flex; flex-direction: column; gap: 8px; }
.composer #nickname { min-height: 38px; padding: 6px 12px; font-size: 14px; width: 50%; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; min-height: 44px; max-height: 140px; line-height: 1.5; }
.send { flex: none; min-width: 64px; min-height: 44px; border: 0; border-radius: 12px; background: var(--gold); color: #ffffff; font-weight: 600; cursor: pointer; }
.send:disabled { opacity: .5; cursor: default; }
.composer .hint { margin: 0; min-height: 0; }
.reply-to { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-radius: 10px; background: rgba(74, 120, 194, .12); font-size: 13px; color: var(--gold); }
.reply-to button { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); min-width: 32px; min-height: 32px; }

/* ── 点梗 ───────────────────────── */
.idea-form { display: flex; gap: 8px; }
.ideas { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.idea { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-radius: 14px; background: var(--panel); border: 1px solid rgba(43, 52, 67, .06); }
.idea .rank { font: 18px var(--serif); color: var(--muted); width: 22px; flex: none; }
.idea:nth-child(-n+3) .rank { color: var(--gold); }
.idea .body { flex: 1; min-width: 0; }
.idea .body p { margin: 0; word-break: break-word; }
.idea .body small { color: var(--muted); font-size: 12px; }
.idea .body small button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0 0 0 8px; cursor: pointer; }
.idea .note { margin-top: 6px; font-size: 13px; color: var(--gold); }
.heart { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 48px; min-height: 48px; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: none; cursor: pointer; font-size: 12px; color: var(--muted); line-height: 1.2; }
.heart span { font-size: 18px; }
.heart[aria-pressed="true"] { border-color: var(--wine); background: rgba(229, 138, 163, .3); color: #c4506f; }
.kicker.shown { margin-top: 48px; }
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.extra { position: relative; display: block; text-decoration: none; border-radius: 14px; overflow: hidden; background: var(--panel); }
.extra img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.extra .tag { position: absolute; top: 8px; left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; background: rgba(255, 255, 255, .75); color: var(--gold); border: 1px solid var(--line); }
.extra strong { display: block; padding: 10px 12px 0; font-family: var(--serif); font-weight: 400; }
.extra small { display: block; padding: 0 12px 12px; color: var(--muted); font-size: 12px; }

footer { position: relative; z-index: 1; padding: 40px 20px 120px; text-align: center; color: #9aa3b1; font-size: 12px; }
footer .end { font-family: var(--serif); font-size: 15px; color: var(--muted); letter-spacing: .1em; }
footer a { color: #9aa3b1; }
.dock { display: none; }

/* ── 平板与手机：两个人并排在首屏 ───────────────────────── */
@media (max-width: 1099px) {
  .pair { position: absolute; height: 100svh; min-height: 640px; }
  .pair img { height: 78%; top: 0; bottom: auto; width: 62%; object-fit: cover; transition: none; }
  .pair-lu, .pair-ji, .pair-lu + .depth-portrait, .pair-ji + .depth-portrait { transform: none; }
  .pair-lu { left: -4%; object-position: 30% 0; -webkit-mask-image: linear-gradient(90deg, #000 58%, transparent 96%); mask-image: linear-gradient(90deg, #000 58%, transparent 96%); }
  .pair-ji { right: -4%; left: auto; object-position: 70% 0; -webkit-mask-image: linear-gradient(270deg, #000 58%, transparent 96%); mask-image: linear-gradient(270deg, #000 58%, transparent 96%); }
  .pair::after { background: linear-gradient(180deg, rgba(255, 255, 255, .1) 0, rgba(255, 255, 255, .1) 40%, var(--night) 82%); }
  /* 首屏底部给悬浮导航栏（约 56px + 12px 边距）留出空隙，内容不贴着它 */
  .opening { min-height: calc(100svh - 64px); justify-content: flex-end; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .chat-open { margin-bottom: 22px; }
  .lede { margin-bottom: 24px; }
  .welcome { margin-top: 18px; }
  .dock { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); backdrop-filter: blur(12px); }
  .dock a { flex: 1; min-height: 44px; display: grid; place-items: center; border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--cream); }
  .dock a.gold { background: var(--gold); color: #ffffff; font-weight: 600; }
}
@media (max-width: 520px) {
  .topbar nav { display: none; }
  .roster-list { grid-template-columns: 1fr; }
  .badges { gap: 6px; }
  .phone { border-radius: 20px; margin: 0 -6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubble { animation: none; opacity: 1; }
  .pair img { transition: none; }
}

/* ── 勋章与专属工牌页 ───────────────────────── */
.badge.paused { filter: grayscale(.85) brightness(.8); }
.my-badge { width: min(280px, 80%); }
.my-badge .btn { margin-top: 10px; width: 100%; }
.card-link { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--gold); }
.card-main { position: relative; z-index: 1; max-width: 420px; margin: 0 auto; padding: 48px 20px 64px; text-align: center; }
.card-letter { margin: 0 0 24px; font: 18px/1.7 var(--serif); }
.card-badge { width: min(300px, 78vw); margin: 0 auto; }
.shelf-title { margin-top: 28px; }
.card-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.card-main .join { margin-top: 28px; }
.card-main .home { margin-top: 28px; }
@media (max-width: 1099px) { .card-page .pair { opacity: .45; } }

/* ── 认领 ───────────────────────── */
.finder-title { display: block; margin: 0 0 12px; font-family: var(--serif); font-size: 18px; }
.release { margin-top: 12px; border: 0; background: none; color: #9aa3b1; font-size: 12px; text-decoration: underline; cursor: pointer; }
.claim { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); text-align: left; }
.claim-title { margin: 0; font-family: var(--serif); font-size: 17px; text-align: center; }
.claim-why { margin: 6px 0 14px; font-size: 13px; color: var(--muted); text-align: center; }
.claim ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.claim li { counter-increment: step; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.claim li > span::before { content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border: 1px solid var(--gold); border-radius: 50%; font-size: 12px; color: var(--gold); }
.claim li > span { font-size: 14px; }
.code-box { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(74, 120, 194, .12); border: 1px dashed var(--gold); }
.code-box strong { font: 600 20px var(--serif); letter-spacing: .08em; color: var(--gold-hi); }
.code-box button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; font-size: 13px; }
.code-box a { margin-left: auto; font-size: 13px; color: var(--gold); }
.claim small { display: block; margin-top: 12px; font-size: 12px; color: #9aa3b1; text-align: center; }
.as-me { margin: 0; font-size: 13px; color: var(--gold); }
.msg .who .staff, .reply .who .staff { margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--gold); }
.key-tip { display: block; margin-top: 6px; font-size: 12px; color: #9aa3b1; }

/* ── 3D 徽章 ───────────────────────── */
.medal-row, .medal-wall { list-style: none; margin: 16px 0 0; padding: 0; }
.medal-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.medal-row .coin { width: 44px; }
.medal-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; position: relative; padding-top: 26px; }
.medal-wall::before { content: "已点亮 " attr(data-count); position: absolute; top: 0; left: 0; right: 0; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.medal-wall + .btn { margin-top: 20px; }
.medal3d { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.medal3d strong { font: 400 13px/1.3 var(--serif); }
.medal3d small { font-size: 10.5px; line-height: 1.35; color: var(--muted); }
.coin { position: relative; width: min(76px, 100%); aspect-ratio: 1; perspective: 400px; touch-action: pan-y; cursor: grab; }
.coin img, .coin .custom-face { width: 100%; height: 100%; display: block; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 6px 10px rgba(43, 52, 67, .16)); -webkit-user-drag: none; user-select: none; }
.coin.held img, .coin.held .custom-face { transition: transform .06s linear; }
/* 高光：一道斜向光带，随倾斜滑过；遮罩用徽章自身形状 */
.coin::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) var(--mx, 50%), transparent 65%); mix-blend-mode: overlay; opacity: 0; transition: opacity .3s; }
.coin.held::after { opacity: 1; }
.earned .coin { animation: float 4.5s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }
.r-rare.earned .coin img { filter: drop-shadow(0 6px 10px rgba(43, 52, 67, .16)) drop-shadow(0 0 8px rgba(74, 120, 194, .35)); }
.r-limited.earned .coin img { filter: drop-shadow(0 6px 10px rgba(43, 52, 67, .16)) drop-shadow(0 0 14px rgba(236, 209, 162, .6)); }
.r-limited.earned strong { color: var(--gold-hi); }
.locked .coin { cursor: default; }
.locked .coin img { filter: grayscale(1) brightness(.32) contrast(1.1); opacity: .7; }
.custom-face { display: grid !important; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f2a9bc, #d77391 70%); box-shadow: inset 0 0 0 4px #4a78c2, inset 0 0 0 6px #3d64a6; font: 600 15px var(--serif); color: var(--gold-hi); }
.unlock { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(43, 52, 67, .78); backdrop-filter: blur(6px); animation: fade .3s ease; }
.unlock-card { width: min(320px, 100%); padding: 28px 22px; border-radius: 22px; text-align: center; background: radial-gradient(circle at 50% 30%, rgba(74, 120, 194, .25), transparent 60%), var(--deep); border: 1px solid var(--line); }
.unlock-card .coin { width: 160px; margin: 8px auto 14px; }
.unlock-card strong { display: block; font: 400 22px var(--serif); }
.unlock-card small { display: block; margin: 6px 0 18px; color: var(--muted); font-size: 13px; }
.coin.flip img { animation: flipin 1.1s cubic-bezier(.2, .8, .2, 1); }
@keyframes flipin { from { transform: rotateY(-540deg) scale(.4); opacity: 0; } to { transform: rotateY(0) scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .earned .coin, .coin.flip img { animation: none; } }

/* ── 进站身份入口 ───────────────────────── */
.me-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #ffffff; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; flex: none; }
.me-chip.is-me { padding: 0 12px 0 4px; background: rgba(255, 255, 255, .85); color: var(--cream); font-weight: 400; border: 1px solid var(--line); }
.me-chip.is-me span:last-child { max-width: 8em; overflow: hidden; text-overflow: ellipsis; }
.me-chip img, .me-chip .ph { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #dfe5ee; font-size: 12px; }
.welcome { display: flex; align-items: center; gap: 12px; width: min(100%, 420px); margin: 26px auto 0; padding: 12px 14px; border-radius: 16px; text-align: left; text-decoration: none; background: rgba(255, 255, 255, .82); border: 1px solid rgba(74, 120, 194, .45); box-shadow: 0 0 30px rgba(74, 120, 194, .12); backdrop-filter: blur(10px); animation: glow 3s ease-in-out infinite; }
.welcome-face { width: 48px; height: 48px; flex: none; display: grid; place-items: center; }
.welcome-face img, .welcome-face .ph { width: 48px; height: 48px; object-fit: contain; }
.welcome-face img[src*="api/avatar"], .welcome-face .ph { border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); display: grid; place-items: center; background: #dfe5ee; }
.welcome-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.welcome-text strong { font: 400 16px/1.4 var(--serif); }
.welcome-text span { font-size: 12px; line-height: 1.5; color: var(--muted); }
.welcome-go { flex: none; font-size: 13px; color: var(--gold); white-space: nowrap; }
@keyframes glow { 50% { box-shadow: 0 0 40px rgba(74, 120, 194, .28); } }
@media (prefers-reduced-motion: reduce) { .welcome { animation: none; } }

.claim-video { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.cv-cover { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #e3e8ef; }
.cv-cover img { width: 100%; height: 100%; object-fit: cover; }
.cv-new { position: absolute; left: 4px; top: 4px; padding: 0 6px; border-radius: 4px; background: var(--wine); color: #fff; font-size: 10px; line-height: 16px; }
.cv-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-text em { font-style: normal; font-size: 11px; color: var(--gold); }
.cv-text strong { font-weight: 400; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* ═══ 纪眠站专属 ═══════════════════════════════ */
body { background: radial-gradient(1200px 600px at 50% -10%, #ffffff, transparent 70%), var(--night); }
/* 首屏聊天：陆总的气泡在左（深蓝），纪眠的在右（白） */
.from-ji { background: #ffffff; color: var(--cream); box-shadow: 0 4px 14px rgba(43, 52, 67, .1); }
.from-lu { background: #2f4d7e; color: #f4f7fc; border: 0; }
h1 { color: #26324a; text-shadow: 0 2px 24px rgba(255, 255, 255, .9); letter-spacing: .04em; }
.names { color: var(--gold); }
.btn.line { background: rgba(255, 255, 255, .7); }
.badge.has-art { background-image: url(assets/card-blank.webp); }
.secret { margin: -18px auto 26px; max-width: 26em; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.secret::before { content: "🐾 "; }
/* 应援墙：粉丝气泡宝石蓝白字；纪眠/陆总的回复白底 */
.msg .text { background: linear-gradient(160deg, #5b87d0, #4a78c2); color: #fff; }
.reply .text { background: #fff; color: var(--cream); }
.reply.role .text { background: linear-gradient(160deg, #ffffff, #f2f6fd); border-color: rgba(74, 120, 194, .45); }
.reply.fan .text { background: rgba(74, 120, 194, .1); color: var(--cream); }
.phone { box-shadow: 0 24px 50px rgba(43, 52, 67, .12); }
.heart[aria-pressed="true"] { border-color: #f0b25e; background: rgba(240, 178, 94, .16); color: #b86b12; }
.heart[aria-pressed="false"] span { filter: grayscale(1); opacity: .55; }
.join { background: linear-gradient(160deg, rgba(74, 120, 194, .1), rgba(229, 138, 163, .12)); }
.welcome { background: rgba(255, 255, 255, .86); box-shadow: 0 0 30px rgba(74, 120, 194, .14); }
.welcome-face img[src*="api/avatar"], .welcome-face .ph { border-color: var(--gold); }
.me-chip { background: linear-gradient(180deg, #6f9ae0, #4a78c2); }
.me-chip.is-me { background: rgba(255, 255, 255, .9); color: var(--cream); }
.topbar { background: linear-gradient(var(--night) 40%, transparent); }
.seal { border: 0; font-size: 18px; }
/* 两个人：浅色背景上的中心提亮，而不是压暗 */
.pair::after { background: radial-gradient(ellipse 34% 100% at 50% 50%, rgba(238, 240, 244, .9), rgba(238, 240, 244, .35) 70%, transparent); }
/* 纪眠变猫：人形随滚动淡出 */
.pair-ji, .pair-ji + .depth-portrait { opacity: calc(1 - var(--close) * .85); }
.kitty { position: fixed; z-index: 2; left: calc(14vw + var(--close) * 6vw); bottom: 2vh; width: min(20vw, 260px); padding: 0; border: 0; background: none; cursor: pointer; opacity: var(--close); transform: translateY(calc((1 - var(--close)) * 40px)) scale(calc(.8 + var(--close) * .2)); transition: opacity .2s linear, transform .2s linear; pointer-events: none; }
.kitty.awake { pointer-events: auto; }
.kitty img { width: 100%; height: auto; filter: drop-shadow(0 12px 18px rgba(43, 52, 67, .2)); }
.kitty.pet img { animation: purr .5s ease-in-out 3; }
@keyframes purr { 50% { transform: rotate(-3deg) scale(1.03); } }
.purr { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); white-space: nowrap; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--gold); font-size: 13px; box-shadow: 0 6px 16px rgba(43, 52, 67, .14); opacity: 0; transition: opacity .3s; }
.purr.show { opacity: 1; }
@media (max-width: 1099px) {
  .pair::after { background: linear-gradient(180deg, rgba(238, 240, 244, 0) 0, rgba(238, 240, 244, .05) 40%, var(--night) 82%); }
  .pair-ji, .pair-ji + .depth-portrait { opacity: 1; }
  /* 手机：小猫蹲在首屏右下角，点一下会呼噜 */
  /* 手机：首屏下半部提亮成底色，标题不压在人脸上 */
  .pair::after { background: linear-gradient(180deg, rgba(238, 240, 244, 0) 0, rgba(238, 240, 244, .1) 22%, rgba(238, 240, 244, .82) 46%, var(--night) 70%); }
  h1 { text-shadow: 0 1px 0 #fff, 0 2px 18px rgba(255, 255, 255, .95); }
  .actions .btn { padding: 0 16px; font-size: 14px; }
  /* 小猫蹲在欢迎卡右上角，不挡内容；点一下会呼噜 */
  .kitty { position: absolute; left: auto; right: 10px; top: -36px; bottom: auto; width: 50px; opacity: 1; transform: none; pointer-events: auto; }
  .welcome { position: relative; margin-top: 34px; }
  .welcome-go { margin-right: 48px; }
}
@media (prefers-reduced-motion: reduce) { .kitty.pet img { animation: none; } }

.badge { aspect-ratio: 648 / 1102; }
/* 会员卡色带较矮，“最久应援”做成压在卡片下边沿的蓝色小贴纸，不压照片和文字 */
.badges .badge:nth-child(2)::after { content: "最久应援"; top: 95%; box-shadow: 0 4px 10px rgba(74, 120, 194, .3); padding: .6cqi 3.4cqi; border-radius: 999px; background: var(--gold); color: #fff; font-size: 4.4cqi; letter-spacing: .12em; }

/* 姊妹站互通 */
.peers { display: grid; gap: 10px; margin-top: 18px; text-align: left; }
.peer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.peer strong { font: 400 15px var(--serif); }
.peer small { grid-column: 1; font-size: 12px; color: var(--muted); }
.peer .btn { grid-row: 1 / span 2; grid-column: 2; }
.peer.found { border-color: var(--gold); }
@media (max-width: 520px) { .peer { grid-template-columns: 1fr; } .peer .btn { grid-row: auto; grid-column: 1; margin-top: 8px; width: 100%; } }

/* ── 陪纪眠玩一会 ── */
.cat-room { padding-top: 40px; }
.cat-stage { position: relative; width: min(340px, 82vw); aspect-ratio: 1; margin: 18px auto 6px; border-radius: 50%; background: radial-gradient(circle at 50% 62%, #ffffff 0, #f3f5f9 55%, rgba(238, 240, 244, 0) 72%); }
.cat-pose, .cat-transform { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; cursor: pointer; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 14px 18px rgba(43, 52, 67, .16)); }
.cat-transform[hidden] { display: block !important; opacity: 0; pointer-events: none; } /* 隐藏时也保持渲染：iOS 对 display:none 的视频不一定加载和播放 */
.cat-transform { object-fit: cover; border-radius: 50%; inset: 0; width: 100%; height: 100%; filter: none; }
.cat-pose.pop { animation: catpop .28s ease-out; }
@keyframes catpop { from { transform: scale(.96); opacity: .6; } to { transform: none; opacity: 1; } }
.cat-pose[data-pose="idle"], .cat-pose[data-pose="loaf"], .cat-pose[data-pose="sleep"] { animation: breathe 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes breathe { 50% { transform: scale(1.015, .99); } }
.cat-say { position: absolute; left: 50%; top: 2%; transform: translate(-50%, -6px); margin: 0; padding: 6px 14px; white-space: nowrap; border-radius: 999px; background: #fff; color: var(--cream); font-size: 14px; box-shadow: 0 6px 18px rgba(43, 52, 67, .14); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.cat-say.show { opacity: 1; transform: translate(-50%, 0); }
.cat-hearts { position: absolute; inset: 0; pointer-events: none; }
.cat-hearts span { position: absolute; top: 40%; color: #e58aa3; font-size: 20px; animation: heart 1.3s ease-out forwards; }
@keyframes heart { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-90px) scale(1.2); opacity: 0; } }
.cat-mood { margin: 4px 0 14px; font-family: var(--serif); color: var(--gold); }
.cat-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cat-count { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .cat-pose, .cat-pose.pop, .cat-hearts span { animation: none !important; } }


/* 深度视差保持原人像位置；静态原图始终作为降级。 */
.pair .depth-portrait { position:absolute; pointer-events:none; }
.gyro-toggle { position:fixed; bottom:84px; right:16px; z-index:21; min-height:44px; padding:8px 14px; border:1px solid var(--line); border-radius:22px; background:var(--night); color:var(--gold); font:inherit; }
@media(max-width:520px) { .topbar { gap:8px; padding-inline:14px; } .mark { min-width:0; font-size:14px; } .topbar nav { flex-shrink:0; } .topbar nav a { padding-inline:7px; font-size:12px; } .cat-say { white-space:normal; max-width:90%; width:max-content; text-align:center; } }

/* 两张姿势图交叉淡入，眨眼使用短切换；夜间睡颜保留柔和遮光。 */
.cat-pose { opacity:0; transition:opacity .22s ease; pointer-events:none; }
.cat-pose.is-current { opacity:1; pointer-events:auto; }
.cat-pose[data-pose="blink"] { transition-duration:.07s; }
.cat-stage::before { content:""; position:absolute; inset:0; border-radius:50%; background:#233452; opacity:0; transition:opacity .6s; pointer-events:none; z-index:1; }
.cat-stage.night::before { opacity:.16; }
.cat-stage.night::after { content:"zzz"; position:absolute; top:18%; right:16%; color:#7a8494; letter-spacing:.1em; font:italic 20px var(--serif); z-index:2; pointer-events:none; }
@media(prefers-reduced-motion:reduce) { .cat-pose,.cat-stage::before { transition:none; } }

/* ── 小剧场：卡片列表由 theater.js 按 games.js 渲染；手机横滑，桌面两列 ───────── */
.new-play { display: inline-flex; align-items: center; gap: 8px; align-self: center; margin: 18px auto 0; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid rgba(74, 120, 194, .25); color: var(--cream); font-size: 13px; text-decoration: none; backdrop-filter: blur(8px); }
.new-play[hidden] { display: none !important; }
.new-play b { padding: 3px 8px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 10px; letter-spacing: .12em; }
.new-play i { font-style: normal; color: var(--gold); }
.play-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; text-align: left; }
.play-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: #fff; border: 1px solid rgba(74, 120, 194, .2); box-shadow: 0 12px 30px rgba(43, 52, 67, .1); text-decoration: none; color: var(--cream); transition: transform .2s, box-shadow .2s; }
.play-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(43, 52, 67, .16); }
.pc-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #dfe4ee, #c9d2e2); }
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20, 28, 44, .45)); }
.pc-no { position: absolute; left: 12px; bottom: 10px; z-index: 1; color: #fff; font-size: 11px; letter-spacing: .16em; }
.pc-lock { position: absolute; inset: 0; display: grid; place-items: center; font: 400 56px var(--serif); color: rgba(255, 255, 255, .85); }
.pc-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.pc-body strong { font: 400 20px/1.3 var(--serif); }
.pc-body small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.pc-progress { font-style: normal; font-size: 12px; color: var(--muted); }
.pc-go { padding: 7px 14px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; }
.play-card.soon { background: rgba(255, 255, 255, .6); border-style: dashed; box-shadow: none; }
.play-card.soon .pc-go { background: transparent; color: var(--gold); border: 1px solid currentColor; }
.play-card.done .pc-progress::before { content: "✓ "; color: var(--gold); }
@media (max-width: 640px) {
  .play-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 20px -20px 0; padding: 4px 20px 12px; scrollbar-width: none; }
  .play-list::-webkit-scrollbar { display: none; }
  .play-card { flex: 0 0 82%; scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) { .play-card { transition: none; } }

/* 已点亮徽章：悬停 / 点按时转一圈闪光，稀有度换成获取条件 */
@property --mx { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.medal-wall .earned { cursor: pointer; outline: none; border-radius: 12px; }
.medal-wall .earned:focus-visible { box-shadow: 0 0 0 2px var(--gold); }
.m-flip { display: grid; }
.m-flip > span { grid-area: 1 / 1; transition: opacity .25s ease, transform .25s ease; }
.m-flip .m-rule { opacity: 0; transform: translateY(4px); color: var(--gold); }
.medal-wall .earned.reveal .m-tag { opacity: 0; transform: translateY(-4px); }
.medal-wall .earned.reveal .m-rule { opacity: 1; transform: none; }
.medal-wall .earned.reveal .coin img { animation: medal-spin .9s cubic-bezier(.2, .8, .2, 1); }
.medal-wall .earned.reveal .coin::after { animation: medal-shine .9s ease-out; }
@media (hover: hover) {
  .medal-wall .earned:hover .m-tag { opacity: 0; transform: translateY(-4px); }
  .medal-wall .earned:hover .m-rule { opacity: 1; transform: none; }
  .medal-wall .earned:hover .coin img { animation: medal-spin .9s cubic-bezier(.2, .8, .2, 1); }
  .medal-wall .earned:hover .coin::after { animation: medal-shine .9s ease-out; }
}
@keyframes medal-spin { 0% { transform: rotateY(0) scale(1); } 55% { transform: rotateY(320deg) scale(1.12); } 100% { transform: rotateY(360deg) scale(1); } }
@keyframes medal-shine { 0% { opacity: 0; --mx: 0%; } 30% { opacity: 1; } 100% { opacity: 0; --mx: 100%; } }
@media (prefers-reduced-motion: reduce) { .medal-wall .earned .coin img, .medal-wall .earned .coin::after { animation: none !important; } }

/* ── 消息墙：领卡锁、删除按钮、发送反馈与彩蛋（msgfx.js） ───────── */
.phone { position: relative; }
.msg-lock { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, transparent); font-size: 13px; color: var(--muted); }
.msg-lock[hidden] { display: none !important; }
.msg-lock a { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--gold); color: #fff; text-decoration: none; font-weight: 600; font-size: 13px; }
.composer textarea:disabled { opacity: .55; cursor: not-allowed; }
.msg .ops button, .reply .who .del { border: 0; background: none; padding: 2px 8px; border-radius: 999px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; transition: color .15s, background .15s; }
.msg .ops button:hover { color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.msg .ops .del:hover, .reply .who .del:hover { color: #d0566b; background: rgba(208, 86, 107, .1); }
.reply .who { display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px; }
.reply .who .del { margin-left: 4px; padding: 0 8px; font-size: 11px; }
.reply { align-items: flex-start; }
.reply img, .reply .ph { margin-top: 20px; }
.fresh { animation: bubble-in .55s cubic-bezier(.2, 1.3, .4, 1) both; }
.reply.fan.fresh, .msg.fresh { transform-origin: 100% 100%; }
.reply.role.fresh { transform-origin: 0 100%; }
.glow .text { animation: bubble-glow 2.4s ease-out 2; }
.text.liked { animation: bubble-like .45s cubic-bezier(.2, 1.4, .4, 1); }
.send.done { animation: send-done .6s ease; }
.fx-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.fx-p { position: absolute; transform: translate(-50%, -50%); animation: fx-burst 1s cubic-bezier(.15, .8, .3, 1) both; will-change: transform, opacity; }
.fx-p.fx-float { animation-name: fx-float; animation-timing-function: cubic-bezier(.3, .6, .4, 1); }
.fx-p.fx-heart { animation-name: fx-heart; }
.fx-toast { position: absolute; left: 50%; top: 72px; z-index: 6; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 12px; letter-spacing: .1em; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -8px) scale(.9); transition: opacity .25s, transform .35s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.fx-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
@keyframes bubble-in { 0% { opacity: 0; transform: translateY(14px) scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes bubble-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes bubble-like { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes send-done { 0% { transform: scale(1); } 30% { transform: scale(.88); } 65% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes fx-burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); } }
@keyframes fx-float { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 12% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), var(--dy)) rotate(var(--rot)) scale(1.1); } }
@keyframes fx-heart { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); } 100% { opacity: 0; transform: translate(-50%, calc(-50% + var(--dy))) scale(1); } }
@media (prefers-reduced-motion: reduce) { .fresh, .glow .text, .text.liked, .send.done { animation: none; } .fx-layer { display: none; } }
.reply .who { font-size: 12px; color: var(--muted); padding: 0 6px; }
.reply .who time { margin-left: 6px; opacity: .7; }
.reply .text { margin: 0; padding: 9px 14px; white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.6; }
.reply.role .who { color: var(--gold); }

/* 徽章详情 + 我的小剧场 */
.unlock.detail .unlock-card { position: relative; overflow: hidden; animation: m-pop .35s cubic-bezier(.2, 1.2, .3, 1) both; }
.unlock-card .m-how { margin: 4px 0 6px; font-size: 14px; line-height: 1.6; }
.unlock-card .m-meta { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.unlock-card.locked .coin { filter: grayscale(.85) brightness(.9); opacity: .75; }
.unlock-card .spark { position: absolute; left: 50%; top: 96px; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--gold, #c9a24b); opacity: 0; animation: m-spark .9s ease-out both; }
@keyframes m-pop { from { transform: scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes m-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)); } }
@media (prefers-reduced-motion: reduce) { .unlock.detail .unlock-card { animation: none; } .unlock-card .spark { display: none; } }
.medal-wall li[role=button] { cursor: pointer; }
#games { display: grid; gap: 14px; margin: 8px 0 18px; }
.cg-game { padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--cream); }
.cg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.cg-head small { color: var(--muted); }
.cg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cg-grid figure { margin: 0; position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--cream) 8%, transparent); border: 1px solid color-mix(in srgb, var(--cream) 10%, transparent); }
.cg-grid figure button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.cg-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-grid .cg-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.cg-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.cg-grid .locked figcaption { color: var(--muted); background: none; }
.cg-ends { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cg-ends span { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--cream) 8%, transparent); color: var(--muted); }
.cg-ends span.on { background: var(--gold, #c9a24b); color: var(--night, #fff); }
.cg-zoom { flex-direction: column; gap: 10px; }
.cg-zoom img { max-width: min(96vw, 900px); max-height: 80vh; border-radius: 12px; }
.cg-zoom p { color: #fff; margin: 0; }

.recover { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.recover summary { cursor: pointer; padding: 6px 0; }
.recover .finder-row { margin-top: 6px; }
#copy-card-link { margin: 8px 0 4px; }
#open-card-link { display: flex; width: min(280px, 100%); margin: 14px auto 4px; }

.cand-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; margin-top: 8px; }
.cand { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; border: 1px solid rgba(128, 128, 128, .3); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cand img, .cand .ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: rgba(128, 128, 128, .2); }
.cand span { font-size: 13px; }

/* 身份：荣誉（银）/ 一直在（金） */
.badge.honor .title { color: #5f6b72; }
.badge.honor .no { color: #7b858b; letter-spacing: .3em; }
.badge.loyal .title { color: #8a5d0b; font-weight: 600; }
/* 金色（一直在）/ 银色（荣誉）工牌底图 */
.badge.loyal.has-art { --art: url(assets/card-gold.webp); background-image: url(assets/card-gold.webp); filter: drop-shadow(0 6px 18px rgba(211, 172, 117, .38)); }
.badge.honor.has-art { background-image: url(assets/card-silver.webp); }
.badge .sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 230, 160, .5) 50%, transparent 70%) 0 0 / 260% 100%; mix-blend-mode: soft-light; animation: badge-sheen 5s ease-in-out infinite; }
@keyframes badge-sheen { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
@media (prefers-reduced-motion: reduce) { .badge .sheen { animation: none; opacity: .5; } }
.honor-wall { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.honor-wall summary { cursor: pointer; font-weight: 600; letter-spacing: .08em; color: var(--gold-hi, var(--muted)); }
.honor-wall .sub { margin: 6px 0 10px; font-size: 13px; color: var(--muted); }
.member.honor { filter: grayscale(.4); opacity: .92; }

/* 典藏卡二选一入口 */
.cards-vs { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; gap: 20px; margin: 0 auto 28px; }
.cards-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 12px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--cream); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.cards-pick:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(43, 52, 67, .16); }
.cards-pick img { width: 100%; height: auto; border-radius: 12px; margin-bottom: 8px; background: #0b0d12; }
.cp-tag { font-size: 12px; letter-spacing: .3em; color: var(--gold); }
.cards-pick strong { font-family: var(--serif); font-weight: 400; font-size: 18px; letter-spacing: .1em; }
.cards-pick small { color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 520px) { .cards-vs { gap: 12px; } .cards-pick { padding: 8px 8px 12px; } .cards-pick small { font-size: 11px; } }

/* 金色工牌的流光只落在工牌本体上：按底图轮廓裁切，避免流光层的矩形边界在深色背景上露出来 */
.badge .sheen { -webkit-mask: var(--art) center / 100% 100% no-repeat; mask: var(--art) center / 100% 100% no-repeat; }
.badge:not(.loyal) .sheen { display: none; }
/* 分级勋章：同一枚图标，按级别换铜 / 银 / 金边框，右下角罗马数字 */
.coin[data-tier]::before { content: ""; position: absolute; inset: -3px; z-index: 1; border-radius: 50%; padding: 3px; pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.coin[data-tier="1"]::before { background: conic-gradient(from 210deg, #8a5a33, #e0a56a, #8a5a33, #c78a54, #8a5a33); }
.coin[data-tier="2"]::before { background: conic-gradient(from 210deg, #8c97a0, #f1f5f8, #8c97a0, #cfd8df, #8c97a0); }
.coin[data-tier="3"]::before { background: conic-gradient(from 210deg, #b98a2a, #ffe9a8, #b98a2a, #f3cb6a, #b98a2a); box-shadow: 0 0 14px rgba(255, 220, 130, .55); }
.tier-pip { position: absolute; right: -4px; bottom: -4px; z-index: 2; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; display: grid; place-items: center; font: 600 11px/1 var(--serif, serif); color: #1a1208; background: linear-gradient(135deg, #f7e2b0, #c9993f); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.coin[data-tier="1"] .tier-pip { background: linear-gradient(135deg, #f2c28f, #9a6034); }
.coin[data-tier="2"] .tier-pip { background: linear-gradient(135deg, #ffffff, #aab5bd); }
.locked .coin[data-tier]::before, .locked .tier-pip { filter: grayscale(1) brightness(.5); }

/* 兔兔：猫区下面的小舞台 */
.rabbit-room { margin: 34px auto 0; padding-top: 26px; border-top: 1px dashed rgba(120, 130, 150, .35); }
.rabbit-room h3 { margin: 0 0 4px; font: 400 18px/1.4 var(--serif); }
.rabbit-stage { position: relative; width: min(240px, 62vw); aspect-ratio: 1; margin: 12px auto 6px; border-radius: 50%; background: radial-gradient(circle at 50% 62%, #fff 0, #f3f5f9 55%, rgba(238, 240, 244, 0) 72%); }
.rabbit-pose { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; cursor: pointer; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 12px 16px rgba(43, 52, 67, .16)); }
.rabbit-pose[data-pose="carrot"], .rabbit-pose[data-pose="shy"] { animation: breathe 3.6s ease-in-out infinite; transform-origin: 50% 92%; }
.rabbit-say { top: -2%; }
.rabbit-note { color: var(--gold); margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .rabbit-pose { animation: none !important; } }

.claim-qq { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.claim-or { margin: 0 0 8px; font-size: 13px; opacity: .8; }
