:root {
  --i-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='2' fill='%233a2530'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%233a2530'/%3E%3Crect x='0' y='2' width='2' height='2' fill='%233a2530'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%233a2530'/%3E%3Crect x='3' y='3' width='4' height='1' fill='%233a2530'/%3E%3Crect x='2' y='4' width='6' height='3' fill='%233a2530'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%233a2530'/%3E%3C/svg%3E");
  --i-paw-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='2' fill='%23fff7ea'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%23fff7ea'/%3E%3Crect x='0' y='2' width='2' height='2' fill='%23fff7ea'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23fff7ea'/%3E%3Crect x='3' y='3' width='4' height='1' fill='%23fff7ea'/%3E%3Crect x='2' y='4' width='6' height='3' fill='%23fff7ea'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%23fff7ea'/%3E%3C/svg%3E");
  --i-paw-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='2' fill='%23ef8a55'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%23ef8a55'/%3E%3Crect x='0' y='2' width='2' height='2' fill='%23ef8a55'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23ef8a55'/%3E%3Crect x='3' y='3' width='4' height='1' fill='%23ef8a55'/%3E%3Crect x='2' y='4' width='6' height='3' fill='%23ef8a55'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%23ef8a55'/%3E%3C/svg%3E");
  --i-paw-g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='2' fill='%23ffcf96'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%23ffcf96'/%3E%3Crect x='0' y='2' width='2' height='2' fill='%23ffcf96'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23ffcf96'/%3E%3Crect x='3' y='3' width='4' height='1' fill='%23ffcf96'/%3E%3Crect x='2' y='4' width='6' height='3' fill='%23ffcf96'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%23ffcf96'/%3E%3C/svg%3E");
  --i-paw-s: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='2' fill='%23e6d3bb'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%23e6d3bb'/%3E%3Crect x='0' y='2' width='2' height='2' fill='%23e6d3bb'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23e6d3bb'/%3E%3Crect x='3' y='3' width='4' height='1' fill='%23e6d3bb'/%3E%3Crect x='2' y='4' width='6' height='3' fill='%23e6d3bb'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%23e6d3bb'/%3E%3C/svg%3E");
  --i-ears: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12'%3E%3Cpath d='M1 12 L5 1 L12 9.5 Z' fill='%233a2530' stroke='%233a2530' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M4 10.4 L5.6 5.2 L9 9.2 Z' fill='%23f2a7b4'/%3E%3Cpath d='M18 9.5 L25 1 L29 12 Z' fill='%233a2530' stroke='%233a2530' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M21 9.2 L24.4 5.2 L26 10.4 Z' fill='%23f2a7b4'/%3E%3C/svg%3E");
  --i-ears-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12'%3E%3Cpath d='M1 12 L5 1 L12 9.5 Z' fill='%23ffcf96' stroke='%23ffcf96' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M4 10.4 L5.6 5.2 L9 9.2 Z' fill='%23ef8a55'/%3E%3Cpath d='M18 9.5 L25 1 L29 12 Z' fill='%23ffcf96' stroke='%23ffcf96' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M21 9.2 L24.4 5.2 L26 10.4 Z' fill='%23ef8a55'/%3E%3C/svg%3E");
  --i-ears-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12'%3E%3Cpath d='M1 12 L5 1 L12 9.5 Z' fill='%233a2530' stroke='%233a2530' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M4 10.4 L5.6 5.2 L9 9.2 Z' fill='%23ef8a55'/%3E%3Cpath d='M18 9.5 L25 1 L29 12 Z' fill='%233a2530' stroke='%233a2530' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M21 9.2 L24.4 5.2 L26 10.4 Z' fill='%23ef8a55'/%3E%3C/svg%3E");
  --i-wall: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' shape-rendering='crispEdges'%3E%3Cg fill='%23efdcc0' opacity='.75'%3E%3Crect x='12' y='8' width='2' height='2'/%3E%3Crect x='10' y='10' width='2' height='2'/%3E%3Crect x='14' y='10' width='2' height='2'/%3E%3Crect x='12' y='12' width='2' height='2'/%3E%3C/g%3E%3Crect x='12' y='10' width='2' height='2' fill='%23f4c9b4'/%3E%3Cg fill='%23eedcc3' opacity='.8' transform='translate%2840 38%29'%3E%3Crect x='2' y='0' width='2' height='2'/%3E%3Crect x='6' y='0' width='2' height='2'/%3E%3Crect x='0' y='2' width='2' height='2'/%3E%3Crect x='8' y='2' width='2' height='2'/%3E%3Crect x='3' y='3' width='4' height='1'/%3E%3Crect x='2' y='4' width='6' height='3'/%3E%3Crect x='3' y='7' width='4' height='1'/%3E%3C/g%3E%3C/svg%3E");
  --i-wood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='60' viewBox='0 0 192 60' shape-rendering='crispEdges'%3E%3Crect width='192' height='20' fill='%23ecd3ab'/%3E%3Crect y='20' width='192' height='20' fill='%23e8cda3'/%3E%3Crect y='40' width='192' height='20' fill='%23efd8b3'/%3E%3Cg fill='%23dcbb8a'%3E%3Crect y='19' width='192' height='1'/%3E%3Crect y='39' width='192' height='1'/%3E%3Crect y='59' width='192' height='1'/%3E%3Crect x='70' y='0' width='1' height='19'/%3E%3Crect x='150' y='20' width='1' height='19'/%3E%3Crect x='30' y='40' width='1' height='19'/%3E%3Crect x='124' y='40' width='1' height='19'/%3E%3C/g%3E%3Cg fill='%23f4e2c4'%3E%3Crect y='0' width='192' height='1'/%3E%3Crect y='20' width='192' height='1'/%3E%3Crect y='40' width='192' height='1'/%3E%3C/g%3E%3Cg fill='%23e2c495'%3E%3Crect x='14' y='8' width='18' height='1'/%3E%3Crect x='96' y='27' width='12' height='1'/%3E%3Crect x='160' y='49' width='14' height='1'/%3E%3Crect x='84' y='47' width='10' height='1'/%3E%3Crect x='118' y='9' width='9' height='1'/%3E%3C/g%3E%3C/svg%3E");
  --i-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 5 Q6 0 12 5 T24 5' fill='none' stroke='%23ef8a55' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath d='M1 5h2v1h1v1h1V6h1V5h1V4h1V3h1V2h1v2H9v1H8v1H7v1H6v1H5v1H4V8H3V7H2V6H1z' fill='%23fff'/%3E%3C/svg%3E");
  --cur-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='22' viewBox='-1 -1 12 10' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='2' fill='%233a2530' stroke='%23fff' stroke-width='.7' paint-order='stroke'/%3E%3Crect x='6' y='0' width='2' height='2' fill='%233a2530' stroke='%23fff' stroke-width='.7' paint-order='stroke'/%3E%3Crect x='0' y='2' width='2' height='2' fill='%233a2530' stroke='%23fff' stroke-width='.7' paint-order='stroke'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%233a2530' stroke='%23fff' stroke-width='.7' paint-order='stroke'/%3E%3Crect x='3' y='3' width='4' height='1' fill='%233a2530' stroke='%23fff' stroke-width='.7' paint-order='stroke'/%3E%3Crect x='2' y='4' width='6' height='3' fill='%233a2530' stroke='%23fff' stroke-width='.7' paint-order='stroke'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%233a2530' stroke='%23fff' stroke-width='.7' paint-order='stroke'/%3E%3C/svg%3E") 6 2, pointer;
}
/* =====================================================================
   喵喵性格网 · 温馨猫咪主题（叠加在 base / components / 页面样式之上）
   灵感：动物森友会的木质 UI、星露谷的手作面板、猫咪后院的软萌小物件
   - 面板：奶油纸 + 深可可描边 + 硬投影，像游戏里的道具卡
   - 按钮：会被“按下去”的实体按钮，主按钮头上长着一对猫耳朵
   - 背景：小花与爪印墙纸、木地板、夜晚的串灯和月亮
   ===================================================================== */
:root {
  --ol: #3a2530;
  --ol-s: rgba(58, 37, 48, .16);
  --wood-d: #6b4636;
  --mint: #8fcfb8;
  --pink: #f2a7b4;
  --panel: 0 0 0 2.5px var(--ol), 0 7px 0 2.5px var(--ol-s);
  --panel-h: 0 0 0 2.5px var(--ol), 0 10px 0 2.5px var(--ol-s);
}
body { background: var(--cream) var(--i-wall); background-size: 64px 64px; }
::selection { background: #ffcf96; color: var(--ink); }

/* ---------- 品牌字：耳朵长在字上 ---------- */
.ears { position: relative; display: inline-block; }
.ears::before { content: ""; position: absolute; left: 50%; top: -.3em; width: .92em; height: .37em; transform: translateX(-50%); background: var(--i-ears) center / contain no-repeat; pointer-events: none; transition: transform .25s; }
[data-dark] .ears::before, .top.dark .ears::before, .r-end .ears::before { background-image: var(--i-ears-l); }
.ears:hover::before, .brand:hover .ears::before { animation: ear .6s ease; }
@keyframes ear { 30% { transform: translateX(-50%) rotate(-6deg) scaleY(.8); } 60% { transform: translateX(-50%) rotate(4deg); } }
.brand b { letter-spacing: .08em; }
.brand .ears::before { top: -.36em; }

/* ---------- 面板 ---------- */
.card { border-radius: 20px; box-shadow: var(--panel); }
.kicker { color: var(--apricot-d); letter-spacing: .04em; }
.kicker::before { width: 17px; height: 14px; background: var(--i-paw-o) center / contain no-repeat; box-shadow: none; transform: rotate(-14deg); margin-right: 2px; }
.sec-head h2 { letter-spacing: -.01em; }

/* ---------- 按钮：实体感 + 猫耳 + 爪印箭头 ---------- */
.btn { position: relative; border-radius: 14px; box-shadow: 0 0 0 2.5px var(--ol), 0 4px 0 2.5px var(--ol); transition: transform .12s ease, box-shadow .12s ease, background .2s, filter .2s; cursor: var(--cur-paw); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 2.5px var(--ol), 0 6px 0 2.5px var(--ol); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 2.5px var(--ol), 0 1px 0 2.5px var(--ol); }
.btn-primary { --bg: var(--apricot); color: #fff; text-shadow: 0 1px 0 rgba(140, 60, 20, .35); background-image: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 48%); box-shadow: 0 0 0 2.5px var(--ol), 0 4px 0 2.5px var(--ol); margin-top: 6px; }
.btn-primary:hover { --bg: #f49a66; box-shadow: 0 0 0 2.5px var(--ol), 0 6px 0 2.5px var(--ol); }
.btn-primary::before { content: ""; position: absolute; left: 14px; top: -13px; width: 34px; height: 14px; background: var(--i-ears-o) center / contain no-repeat; transform-origin: 50% 100%; pointer-events: none; }
.btn-primary:hover::before { animation: earBtn .5s ease; }
@keyframes earBtn { 35% { transform: scaleY(.72) rotate(-4deg); } 70% { transform: scaleY(1.08); } }
.btn-small.btn-primary::before { left: 10px; top: -10px; width: 26px; height: 11px; }
.btn-ghost { --bg: var(--paper); box-shadow: 0 0 0 2.5px var(--ol), 0 4px 0 2.5px var(--ol-s); }
.btn-ghost:hover { --bg: #fff6ea; box-shadow: 0 0 0 2.5px var(--ol), 0 6px 0 2.5px var(--ol-s); }
.btn-ghost:active { box-shadow: 0 0 0 2.5px var(--ol), 0 1px 0 2.5px var(--ol-s); }
.btn-ghost.on-dark { --bg: rgba(255, 240, 220, .06); color: var(--night-ink); box-shadow: 0 0 0 2px rgba(255, 207, 150, .55), 0 4px 0 2px rgba(0, 0, 0, .4); }
.btn-ghost.on-dark:hover { --bg: rgba(255, 240, 220, .12); box-shadow: 0 0 0 2px #ffcf96, 0 6px 0 2px rgba(0, 0, 0, .4); }
.btn .arr { display: inline-block; width: 15px; height: 12px; font-size: 0; background: var(--i-paw-w) center / contain no-repeat; transform: rotate(90deg); transition: transform .2s; flex: none; }
.btn:hover .arr { transform: translateX(4px) rotate(90deg); }
.btn .arr.up { transform: none; }
.btn:hover .arr.up { transform: translateY(-3px); }
.btn-ghost:not(.on-dark) .arr { background-image: var(--i-paw); }
.btn[disabled] { opacity: .5; filter: saturate(.4); }
button:not(.btn), a, label[tabindex], summary { cursor: var(--cur-paw); }

/* 分段控件：像积木开关 */
.seg { border-radius: 12px; background: #f1e4d2; box-shadow: inset 0 0 0 2px var(--ol-s); }
.seg button { border-radius: 9px; }
.seg button[aria-checked=true], .seg button[aria-pressed=true] { background: var(--ol); color: #fff4e4; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }

/* ---------- 顶栏 ---------- */
.top.light { background: rgba(251, 243, 231, .9); box-shadow: 0 2px 0 var(--ol-s); }
.top.dark { background: rgba(29, 20, 24, .78); }

/* ---------- 点击爪印 / 小爆炸 ---------- */
.pawfx { position: fixed; z-index: 99; width: 20px; height: 16px; margin: -8px 0 0 -10px; background: var(--i-paw-o) center / contain no-repeat; pointer-events: none; animation: pawfx .7s ease-out forwards; }
@keyframes pawfx { 0% { transform: scale(.3) rotate(var(--r, 0deg)); opacity: 1; } 40% { transform: scale(1.15) rotate(var(--r, 0deg)); opacity: 1; } 100% { transform: translateY(-14px) scale(.9) rotate(var(--r, 0deg)); opacity: 0; } }
.burst { position: fixed; z-index: 99; pointer-events: none; width: 0; height: 0; }
.burst i { position: absolute; width: 12px; height: 10px; margin: -5px 0 0 -6px; background: var(--i-paw-g) center / contain no-repeat; animation: burst .8s cubic-bezier(.2, .8, .3, 1) forwards; }
.burst i:nth-child(3n) { background: none; width: 7px; height: 7px; border-radius: 1px; background-color: #ffcf96; box-shadow: 0 0 8px #ffcf96; }
.burst i:nth-child(3n+1) { background-image: var(--i-paw-o); }
@keyframes burst { from { transform: translate(0, 0) scale(.4); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(1); opacity: 0; } }

/* ---------- 本地文件提示条 ---------- */
.file-tip { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; width: min(760px, calc(100% - 24px)); display: flex; gap: 14px; align-items: center; padding: 14px 16px 14px 18px; border-radius: 16px; background: #fff3dc; color: #5e3e1c; font-size: 14px; line-height: 1.6; box-shadow: var(--panel), 0 20px 40px -18px rgba(60, 30, 20, .45); animation: tipIn .5s cubic-bezier(.2, .9, .3, 1.2); }
.file-tip::before { content: ""; flex: none; width: 34px; height: 28px; background: var(--i-paw-o) center / contain no-repeat; }
.file-tip b { color: var(--ol); }
.file-tip code { font-family: var(--mono); background: rgba(0, 0, 0, .06); padding: 1px 6px; border-radius: 4px; }
.file-tip button { margin-left: auto; flex: none; border: 0; background: none; font-size: 22px; line-height: 1; color: #9a7a5a; padding: 4px 6px; }
@keyframes tipIn { from { transform: translate(-50%, 30px); opacity: 0; } }

/* ---------- 串灯（首屏、收尾、报告页头） ---------- */
.lights { position: absolute; left: 0; right: 0; top: var(--lt, 0px); height: 90px; pointer-events: none; z-index: 0; }
.lights svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lights i { position: absolute; width: 8px; height: 10px; margin-left: -4px; border-radius: 2px 2px 4px 4px; background: var(--c); box-shadow: 0 0 10px 2px var(--c), 0 0 26px 6px color-mix(in srgb, var(--c) 40%, transparent); animation: twinkle var(--d, 3s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
.lights i::before { content: ""; position: absolute; left: 1px; top: -4px; width: 6px; height: 4px; background: #4a3a3a; border-radius: 1px; }
@keyframes twinkle { 50% { opacity: .45; box-shadow: 0 0 6px 1px var(--c); } }
.moon { position: absolute; right: max(6vw, 24px); top: 118px; width: 46px; height: 46px; border-radius: 50%; box-shadow: 11px -7px 0 0 #ffe9b8; filter: drop-shadow(0 0 18px rgba(255, 225, 160, .55)); pointer-events: none; }
.stars { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(1.5px 1.5px at 12% 22%, #fff3d6, transparent), radial-gradient(1.5px 1.5px at 28% 8%, #fff3d6, transparent), radial-gradient(1px 1px at 46% 30%, #ffe7b8, transparent), radial-gradient(1.5px 1.5px at 64% 14%, #fff3d6, transparent), radial-gradient(1px 1px at 78% 34%, #ffe7b8, transparent), radial-gradient(1.5px 1.5px at 90% 6%, #fff3d6, transparent), radial-gradient(1px 1px at 6% 40%, #ffe7b8, transparent), radial-gradient(1px 1px at 55% 4%, #fff, transparent); animation: twinkle 5s ease-in-out infinite; }

/* 扇贝边（夜晚 → 白天的过渡，像店铺的遮阳篷） */
.scallop { height: 22px; margin-top: -1px; background: radial-gradient(circle at 14px 0, var(--sc, var(--night)) 13px, transparent 14px) repeat-x; background-size: 28px 22px; position: relative; z-index: 2; }
.scallop.up { transform: scaleY(-1); margin: 0 0 -1px; }

/* 爪印小径 */
.paw-trail { display: flex; justify-content: center; gap: clamp(10px, 2vw, 22px); padding: 6px 0; pointer-events: none; }
.paw-trail i { width: 16px; height: 13px; background: var(--i-paw-s) center / contain no-repeat; transform: rotate(90deg) translateX(var(--o, 0)); opacity: 0; animation: step 4.8s steps(1) infinite; animation-delay: calc(var(--k) * .3s); }
.paw-trail i:nth-child(odd) { --o: -6px; }
.paw-trail i:nth-child(even) { --o: 6px; }
@keyframes step { 0% { opacity: 0; } 4% { opacity: 1; } 70% { opacity: 1; } 76% { opacity: 0; } }

/* ---------- 舞台：木质画框 + RPG 对话框 ---------- */
.stage-shell.below { border-radius: 18px; box-shadow: 0 0 0 3px var(--ol), 0 0 0 10px var(--wood-d), 0 0 0 13px var(--ol), 0 36px 70px -24px rgba(0, 0, 0, .65); background: #22171d; margin: 13px; }
.stage-shell.below .dialog { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; row-gap: 10px; align-items: baseline; box-shadow: inset 0 3px 0 #f2dcb8, inset 0 6px 0 var(--ol); padding-top: 22px; }
.stage-shell.below .dialog-tag, .dialog-tag { position: static; grid-column: 1 / -1; justify-self: start; display: inline-flex; margin: 0; box-shadow: 0 0 0 2px var(--ol), 0 3px 0 2px rgba(0, 0, 0, .35); border-radius: 6px; padding: 3px 10px 3px 8px; }
.dialog-tag::before { content: ""; width: 12px; height: 10px; background: var(--i-paw-w) center / contain no-repeat; margin-right: 6px; }
.stage-hint { box-shadow: 0 0 0 1.5px rgba(255, 236, 200, .35); }
@media (max-width: 760px) {
  .stage-shell.below { margin: 8px; box-shadow: 0 0 0 2px var(--ol), 0 0 0 6px var(--wood-d), 0 0 0 8px var(--ol), 0 24px 40px -20px rgba(0, 0, 0, .6); }
  .stage-shell.below .dialog { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 维度光谱：像温度计 ---------- */
.spec-bar { height: 12px; box-shadow: inset 0 0 0 2px var(--ol-s); background: linear-gradient(90deg, rgba(44, 33, 30, .14) 0 15.5%, rgba(44, 33, 30, .07) 15.5% 35.5%, rgba(44, 33, 30, .02) 35.5% 64.5%, rgba(44, 33, 30, .07) 64.5% 84.5%, rgba(44, 33, 30, .14) 84.5%); }
.spec-bar i { width: 22px; height: 22px; margin: -11px 0 0 -11px; box-shadow: 0 0 0 2.5px var(--ol), 0 3px 0 2px var(--ol-s); border-radius: 7px; }

/* ---------- 像素猫编辑器 ---------- */
.mc-tray { display: grid; gap: 10px; }
.mc-drop { border-radius: 18px; border: 2.5px dashed #d8bfa4; background: #fffaf2; }
.mc-drop:hover, .mc-drop.over { border-color: var(--apricot); background: #fff1e2; }
.mc-drop-ico { width: 64px; height: 52px; margin-bottom: 6px; background: var(--i-paw-o) center / 44px auto no-repeat, #fde6d6; border-radius: 16px; box-shadow: 0 0 0 2.5px var(--ol); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.mc-drop.mini { flex-direction: row; padding: 10px 14px; gap: 10px; text-align: left; }
.mc-drop.mini .mc-drop-ico { width: 36px; height: 30px; margin: 0; background-size: 24px auto; border-radius: 10px; }
.mc-drop.mini .mc-drop-s { display: none; }
.mc-drop.full { opacity: .55; pointer-events: none; }
.mc-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mc-thumbs li { position: relative; aspect-ratio: 1; animation: pop .35s cubic-bezier(.2, .9, .3, 1.3); }
.mc-thumbs span { position: absolute; inset: 0; border-radius: 12px; background: var(--sand) center / cover no-repeat; box-shadow: 0 0 0 2.5px var(--ol), 0 4px 0 2.5px var(--ol-s); }
.mc-thumbs li:nth-child(odd) span { transform: rotate(-2deg); }
.mc-thumbs li:nth-child(even) span { transform: rotate(2deg); }
.mc-thumbs button { position: absolute; right: -6px; top: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ol); color: #fff; font-size: 15px; line-height: 1; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.mc-breeds { margin-top: 14px; }
.mc-breeds .mc-l { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mc-random { margin-left: auto; border: 0; background: none; color: var(--apricot-d); font-weight: 800; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.mc-bscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 84px; gap: 8px; overflow-x: auto; padding: 4px 4px 12px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.mc-bscroll button { scroll-snap-align: start; display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 2px var(--ol-s); font-size: 11.5px; font-weight: 700; color: var(--ink2); line-height: 1.25; text-align: center; transition: transform .15s, box-shadow .15s; }
.mc-bscroll button:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--apricot); }
.mc-bscroll button[aria-selected=true] { box-shadow: 0 0 0 2.5px var(--ol), 0 4px 0 2.5px var(--ol-s); background: #fff1e2; color: var(--ink); }
.mc-bscroll canvas { width: 64px; height: 52px; }
.mc-show { border-radius: 18px; box-shadow: 0 0 0 2.5px var(--ol); background: radial-gradient(60% 50% at 50% 30%, rgba(255, 244, 222, .9), transparent 70%), linear-gradient(180deg, #f7e3c4 0 62%, #e9c99d 62% 100%); }
.mc-show::before { content: ""; position: absolute; left: 8%; top: 10%; width: 22%; height: 34%; border-radius: 8px; background: linear-gradient(90deg, transparent 47%, #c9a27a 47% 53%, transparent 53%), linear-gradient(transparent 47%, #c9a27a 47% 53%, transparent 53%), linear-gradient(180deg, #cfe8f2, #fdf1d8); box-shadow: 0 0 0 4px #c9a27a; opacity: .7; }
.mc-badge { box-shadow: 0 0 0 2px var(--ol); }
.mc-badge[data-src=breed] { background: #fde6d6; }
.mc-note[data-kind=warn] { background: #fff3dc; color: #6b4a20; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 2px #f2d29c; }
.mc-edit { box-shadow: inset 0 0 0 2px var(--ol-s); }
.mc-tog { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink2); cursor: var(--cur-paw); }
.mc-tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mc-tog i { width: 36px; height: 22px; border-radius: 99px; background: #e5d6c4; box-shadow: inset 0 0 0 2px var(--ol-s); position: relative; transition: background .2s; flex: none; }
.mc-tog i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.mc-tog input:checked + i { background: var(--apricot); }
.mc-tog input:checked + i::after { transform: translateX(14px); }
.mc-tog input:focus-visible + i { outline: 3px solid var(--apricot); outline-offset: 2px; }
.mc .seg button { padding: 6px 8px; }

@media (prefers-reduced-motion: reduce) { .pawfx, .burst, .lights i, .paw-trail i { animation: none !important; } .paw-trail i { opacity: 1; } }

/* 对话框放在画面下方时，画框跟着内容长高（之前标签被画框裁掉） */
.stage-shell.below .stage-frame { aspect-ratio: auto; }
.stage-shell.below .stage-frame canvas { display: block; height: auto; aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  .stage-shell .stage-frame { aspect-ratio: auto; }
  .stage-shell .stage-frame canvas { display: block; height: auto; aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  .file-tip { position: relative; left: auto; bottom: auto; transform: none; margin: 10px auto; animation: none; font-size: 13px; }
}

/* ---------- 识别按钮 ---------- */
.mc-go-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.mc-quota { font-size: 12.5px; color: var(--muted); }
.mc-quota[data-out="1"] { color: #b4652f; }
.mc.busy .mc-go { animation: goPulse 1s ease-in-out infinite; }
@keyframes goPulse { 50% { filter: brightness(1.1); } }

/* =====================================================================
   性格闪卡
   ===================================================================== */
.mcard { position: relative; width: min(330px, 100%); aspect-ratio: 5 / 7; margin: 0 auto; }
.mcard-cv { width: 100%; height: 100%; display: block; filter: drop-shadow(0 26px 28px rgba(0, 0, 0, .45)); cursor: grab; outline: none; -webkit-tap-highlight-color: transparent; }
.mcard-cv:active { cursor: grabbing; }
.mcard-cv:focus-visible { outline: 3px solid #ffcf96; outline-offset: 6px; border-radius: 18px; }
.mcard-tip { text-align: center; font-size: 12.5px; margin-top: 12px; opacity: .75; }
/* 全屏查看 + 开卡仪式 */
html.cv-open { overflow: hidden; }
.cardview { --glow: #ffcf96; position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; padding: 22px 16px 22px; overflow: hidden; color: #fff4e4; background: radial-gradient(60% 50% at 50% 40%, color-mix(in srgb, var(--glow) 30%, #1b1317), #110b0e 78%); animation: fadeIn .3s; }
.cv-stage { position: relative; z-index: 2; height: min(70vh, 640px); aspect-ratio: 5 / 7; max-width: 88vw; }
.cv-stage .mcard-cv { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); }
.cv-rays { position: absolute; left: 50%; top: 40%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; pointer-events: none; opacity: .3; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 34%, transparent) 0deg 6deg, transparent 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 52%); mask-image: radial-gradient(circle, #000 0, transparent 52%); animation: spin 50s linear infinite; transition: opacity .8s; }
.cv-rays.rainbow { background: repeating-conic-gradient(from 0deg, rgba(255, 120, 140, .4) 0deg 5deg, transparent 5deg 12deg, rgba(255, 220, 120, .4) 12deg 17deg, transparent 17deg 24deg, rgba(120, 220, 255, .4) 24deg 29deg, transparent 29deg 36deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.cardview.sealed .cv-rays { opacity: .1; }
.cardview.opening .cv-rays { opacity: .95; animation-duration: 5s; }
.cardview[data-tier=base].opening .cv-rays { opacity: .5; }
.cardview.sealed .cv-stage::before { content: ""; position: absolute; inset: 10% 6%; border-radius: 30px; background: var(--glow); filter: blur(42px); opacity: .45; animation: sealGlow 1.8s ease-in-out infinite; }
@keyframes sealGlow { 50% { opacity: .75; transform: scale(1.04); } }
.cv-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.cardview.opened .cv-flash { animation: cvFlash .9s ease-out; }
.cardview[data-tier=legend].opened .cv-flash, .cardview[data-tier=hidden].opened .cv-flash { animation-duration: 1.5s; }
.cardview[data-tier=hidden] .cv-flash { background: #e9c46a; }
@keyframes cvFlash { 0% { opacity: .9; } 100% { opacity: 0; } }
.cv-close { position: absolute; right: 14px; top: 10px; z-index: 4; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 240, 220, .1); color: #fff4e4; font-size: 26px; line-height: 1; }
.cv-close:hover { background: rgba(255, 240, 220, .2); }
.cv-info { position: relative; z-index: 2; display: grid; gap: 6px; justify-items: center; text-align: center; max-width: 600px; }
.cv-hint { font-size: 13.5px; color: rgba(255, 240, 220, .7); }
.cardview.sealed .cv-hint { font-size: 17px; font-weight: 800; color: #fff4e4; animation: bob 1.6s ease-in-out infinite; }
.cv-title { display: grid; gap: 2px; justify-items: center; animation: cvTitle .7s cubic-bezier(.2, .9, .3, 1.2); }
.cv-title[hidden], .cv-ctl[hidden] { display: none; }
@keyframes cvTitle { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.cv-rar { font-weight: 800; letter-spacing: .12em; color: #ffcf96; font-size: 14px; }
.cv-rar span { color: #ffd36b; margin-right: 8px; letter-spacing: 2px; }
.cardview[data-tier=rare] .cv-rar span { color: #dfe8f5; }
.cv-title h2 { font-family: var(--serif, serif); font-size: clamp(30px, 5vw, 44px); line-height: 1.15; color: #fff; text-shadow: 0 0 24px color-mix(in srgb, var(--glow) 70%, transparent); }
.cv-flavor { font-family: var(--serif, serif); color: rgba(255, 240, 220, .82); font-size: 15.5px; }
.cv-ctl { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-top: 8px; }
.cv-ctl .seg-dark { background: rgba(255, 255, 255, .08); }
.cv-ctl .seg-dark button { color: rgba(255, 240, 220, .8); padding: 7px 14px; }
.cv-ctl .seg-dark button[aria-checked=true] { background: #ffcf96; color: #3a2530; }
.cv-gyro.on { box-shadow: 0 0 0 2px #8fcfb8, 0 4px 0 2px rgba(0, 0, 0, .4); }
.cv-msg { min-height: 1.3em; font-size: 13px; color: rgba(255, 240, 220, .75); }
@media (max-width: 760px) {
  .cv-stage { height: min(62vh, 560px); }
  .cv-title h2 { font-size: 28px; }
}
.cv-stage .mcard-cv:focus-visible { outline: none; }

/* ---------- 长按保存（微信、小红书里打开时） ---------- */
.lp-save { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; background: rgba(12, 8, 10, .96); color: #f6ead8; text-align: center; }
.lp-save img { max-width: min(92vw, 520px); max-height: 74vh; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); -webkit-touch-callout: default; user-select: auto; }
.lp-save p { margin: 0; font-size: 15px; }
.lp-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 24px; cursor: pointer; }
.mc-privacy { margin: 6px 0 0; font-size: 12px; color: var(--muted); padding-left: 18px; background: var(--i-paw-g, none) 0 50% / 12px 10px no-repeat; }
@media (max-width: 760px) {
  .mc-sw button { width: 32px; height: 32px; }
  .mc-random { white-space: nowrap; }
}
