/* ============================================================================
   编程题页专用：把"代码编辑器"改成"粘贴区"（★ 2026-10-14，用户要求）
   用户原话："我希望只是复制粘贴代码，而不是编写代码……让人一眼看到就不是写代码的地方。
             而且现在代码框如果有很多行，框就会越来越高。可以设置框固定就 5 行之类。"
   做法（四个"不是编辑器"的信号）：
     ① 深色 IDE → **浅色纸面 + 虚线边框**（最大的视觉信号）
     ② 固定 **5 行高** + `resize:none`：想写代码写不开，内容多了在框内滚动
     ③ 顶部去掉 IDE 的"红黄绿圆点"，标题从 `main.cpp` 改成「粘贴代码」
     ④ 底部一条"粘贴工具条"：从剪贴板粘贴 + 已粘贴 N 行
   为什么放在独立文件：`app.css` 里的 `.editor`（深色 300px、resize:vertical）不属于本次改动范围，
   而且那个文件有并发会话在改 —— 这里用"同优先级 + 后加载"覆盖（layout 先引 app.css 再引本文件）。
   ============================================================================ */
.editor.pastebox{border-style:dashed;background:var(--panel)}
.editor.pastebox .eh{background:var(--panel-2);border-bottom:1.5px dashed var(--ink);color:var(--text-2)}
.editor.pastebox .eh .pic{display:inline-flex;align-items:center}
.editor.pastebox .eh .pic svg{display:block}
.editor.pastebox .codewrap{background:var(--panel)}
.editor.pastebox .gutter{color:var(--text-3);background:var(--panel-2);border-right:1.5px dashed var(--ink)}
/* ★ 固定 5 行高：13px × 1.75 × 5 + 上下 padding 14px×2 ≈ 142px
   ★★ 2026-10-14 修 bug（用户："粘贴代码后框的行数会变多，test3 在 P3001 粘贴后从 5 行变 17 行"）：
   只给 textarea 定高是不够的 —— `.codewrap` 是 flex，**左边的行号栏会随行数长高**，
   于是整个框被行号撑大（实测：粘 17 行后 .codewrap 142px → 415px）；
   而且行号栏"长到刚好装下"时它自己没法滚动，`gutter.scrollTop = code.scrollTop` 同步也失效。
   所以：容器 + 行号栏 + 输入框三处一起定高，多出来的行由**输入框右侧滚动条**滚动，行号栏跟着同步。 */
.editor.pastebox .codewrap{height:142px;max-height:142px;overflow:hidden}
.editor.pastebox .gutter{height:142px;max-height:142px;overflow:hidden}
.editor.pastebox textarea{height:142px;min-height:142px;max-height:142px;resize:none;overflow-y:auto;
  background:var(--panel);color:var(--text-1);padding:14px}
.editor.pastebox textarea::placeholder{color:var(--text-3)}
.editor.pastebox.dragover{border-color:var(--accent);background:#F1FAF5}
.editor.pastebox.dragover .codewrap{background:#F1FAF5}
.editor.pastebox.dragover textarea{background:#F1FAF5}
/* 粘贴工具条 */
.pastebar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 14px;
  border-top:1.5px dashed var(--ink);background:var(--panel-2)}
.pastebar .hint{font-size:12px}
.pastebar .hint.ok{color:var(--accent-d);font-weight:700}
.pastebar .pbr{margin-left:auto}
@media (max-width:900px){
  .pastebar{padding:9px 12px}
  .pastebar .pbr{margin-left:0;flex-basis:100%}
}

/* U5（docs/68）：手机上 5 行 + 工具条占得太高，首屏只剩题面的一半 → 窄屏收到 4 行（121px）。 */
@media (max-width:900px){
  .editor.pastebox .codewrap,
  .editor.pastebox .gutter,
  .editor.pastebox textarea{height:121px;max-height:121px;min-height:121px}
}
