/* 共用组件：像素猫编辑器、维度光谱、流向图提示 */

/* ---------- 像素猫编辑器 ---------- */
.mc { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(18px, 3vw, 36px); padding: clamp(18px, 3vw, 32px); }
.mc-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 18px 22px; border-radius: 18px; cursor: pointer; background: var(--cream); border: 2px dashed var(--line2); transition: border-color .2s, background .2s; }
.mc-drop:hover, .mc-drop.over { border-color: var(--apricot); background: #fff4ea; }
.mc-photo { width: 128px; height: 128px; border-radius: 16px; margin-bottom: 8px; background: var(--sand) center / cover no-repeat; display: grid; place-items: center; }
.mc-photo:not(.has)::before { content: ""; width: 42px; height: 34px; background: var(--muted); opacity: .55; clip-path: polygon(0 28%, 28% 28%, 38% 8%, 62% 8%, 72% 28%, 100% 28%, 100% 100%, 0 100%); }
.mc-drop-t { font-weight: 800; font-size: 16.5px; }
.mc-drop-s { font-size: 13.5px; color: var(--muted); max-width: 26em; }
.mc-steps { list-style: none; padding: 0; margin: 18px 0 6px; display: grid; gap: 8px; counter-reset: s; }
.mc-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); }
.mc-steps li::before { content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sand); font-size: 12px; font-weight: 800; flex: none; }
.mc-steps li.on { color: var(--ink); }
.mc-steps li.on::before { background: var(--apricot); color: #fff; animation: mcp 1s ease-in-out infinite; }
.mc-steps li.done { color: var(--ink2); }
.mc-steps li.done::before { content: "✓"; background: var(--sage); color: #fff; }
@keyframes mcp { 50% { transform: scale(1.14); } }
.mc-msg { min-height: 1.5em; font-size: 14px; color: var(--apricot-d); margin: 4px 0 10px; }
.mc-show { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; background: radial-gradient(120% 90% at 50% 8%, #fff4de 0%, #f4dbb7 55%, #e4bf93 100%); }
.mc-canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.mc-badge { position: absolute; left: 12px; top: 12px; font-size: 12.5px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--ink); }
.mc-badge[data-src=ai] { background: var(--ink); color: #ffe1b0; }
.mc-poses { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; background: rgba(36, 24, 28, .55); border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mc-poses button { border: 0; background: transparent; color: #fff4e4; font-size: 13.5px; padding: 6px 12px; min-height: 34px; border-radius: 999px; white-space: nowrap; }
.mc-poses button[aria-pressed=true] { background: #fff4e4; color: var(--ink); font-weight: 800; }
.mc-note { font-size: 14px; color: var(--ink2); margin-top: 12px; }
.mc-edit { margin-top: 14px; border-radius: 14px; background: var(--cream); }
.mc-edit summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; font-weight: 800; font-size: 15px; }
.mc-edit summary::-webkit-details-marker { display: none; }
.mc-edit summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--muted); }
.mc-edit[open] summary::after { content: "–"; }
.mc-edit summary small { font-weight: 400; color: var(--muted); font-size: 13px; }
.mc-fields { display: grid; gap: 14px; padding: 0 16px 16px; }
.mc-f { display: grid; gap: 6px; }
.mc-f.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.mc-f.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mc-f.two > div, .mc-f.three > div { display: grid; gap: 6px; align-content: start; }
.mc-l { font-size: 13px; font-weight: 800; color: var(--ink2); }
.mc-l output { font-weight: 400; color: var(--muted); margin-left: 4px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-chips button { border: 0; padding: 7px 13px; min-height: 38px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line2); font-size: 14px; }
.mc-chips button[aria-checked=true] { background: var(--ink); color: #fff; box-shadow: none; }
.mc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc input[type=color] { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; flex: none; }
.mc input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.mc input[type=color]::-webkit-color-swatch { border-radius: 8px; border: 1px solid var(--line2); }
.mc input[type=color]:disabled { opacity: .35; cursor: not-allowed; }
.mc-sw { display: flex; flex-wrap: wrap; gap: 5px; }
.mc-sw button { width: 26px; height: 26px; border-radius: 8px; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.mc-sw button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--apricot); }
.mc input[type=range] { width: 100%; accent-color: var(--apricot); min-height: 30px; }
.mc .seg { display: grid; width: 100%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.mc .seg button[aria-checked=true] { background: var(--ink); color: #fff; }
.mc.busy .mc-drop { pointer-events: none; opacity: .7; }

/* ---------- 维度光谱 ---------- */
.spec { padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec:last-child { border-bottom: 0; }
.spec-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.spec-h b { font-size: 16px; }
.spec-en { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.spec-v { font: 800 18px var(--mono); }
.spec-lv { font-size: 12.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.spec-bar { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, rgba(44, 33, 30, .06) 0 34%, rgba(44, 33, 30, .1) 34% 66%, rgba(44, 33, 30, .06) 66%); }
.spec-bar i { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--paper), 0 2px 6px rgba(0, 0, 0, .25); }
.spec-t { font-size: 14px; color: var(--ink2); margin-top: 8px; }

/* ---------- 流向图 ---------- */
.flow-wrap { position: relative; }
.flow-cv { width: 100%; display: block; }
.flow-tip { position: absolute; width: 250px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #f8efe2; font-size: 13.5px; line-height: 1.55; pointer-events: none; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .45); z-index: 2; display: grid; gap: 4px; }
.flow-tip small { color: #b8a294; display: flex; align-items: center; gap: 6px; }
.flow-tip small i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.flow-tip em { font-style: normal; font: 800 14px var(--mono); color: #b8a294; }
.flow-tip em.up { color: #ffcf8a; }
.flow-tip em.down { color: #9fd3d4; }

@media (max-width: 860px) {
  .mc { grid-template-columns: minmax(0, 1fr); }
  .mc-f.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mc-f.three > div:last-child { grid-column: 1 / -1; }
}
