/* ══════════ MCP 接入 · 实录（static/js/95z2-mcp-reel.js）══════════
   颜色只用 app.css 的 token：「炫」来自阴影、光晕和动效，不来自新的配色或天气。
   左边的 agent 窗口两种主题下都是深色 —— 终端本来就是深色的，它也是这一块的对比。
   入场用一条带回弹的曲线（近似 ColorOS 的弹簧），--d 错开每一件的时刻。 */
:root{--mc-term:#101215;--mc-term-line:rgba(255,255,255,.07);--mc-term-ink:#e7e9ed;--mc-term-dim:#8b909a;--mc-term-ok:#6fd4be}
:root[data-theme="dark"]{--mc-term:#08090b}
.mc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ── 标题 ── */
.mc-head .mc-kicker{color:var(--accent-ink);letter-spacing:.12em;margin-bottom:10px}
.mc-head .display{font-size:46px;font-weight:500;letter-spacing:-.035em}
.mc-head .lede{max-width:70ch}

/* ── 实录 ── */
#mcp-reel-host{max-width:1120px;margin:0 0 34px}
.mc-reel{position:relative;isolation:isolate;border:1px solid var(--line);border-radius:18px;background:var(--surface);
  box-shadow:var(--pop),0 30px 80px -40px color-mix(in srgb,var(--accent) 45%,transparent);overflow:hidden}
.mc-stage{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);min-height:460px}

.mc-term{display:flex;flex-direction:column;background:var(--mc-term);color:var(--mc-term-ink);min-width:0}
.mc-term.sk,.mc-result.sk{min-height:460px}
.mc-term-bar{display:flex;align-items:center;gap:6px;height:36px;padding:0 14px;border-bottom:1px solid var(--mc-term-line);
  font:11px var(--mono);color:var(--mc-term-dim)}
.mc-term-bar i{width:9px;height:9px;border-radius:50%;background:#30333a}
.mc-term-bar span{margin-left:8px}
.mc-term-body{flex:1;display:flex;flex-direction:column;gap:7px;padding:18px 20px;overflow:hidden;font:12.5px/1.65 var(--mono)}
.mc-t{animation:mcLine .3s var(--ease) both}
@keyframes mcLine{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.mc-t-user{font:500 14.5px/1.55 var(--sans);color:#fff;margin-bottom:6px;display:flex;gap:9px}
.mc-t-mark{color:var(--mc-term-ok);font-family:var(--mono)}
.mc-t-typed::after{content:"";display:inline-block;width:7px;height:1.05em;margin-left:2px;vertical-align:-2px;background:var(--mc-term-ok);
  animation:mcCaret 1s steps(1) infinite}
.mc-t-user:not(:last-child) .mc-t-typed::after{display:none}
@keyframes mcCaret{50%{opacity:0}}
.mc-t-call{color:var(--mc-term-ink);display:flex;align-items:baseline;flex-wrap:wrap;gap:0 4px}
.mc-t-call b{color:var(--mc-term-ok);font-weight:600}
.mc-t-dot{width:8px;height:8px;border-radius:50%;background:var(--mc-term-ok);margin-right:6px;align-self:center;
  box-shadow:0 0 0 0 rgba(111,212,190,.5);animation:mcPing 1.4s ease-out infinite}
@keyframes mcPing{to{box-shadow:0 0 0 9px rgba(111,212,190,0)}}
.mc-t-args{color:var(--mc-term-dim);overflow-wrap:anywhere}
.mc-t-stage{display:flex;align-items:center;gap:9px;padding-left:16px;color:var(--mc-term-dim)}
.mc-t-stage.is-done{color:#c9ccd3}
.mc-t-spin{flex:none;width:11px;height:11px;border-radius:50%;border:1.6px solid rgba(255,255,255,.18);border-top-color:var(--mc-term-ok);
  animation:mcSpin .7s linear infinite}
.is-done .mc-t-spin{border:0;animation:none;width:11px;height:auto;display:inline-flex;justify-content:center}
.is-done .mc-t-spin::before{content:"✓";color:var(--mc-term-ok);font-size:11px;line-height:1}
@keyframes mcSpin{to{transform:rotate(360deg)}}
.mc-t-at{margin-left:auto;font-size:11px;color:#5f6570;font-variant-numeric:tabular-nums}
.mc-t-done{color:var(--mc-term-ok);font-weight:600;margin-top:2px}
.mc-t-ok{margin-right:6px}
.mc-t-reply{margin-top:6px;padding:10px 13px;border:1px solid var(--mc-term-line);border-radius:12px;background:rgba(255,255,255,.045);
  font:13.5px/1.6 var(--sans);color:var(--mc-term-ink)}

/* ── 结果区 ── */
.mc-result{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;
  padding:30px 28px 20px;min-width:0;overflow:hidden;background:var(--surface-2)}
.mc-r-aura{position:absolute;inset:-25%;z-index:0;opacity:0;pointer-events:none;transition:opacity .9s var(--ease);
  background:radial-gradient(closest-side at 50% 52%,color-mix(in srgb,var(--accent) 24%,transparent),transparent 72%)}
.is-shown .mc-r-aura{opacity:1;animation:mcAura 7s ease-in-out infinite alternate}
@keyframes mcAura{from{transform:translate(-3%,2%) scale(1)}to{transform:translate(3%,-2%) scale(1.08)}}
/* 运行中：结果已经在那儿，只是还「没显影」—— 模糊、褪色，上面一枚药丸写着正在走的那一步；
   跑完那一刻清晰过来，同时每一件弹一下。 */
.mc-r-wait{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;pointer-events:none;
  transition:opacity .35s var(--ease)}
.mc-r-wait-pill{display:flex;align-items:center;gap:10px;max-width:80%;padding:9px 16px;border-radius:999px;font-size:13px;color:var(--ink);
  background:color-mix(in srgb,var(--surface) 82%,transparent);border:1px solid var(--line);box-shadow:var(--pop);backdrop-filter:blur(8px)}
.mc-r-wait .mc-t-spin{border-color:var(--line-2);border-top-color:var(--accent)}
.is-shown .mc-r-wait{opacity:0}
.mc-r-art{position:relative;z-index:1;flex:1;width:100%;display:flex;align-items:center;justify-content:center;min-height:0;
  transition:filter .9s var(--ease),opacity .9s var(--ease),transform .9s var(--ease)}
.is-wait .mc-r-art{filter:blur(16px) saturate(.45);opacity:.55;transform:scale(.97)}
.is-wait .mc-r-aura{opacity:.5;animation:mcAura 2.6s ease-in-out infinite alternate}
.mc-r-cap{position:relative;z-index:1;margin:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;
  font-size:12.5px;color:var(--ink-2);opacity:0;transition:opacity .45s var(--ease) .55s}
.is-shown .mc-r-cap{opacity:1}
.mc-r-tool{font:11px var(--mono);padding:2px 8px;border-radius:999px;border:1px solid var(--accent-line);
  background:var(--accent-soft);color:var(--accent-ink)}

.is-shown .mc-pop{animation:mcPop .75s cubic-bezier(.34,1.42,.6,1) both;animation-delay:calc(var(--d,0) * 110ms)}
@keyframes mcPop{from{transform:translateY(16px) scale(.95)}to{transform:none}}

.mc-phone{margin:0;flex:none;width:150px;aspect-ratio:9/19.6;padding:5px;border-radius:24px;background:#0c0d10;
  box-shadow:0 22px 44px -18px rgba(0,0,0,.45),0 0 0 1px rgba(0,0,0,.06)}
.mc-phone img{display:block;width:100%;height:100%;object-fit:cover;object-position:top;border-radius:19px;background:#fff}
.is-shown .mc-phone.mc-pop{animation:mcPop .75s cubic-bezier(.34,1.42,.6,1) both,mcFloat 5.5s ease-in-out infinite alternate;
  animation-delay:calc(var(--d,0) * 110ms),calc(1s + var(--d,0) * 700ms)}
@keyframes mcFloat{from{transform:translateY(0)}to{transform:translateY(-7px)}}

.mc-r-phones{display:flex;align-items:flex-end;gap:18px}
.mc-r-phones.n3 .mc-phone:nth-child(2){width:166px;margin-bottom:22px}

.mc-r-theme{position:relative;width:100%;max-width:540px;padding-bottom:40px}
.mc-r-poster{display:block;width:86%;border-radius:14px;box-shadow:0 24px 50px -24px rgba(0,0,0,.55)}
.mc-r-front{position:absolute;right:0;bottom:0;display:flex;align-items:flex-end;gap:12px}
.mc-r-front .mc-phone{width:108px;border-radius:20px;padding:4px}
.mc-r-front .mc-phone img{border-radius:16px}
.mc-r-front .mc-phone:first-child{margin-bottom:18px}

.mc-r-board{position:relative;width:100%;max-width:520px;display:flex;align-items:center;padding-right:120px}
.mc-board{width:300px;border-radius:12px;overflow:hidden;background:var(--surface);border:1px solid var(--line);
  box-shadow:0 26px 54px -26px rgba(0,0,0,.45)}
.mc-board-bar{display:flex;align-items:center;gap:8px;height:30px;padding:0 12px;border-bottom:1px solid var(--line);
  font-size:11.5px;color:var(--ink-2);background:var(--surface)}
.mc-fig{width:10px;height:15px;border-radius:5px;background:conic-gradient(from 180deg,#f24e1e,#ff7262,#a259ff,#1abcfe,#0acf83,#f24e1e)}
.mc-board-view{height:330px;overflow:hidden;background:#fff}
.mc-board-img{display:block;width:100%;opacity:1;transform:none;animation:mcScroll 13s ease-in-out 1.2s infinite alternate}
@keyframes mcScroll{from{transform:translateY(0)}to{transform:translateY(calc(-100% + 330px))}}
.mc-r-board .mc-r-front{right:0;bottom:auto;top:50%;transform:translateY(-50%)}
.mc-r-board .mc-r-front .mc-phone{width:112px}

.mc-r-photo{margin:0;width:100%;max-width:580px;border-radius:16px;overflow:hidden;box-shadow:0 28px 56px -26px rgba(0,0,0,.5)}
.mc-r-photo img{display:block;width:100%}
.mc-kb{animation:mcKb 14s ease-in-out infinite alternate}
@keyframes mcKb{from{transform:scale(1)}to{transform:scale(1.07) translate(-1.5%,-1%)}}

.mc-r-pairs{list-style:none;margin:0;padding:0;width:100%;max-width:480px;display:flex;flex-direction:column;gap:8px}
.mc-r-pairs li{display:grid;grid-template-columns:minmax(0,.9fr) auto minmax(0,1.2fr) auto;align-items:center;gap:10px;
  padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--lift);font-size:13.5px}
.mc-p-zh{color:var(--ink-2)}
.mc-p-ar{color:var(--ink-3)}
.mc-p-en{perspective:400px;font-weight:600;color:var(--ink)}
.mc-p-en span{display:inline-block;opacity:0}
.is-shown .mc-p-en span{animation:mcFlip .6s var(--ease) both;animation-delay:calc(.35s + var(--d,0) * 150ms)}
@keyframes mcFlip{from{opacity:0;transform:rotateX(90deg)}to{opacity:1;transform:none}}
.mc-p-fit{font-style:normal;font-size:11px;padding:2px 8px;border-radius:999px;white-space:nowrap}
.mc-p-fit.ok{color:var(--accent-ink);background:var(--accent-soft)}
.mc-p-fit.no{color:var(--brick);background:var(--brick-soft)}

/* 图标和 Logo 是黑色的矢量：两种主题下都摆在白色画板上。 */
.mc-tile{display:grid;place-items:center;width:132px;height:132px;border-radius:18px;background:#fff;
  border:1px solid var(--line);box-shadow:0 18px 40px -22px rgba(0,0,0,.35)}
.mc-tile img{width:76px;height:76px}
.mc-tile.big{width:156px;height:156px}
.mc-tile.big img{width:100px;height:100px}
.mc-r-tiles{display:flex;gap:16px}
.mc-r-icon{display:flex;flex-direction:column;align-items:center;gap:22px}
.mc-r-sizes{display:flex;align-items:flex-end;gap:14px}
.mc-r-sizes span{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 10px 6px;border-radius:12px;
  background:#fff;border:1px solid var(--line)}
.mc-r-sizes small{font:10px var(--mono);color:#7c7c85}

/* ── 底栏：哪一段、进度、暂停 ── */
.mc-reel-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 14px;border-top:1px solid var(--line);background:var(--surface)}
.mc-chips{display:flex;gap:6px;flex-wrap:wrap}
.mc-chip{position:relative;height:29px;padding:0 13px;border-radius:999px;border:1px solid var(--line-2);background:var(--surface);
  font-size:12.5px;color:var(--ink-2);overflow:hidden;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.mc-chip:hover{color:var(--ink);border-color:var(--ink-3)}
.mc-chip[aria-selected="true"]{color:var(--accent-ink);border-color:var(--accent-line);background:var(--accent-soft);font-weight:600}
.mc-chip-bar{position:absolute;left:0;right:0;bottom:0;height:2px}
.mc-chip-bar b{display:block;width:0;height:100%;background:var(--accent)}
@keyframes mcChipFill{from{width:0}to{width:100%}}
.mc-reel-note{flex:1;min-width:220px}
.mc-reel-pause{margin-left:auto}
.mc-reel-err{padding:16px 0}

/* ── 第 4 步的卡片 ── */
.mc-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(196px,1fr));gap:12px}
.mc-card{display:flex;flex-direction:column;gap:7px;padding:10px 10px 12px;text-align:left;border:1px solid var(--line);border-radius:14px;
  background:var(--surface);color:var(--ink);cursor:pointer;transition:transform .3s var(--ease),box-shadow .3s var(--ease),border-color .3s}
.mc-card:hover:not(:disabled){transform:translateY(-3px);box-shadow:var(--pop);border-color:var(--accent-line)}
.mc-card:focus-visible{outline:none;box-shadow:0 0 0 3px var(--ring)}
.mc-card:disabled{cursor:default}
.mc-card-art{display:flex;align-items:center;justify-content:center;gap:6px;height:118px;border-radius:10px;overflow:hidden;background:var(--surface-2)}
.mc-card-art img{display:block}
.mc-card-art.photo img,.mc-card-art.theme img,.mc-card-art.board img{width:100%;height:100%;object-fit:cover;object-position:top}
.mc-card-art.phones img{height:100%;width:auto;object-fit:cover;border-radius:8px;margin-top:22px;box-shadow:var(--pop)}
.mc-card-art.svg{background:#fff;border:1px solid var(--line)}
.mc-card-art.svg img{width:54px;height:54px}
.mc-card-art.tiles img{width:40px;height:40px}
.mc-card-art.pairs{flex-direction:column;align-items:stretch;justify-content:center;gap:5px;padding:12px;font-size:11.5px}
.mc-card-art.pairs span{display:flex;justify-content:space-between;gap:8px;color:var(--ink-2)}
.mc-card-art.pairs b{font-weight:600;color:var(--ink)}
.mc-card-art.empty{background:repeating-linear-gradient(135deg,var(--surface-2) 0 8px,var(--surface-3) 8px 9px)}
.mc-card-t{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.mc-card-t b{font-size:14px;font-weight:600}
.mc-card-t small{font-size:11.5px;color:var(--ink-3);white-space:nowrap}
.mc-card-d{font-size:12.5px;line-height:1.5;color:var(--ink-2)}
.mc-card code{font-size:11px;color:var(--ink-3)}

@media (max-width:960px){
  .mc-stage{grid-template-columns:minmax(0,1fr)}
  .mc-term{min-height:250px}
  .mc-result{min-height:380px}
  .mc-head .display{font-size:36px}
}
@media (max-width:560px){
  .mc-phone{width:104px;border-radius:18px;padding:4px}
  .mc-phone img{border-radius:14px}
  .mc-r-phones{gap:10px}
  .mc-r-phones.n3 .mc-phone:nth-child(2){width:114px;margin-bottom:14px}
  .mc-r-board{padding-right:0}
  .mc-r-board .mc-r-front{display:none}
  .mc-board{width:100%}
  .mc-r-front .mc-phone{width:84px}
  .mc-tile{width:96px;height:96px}
  .mc-tile img{width:56px;height:56px}
  .mc-r-tiles{gap:10px}
  .mc-r-pairs li{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);row-gap:4px}
  .mc-p-ar{display:none}
  .mc-p-fit{grid-column:1/-1;justify-self:start}
}
@media (prefers-reduced-motion:reduce){
  .mc-pop,.mc-p-en span{opacity:1;transform:none;animation:none!important}
  .mc-r-art{transition:none}
  .mc-kb,.mc-board-img,.mc-r-aura,.mc-t,.mc-t-dot,.mc-t-typed::after{animation:none!important}
  .is-shown .mc-phone.mc-pop{animation:none!important}
}
