/* ============================================================
   在线编程模式「自测结果」内联面板（配合 pretest-inline.js）
   老师 2026-11-16：运行自测不要跳翻牌页，就在当前页显示结果。
   老师 2026-11-16（第二轮）：右下角那个结果面板是白的，所有主题都是白的 → 必须按主题上色。

   ⚠ 教训（已写进 SOP）：这个面板是**挂在 body 上的浮层**，不能指望 .scratchpad-container 里的
   配色变量（原来用 --ide-* 回退到 #fff 就白成一片）。浮层必须自带一套主题令牌 --pt-*，
   每个主题单独给色；**新主题上线时必须补一个 --pt-* 块**，否则又会是白的。
   ============================================================ */

/* ---------- 1. 主题令牌（8 个主题各一套） ---------- */
html.site-theme-classic {
    --pt-panel: #ffffff; --pt-head: #eef3ff; --pt-ink: #1f2b3a; --pt-sub: #5b6b7b;
    --pt-line: #d8e2ec; --pt-item: #f5f8fc; --pt-shadow: 0 18px 40px -22px rgba(15, 35, 60, .45);
}
html.site-theme-forge {
    --pt-panel: #221a13; --pt-head: #2c2218; --pt-ink: #f2e6d4; --pt-sub: #c0a887;
    --pt-line: rgba(255, 207, 102, .34); --pt-item: #1a130d; --pt-shadow: 0 18px 40px -22px #000;
}
html.site-theme-toy {
    --pt-panel: #fff6fb; --pt-head: #ffe6f2; --pt-ink: #4a2b3f; --pt-sub: #8d6b80;
    --pt-line: rgba(255, 158, 196, .55); --pt-item: #ffffff; --pt-shadow: 0 18px 40px -22px rgba(255, 140, 190, .55);
}
html.site-theme-desert {
    --pt-panel: #2f2318; --pt-head: #3a2c1e; --pt-ink: #f5e7d0; --pt-sub: #c9b08a;
    --pt-line: rgba(232, 163, 61, .38); --pt-item: #241a12; --pt-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9);
}
html.site-theme-love {
    --pt-panel: #fff6fb; --pt-head: #ffe9f3; --pt-ink: #4b2c46; --pt-sub: #97718d;
    --pt-line: rgba(255, 155, 200, .5); --pt-item: #ffffff; --pt-shadow: 0 18px 40px -22px rgba(255, 130, 180, .5);
}
html.site-theme-egg {
    --pt-panel: #362744; --pt-head: #402f50; --pt-ink: #ffeaf4; --pt-sub: #d9bccd;
    --pt-line: rgba(255, 158, 196, .42); --pt-item: #2b2033; --pt-shadow: 0 18px 40px -22px rgba(0, 0, 0, .85);
}
html.site-theme-mc {
    --pt-panel: #1f2a30; --pt-head: #26333a; --pt-ink: #eaf2ee; --pt-sub: #a9bab4;
    --pt-line: rgba(124, 189, 75, .34); --pt-item: #182027; --pt-shadow: 0 18px 40px -22px #000;
}
html.site-theme-cosmos {
    --pt-panel: rgba(18, 24, 44, .97); --pt-head: rgba(28, 38, 68, .97); --pt-ink: #eaf0ff; --pt-sub: #a9b6d8;
    --pt-line: rgba(140, 200, 255, .34); --pt-item: rgba(10, 15, 32, .9);
    --pt-shadow: 0 18px 44px -20px rgba(176, 124, 255, .55);
}

/* ---------- 2. 面板本体 ---------- */
.pt-inline {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    width: 330px;
    max-height: 45vh;
    overflow: auto;
    border: 1px solid var(--pt-line, #dde5ec);
    border-radius: 8px;
    background: var(--pt-panel, #ffffff);
    color: var(--pt-ink, #22303d);
    box-shadow: var(--pt-shadow, 0 18px 40px -22px rgba(0, 0, 0, .45));
    font-size: 13px;
}
.pt-inline__hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--pt-head, #eef3ff);
    border-bottom: 1px solid var(--pt-line, #dde5ec);
    color: var(--pt-ink, #22303d);
}
.pt-inline__hd b { font-size: 13.5px; color: var(--pt-ink, #22303d); }
.pt-inline__note { color: var(--pt-sub, #64748b); font-size: 12.5px; }
.pt-inline__close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--pt-sub, #64748b);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.pt-inline__close:hover { color: var(--pt-ink, #22303d); }
.pt-inline__bd { padding: 8px 12px 12px; }
.pt-inline__wait { color: var(--pt-sub, #64748b); font-size: 12.5px; padding: 4px 0; }
.pt-inline__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-inline__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--pt-line, #dde5ec);
    background: var(--pt-item, #f5f8fc);
    color: var(--pt-ink, #22303d);
    font-size: 12.5px;
}
.pt-inline__no { font-weight: 700; color: var(--pt-ink, #22303d); }
.pt-inline__meta { color: var(--pt-sub, #64748b); font-variant-numeric: tabular-nums; }
.pt-inline__item.is-ok { border-color: #4caf7d; background: rgba(76, 175, 125, .14); }
.pt-inline__item.is-ok .pt-inline__st { color: #2f8f5b; font-weight: 700; }
.pt-inline__item.is-bad { border-color: #e2685f; background: rgba(226, 104, 95, .14); }
.pt-inline__item.is-bad .pt-inline__st { color: #c0392b; font-weight: 700; }
.pt-inline__item.is-warn { border-color: #e0a94a; background: rgba(224, 169, 74, .16); }
.pt-inline__item.is-warn .pt-inline__st { color: #a9761b; font-weight: 700; }
/* 深色主题里状态色要亮一点，才看得清 */
html.site-theme-mc .pt-inline__item.is-ok .pt-inline__st,
html.site-theme-cosmos .pt-inline__item.is-ok .pt-inline__st,
html.site-theme-desert .pt-inline__item.is-ok .pt-inline__st,
html.site-theme-forge .pt-inline__item.is-ok .pt-inline__st,
html.site-theme-egg .pt-inline__item.is-ok .pt-inline__st { color: #8ce0a8; }
html.site-theme-mc .pt-inline__item.is-bad .pt-inline__st,
html.site-theme-cosmos .pt-inline__item.is-bad .pt-inline__st,
html.site-theme-desert .pt-inline__item.is-bad .pt-inline__st,
html.site-theme-forge .pt-inline__item.is-bad .pt-inline__st,
html.site-theme-egg .pt-inline__item.is-bad .pt-inline__st { color: #ff9d94; }
html.site-theme-mc .pt-inline__item.is-warn .pt-inline__st,
html.site-theme-cosmos .pt-inline__item.is-warn .pt-inline__st,
html.site-theme-desert .pt-inline__item.is-warn .pt-inline__st,
html.site-theme-forge .pt-inline__item.is-warn .pt-inline__st,
html.site-theme-egg .pt-inline__item.is-warn .pt-inline__st { color: #ffd166; }

.pt-inline__frame {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 1280px;
    height: 900px;
    opacity: 0;
    pointer-events: none;
    border: 0;
}
