/* ============================================================
   apps/chess.html 样式（P0-4-T17 <style> 块外联）
   - 页面 style="..." 与 on* 仍在本页（P0-4-T18 整改）
   - 顶栏统一化：原军棋风顶栏主题覆盖已删除，严格使用共享 topbar 样式
   ============================================================ */

  /* 返回链接风格适配 */
  .back-link-wrapper {
    background: #1c1410;
    border-bottom: 1px solid rgba(28, 20, 16, 0.15);
  }
  .back-link {
    color: #e8dcb6;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.15em;
    font-family: "STFangsong", "FangSong", "仿宋", serif;
    transition: color 0.18s;
    position: relative;
  }
  .back-link::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
    background: #b8332f; transform: scaleX(0); transform-origin: left;
    transition: transform 0.22s;
  }
  .back-link:hover { color: #b8332f; }
  .back-link:hover::after { transform: scaleX(1); }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  /* body 用 min-height（而非 height:100%）：让 body 高度随内容增长，保证 sticky 顶栏全程有效 */
  html { height: 100%; }
  body { min-height: 100%; }
  :root {
    --bg-deep:        #dccfb0;
    --bg-page:        #c9b988;
    --bg-card-solid:  #e8dcb6;
    --bg-header:      #1c1410;
    --text-primary:   #1a1410;
    --text-secondary: #4a3a2a;
    --text-muted:     #6b5a3f;
    --text-on-accent: #e8dcb6;
    --text-on-red:    #faf6e8;
    --border:         rgba(28, 20, 16, 0.30);
    --border-soft:    rgba(28, 20, 16, 0.15);
    --accent:         #1a1410;
    --ochre:          #8a6a3a;
    --ochre-2:        #a88a5a;
    --ochre-dark:     #5a4528;
    --ochre-border:   rgba(138, 106, 58, 0.55);
    --red-piece:      #b8332f;
    --red-piece-dark: #7a1d18;
    --black-piece:    #1a1410;
    --piece-edge:     #1a1410;
    --board-bg:       #c9b888;
    --board-line:     #1a1410;
    --shadow:         0 8px 24px rgba(28, 20, 16, 0.30);
    --shadow-deep:    0 12px 36px rgba(0, 0, 0, 0.45);
    --font-zhuan:     "STZhongsong", "STFangsong", "FangSong", "STKaiti", "KaiTi", serif;
    --font-fang:      "STFangsong", "FangSong", "仿宋", serif;
    --font-kai:       "STKaiti", "KaiTi", "FangSong", serif;
  }
  body {
    font-family: var(--font-fang);
    background:
      radial-gradient(ellipse 60% 50% at 50% 0%, rgba(28, 20, 16, 0.10) 0%, transparent 55%),
      radial-gradient(ellipse 30% 25% at 20% 30%, rgba(28, 20, 16, 0.07) 0%, transparent 50%),
      radial-gradient(ellipse 25% 20% at 80% 70%, rgba(28, 20, 16, 0.05) 0%, transparent 50%),
      repeating-linear-gradient(0deg,
        rgba(120, 80, 40, 0.04) 0px,
        rgba(120, 80, 40, 0.04) 1px,
        transparent 1px, transparent 4px),
      var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; text-decoration: none; }


  /* ==== 状态药丸 — 战报条 ==== */
  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 2px;
    background: rgba(184, 51, 47, 0.15);
    color: var(--text-on-accent);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--red-piece);
    font-family: var(--font-fang);
    letter-spacing: 0.1em;
  }
  .status-pill.check { background: rgba(184, 51, 47, 0.30); color: var(--text-on-accent); border-left-color: var(--red-piece); animation: pulse 1s infinite; }
  .status-pill.thinking { background: rgba(138, 106, 58, 0.20); color: var(--text-on-accent); border-left-color: var(--ochre); animation: pulse 0.6s infinite; }
  .status-pill.over { background: rgba(28, 20, 16, 0.20); color: var(--text-muted); border-left-color: var(--text-muted); }
  @keyframes pulse { 50% { opacity: 0.6; } }

  /* ==== 信息条 — 战报横条 ==== */
  .info-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    padding: 12px 20px;
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text-on-accent);
  }
  .info-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-right: 1px solid rgba(184, 51, 47, 0.18);
  }
  .info-cell:last-child { border-right: none; }
  .info-label {
    font-size: 11px; color: var(--text-on-accent);
    opacity: 0.7; letter-spacing: 0.25em;
    font-family: var(--font-fang);
  }
  .info-value {
    font-size: 18px; font-weight: 600;
    color: var(--red-piece);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-kai);
  }
  .info-value.active-turn { color: var(--red-piece); text-shadow: 0 0 12px rgba(184, 51, 47, 0.5); }
  .difficulty-group { display: flex; gap: 4px; flex-wrap: wrap; }
  /* ==== 难度按钮 — 军衔令牌（卒/炮/将）+ 难度小字 ==== */
  .diff-btn {
    padding: 4px 10px;
    font-size: 14px; font-weight: 600;
    color: var(--text-on-accent);
    background: transparent;
    border: 1px solid var(--ochre-border);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-zhuan);
    letter-spacing: 0.1em;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
  }
  .diff-btn .diff-sub {
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0.7;
    font-family: var(--font-fang);
    margin-top: 1px;
  }
  .diff-btn:hover { color: var(--red-piece); border-color: var(--red-piece); background: rgba(184, 51, 47, 0.10); }
  .diff-btn.active {
    background: var(--red-piece);
    color: var(--text-on-red);
    border-color: var(--red-piece);
    box-shadow: 0 0 0 1px rgba(184, 51, 47, 0.4), 0 2px 8px rgba(184, 51, 47, 0.3);
  }
  .diff-btn[data-diff="hard"].active {
    background: var(--black-piece);
    color: var(--text-on-accent);
    border-color: var(--ochre);
    box-shadow: 0 0 0 1px rgba(138, 106, 58, 0.5);
  }
  .diff-btn:disabled { opacity: 0.4; cursor: not-allowed; }

  /* ==== 棋盘 — 战图卷轴 ==== */
  .board-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
  }
  .board-wrap {
    position: relative;
    display: inline-block;
    background: var(--board-bg);
    padding: 30px 26px;
    border-radius: 2px;
    /* 上下卷轴实木（border 替代 ::before/::after，避免被 inset 边框覆盖） */
    border-top: 6px solid var(--ochre);
    border-bottom: 6px solid var(--ochre);
    box-shadow: var(--shadow-deep);
  }
  /* 卷轴实木细节 — 上下高光 */
  .board-wrap::before {
    content: '';
    position: absolute;
    top: -3px; left: 0; right: 0;
    height: 3px;
    background: var(--ochre-2);
    border-radius: 1px 1px 0 0;
    opacity: 0.6;
  }
  .board-wrap::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0; right: 0;
    height: 3px;
    background: var(--ochre-dark);
    border-radius: 0 0 1px 1px;
    opacity: 0.6;
  }
  /* "将军"警告 — 红色脉动 */
  .board-wrap.in-check {
    animation: chessCheckPulse 0.8s ease-in-out infinite;
  }
  @keyframes chessCheckPulse {
    0%, 100% { box-shadow: var(--shadow-deep), inset 0 0 0 2px var(--board-line); }
    50%      { box-shadow: var(--shadow-deep), 0 0 0 4px var(--red-piece), 0 0 32px var(--red-piece), inset 0 0 0 2px var(--board-line); }
  }
  .board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(9, var(--cs));
    grid-template-rows: repeat(10, var(--cs));
    --cs: 52px;
  }
  .cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
  }
  /* 落子提示 — 墨黑小圈（区别于五子棋） */
  .cell.legal::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(28, 20, 16, 0.30);
    box-shadow: 0 0 8px rgba(28, 20, 16, 0.4);
    pointer-events: none;
    z-index: 2;
  }
  /* 吃子提示 — 朱砂方印小圈 */
  .cell.legal.capture::after {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 3px solid var(--red-piece);
    box-shadow: 0 0 12px rgba(184, 51, 47, 0.5);
    transform: rotate(-3deg);
  }

  /* 棋盘网格线（绝对定位 SVG 覆盖） */
  .grid-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
  }
  /* 楚河漢界篆字（在 patch JS 中动态注入） */
  .grid-layer .chuhe,
  .grid-layer .hanjie {
    font-family: var(--font-zhuan);
    fill: var(--board-line);
    font-size: 32px;
    font-weight: 600;
    opacity: 0.6;
    pointer-events: none;
  }

  /* ==== 棋子 — 圆形 + 朱砂/墨玉 + 篆字 ==== */
  .piece {
    position: relative;
    z-index: 3;
    width: calc(var(--cs) - 10px);
    height: calc(var(--cs) - 10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-zhuan), "STZhongsong", "STFangsong", "STKaiti", serif;
    font-size: calc(var(--cs) * 0.50);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow:
      0 3px 6px rgba(0, 0, 0, 0.45),
      inset 0 1px 2px rgba(255, 255, 255, 0.18);
  }
  /* 键盘聚焦高亮（仅键盘 Tab 聚焦时显示，鼠标点击不触发） */
  .piece:focus-visible {
    outline: 3px solid var(--ochre-2);
    outline-offset: 2px;
  }
  /* 红方棋子 — 朱砂 */
  .piece.red {
    background: radial-gradient(circle at 30% 30%, #d96b5b 0%, var(--red-piece) 70%, var(--red-piece-dark) 100%);
    color: var(--text-on-red);
    border: 3px solid var(--piece-edge);
  }
  /* 黑方棋子 — 墨玉 */
  .piece.black {
    background: radial-gradient(circle at 30% 30%, #4a3a30 0%, var(--black-piece) 70%, #0a0604 100%);
    color: var(--text-on-accent);
    border: 3px solid var(--ochre-2);
  }
  /* 过河兵/卒 — 朱砂光环 */
  .piece.crossed {
    box-shadow:
      0 0 0 2px var(--red-piece),
      0 0 12px rgba(184, 51, 47, 0.6),
      0 3px 6px rgba(0, 0, 0, 0.4);
  }
  .piece.crossed::before {
    content: '';
    position: absolute;
    top: 2px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--red-piece);
    box-shadow: 0 0 4px rgba(184, 51, 47, 0.9);
  }
  .piece.selectable { cursor: pointer; }
  .piece.selectable:hover { transform: scale(1.08); }
  .piece.selected {
    transform: scale(1.12);
    box-shadow:
      0 0 0 3px var(--red-piece),
      0 0 24px rgba(184, 51, 47, 0.8),
      0 3px 6px rgba(0, 0, 0, 0.45);
  }
  /* 复盘/正常走子时的最后走子 */
  .piece.last-move {
    box-shadow: 0 0 0 2px var(--ochre), 0 0 14px rgba(138, 106, 58, 0.5);
  }
  /* 将死特效 — 朱砂外圈 */
  .piece.checkmate {
    animation: checkmate-shake 0.7s ease-out forwards;
    box-shadow:
      0 0 0 3px var(--red-piece),
      0 0 26px rgba(184, 51, 47, 0.85),
      0 0 50px rgba(184, 51, 47, 0.5);
    z-index: 3;
  }
  @keyframes checkmate-shake {
    0%   { transform: scale(1); }
    20%  { transform: scale(1.18) rotate(-4deg); }
    40%  { transform: scale(1.12) rotate(4deg); }
    60%  { transform: scale(1.16) rotate(-3deg); }
    80%  { transform: scale(1.08) rotate(2deg); }
    100% { transform: scale(1.05); }
  }
  /* 将死粒子 */
  .cm-particle {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #fca5a5 0%, #ef4444 60%, rgba(239,68,68,0) 100%);
    pointer-events: none;
    z-index: 5;
    transform: translate(-50%, -50%);
    animation: cm-burst 0.85s ease-out forwards;
    box-shadow: 0 0 8px rgba(239,68,68,0.8);
  }
  @keyframes cm-burst {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
    60%  { opacity: 0.9; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1.2); }
  }
  /* Issue #4：弹窗"将死"标识 */
  .modal-overlay.show .modal.checkmate-flash {
    animation: modal-flash 0.7s ease-out;
  }
  @keyframes modal-flash {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    30%  { box-shadow: 0 0 60px 10px rgba(239,68,68,0.6); }
    100% { box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 30px rgba(245,158,11,0.15); }
  }
  .checkmate-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 12px;
    border-radius: 12px;
    background: rgba(239,68,68,0.2);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.6);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    animation: badge-pulse 1s infinite alternate;
  }
  @keyframes badge-pulse {
    from { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    to   { box-shadow: 0 0 14px 2px rgba(239,68,68,0.6); }
  }
  .piece.in-check {
    animation: check-glow 1s infinite alternate;
  }
  @keyframes check-glow {
    to {
      box-shadow:
        0 0 0 3px rgba(239,68,68,0.8),
        0 0 24px rgba(239,68,68,0.9),
        0 2px 6px rgba(0,0,0,0.4);
    }
  }
  .piece.captured {
    animation: piece-fade 0.35s forwards;
  }
  @keyframes piece-fade {
    to { transform: scale(0.4); opacity: 0; }
  }

  /* ==== 操作区 — 军令横条 ==== */
  .controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px 18px;
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--ochre-border);
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-fang);
    letter-spacing: 0.15em;
    transition: all 0.2s;
  }
  .btn:hover:not(:disabled) { background: rgba(138, 106, 58, 0.20); color: var(--ochre-dark); border-color: var(--ochre-dark); }
  .btn:active:not(:disabled) { transform: translateY(1px); }
  .btn:disabled { opacity: 0.35; cursor: not-allowed; }
  .btn.primary {
    background: var(--red-piece);
    color: var(--text-on-red);
    border-color: var(--red-piece);
    box-shadow: 0 0 0 1px rgba(184, 51, 47, 0.4);
  }
  .btn.primary:hover:not(:disabled) { background: var(--red-piece-dark); border-color: var(--red-piece-dark); color: var(--text-on-red); }
  .btn.danger {
    color: var(--red-piece);
    border-color: var(--red-piece);
    background: rgba(184, 51, 47, 0.10);
  }
  .btn.danger:hover:not(:disabled) { background: var(--red-piece); color: var(--text-on-red); }
  .btn .icon { font-size: 14px; }
  .btn.toggle.on { background: rgba(138, 106, 58, 0.30); color: var(--ochre-2); border-color: var(--ochre-2); }
  .btn.toggle.off { background: rgba(28, 20, 16, 0.30); color: var(--text-muted); border-color: var(--text-muted); }

  /* ==== 弹窗 — 军令状 ==== */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 20, 16, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .modal-overlay.show { opacity: 1; pointer-events: all; }
  .modal {
    background: var(--bg-card-solid);
    border: 3px solid var(--board-line);
    border-radius: 2px;
    padding: 36px 32px 28px;
    text-align: center;
    max-width: 440px;
    width: 88%;
    box-shadow: var(--shadow-deep);
    transform: scale(0.9);
    transition: transform 0.3s;
    position: relative;
    color: var(--text-primary);
  }
  /* 军令状顶部装饰条 */
  .modal::before {
    content: '';
    position: absolute; top: 0; left: 10%; right: 10%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--red-piece) 20%, var(--red-piece) 80%, transparent);
  }
  /* 右下角"将"印 */
  .modal::after {
    content: '将';
    position: absolute; bottom: 12px; right: 16px;
    width: 30px; height: 30px;
    background: var(--red-piece);
    color: var(--text-on-red);
    font-family: var(--font-zhuan);
    font-size: 16px; line-height: 30px; text-align: center;
    border-radius: 2px;
    transform: rotate(-3deg);
    box-shadow: 0 0 0 1px rgba(184, 51, 47, 0.5);
  }
  .modal-overlay.show .modal { transform: scale(1); }
  .modal-icon {
    font-size: 0;
    margin-bottom: 0;
    line-height: 1;
  }
  /* 将印（朱砂方印 + 篆字）作为弹窗主图 */
  .modal-icon::before {
    content: attr(data-icon);
    display: inline-block;
    width: 60px; height: 60px;
    background: var(--red-piece);
    color: var(--text-on-red);
    font-family: var(--font-zhuan);
    font-size: 32px; line-height: 60px; text-align: center;
    border-radius: 2px;
    transform: rotate(-3deg);
    box-shadow: 0 4px 12px rgba(184, 51, 47, 0.4), 0 0 0 1px rgba(184, 51, 47, 0.5);
  }
  .modal-title {
    font-size: 48px; font-weight: 400; letter-spacing: 0.2em;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-family: var(--font-zhuan);
    margin-top: 12px;
  }
  .modal-title.win  { color: var(--red-piece); }
  .modal-title.lose { color: var(--text-primary); }
  .modal-title.draw { color: var(--ochre); }
  .modal-desc {
    font-size: 13px; color: var(--text-secondary);
    margin-bottom: 18px; line-height: 1.7;
    font-family: var(--font-fang);
    letter-spacing: 0.15em;
  }
  .modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 22px;
    text-align: center;
  }
  .modal-stat {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-left: 3px solid var(--red-piece);
    border-radius: 2px;
    padding: 10px 6px;
    font-size: 12px;
  }
  .modal-stat .k {
    color: var(--text-muted);
    font-family: var(--font-fang);
    letter-spacing: 0.2em;
    display: block; margin-bottom: 4px;
  }
  .modal-stat .v {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-kai);
    font-size: 16px;
  }
  .modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
  .modal .btn { min-width: 100px; justify-content: center; }
  /* Issue #8：快捷键提示徽章 */
  .kbd-hint {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-on-accent);
    background: rgba(184, 51, 47, 0.20);
    border: 1px solid rgba(184, 51, 47, 0.35);
    border-radius: 2px;
    vertical-align: middle;
  }
  .btn.primary .kbd-hint {
    color: var(--text-on-red);
    background: rgba(255, 255, 255, 0.20);
    border-color: rgba(255, 255, 255, 0.35);
  }

  /* 复盘面板 */
  .replay-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
  }
  /* Issue #9：自动播放中按钮呼吸高亮 */
  .replay-controls #rpAuto.playing {
    background: rgba(245,158,11,0.85);
    color: #1c1917;
    border-color: rgba(245,158,11,1);
    animation: rp-auto-pulse 1s infinite alternate;
  }
  @keyframes rp-auto-pulse {
    from { box-shadow: 0 0 0 0 rgba(245,158,11,0.6); }
    to   { box-shadow: 0 0 14px 4px rgba(245,158,11,0.4); }
  }
  .replay-info {
    font-size: 12px;
    color: #a8a29e;
    min-width: 60px;
  }
  .replay-board-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 50;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fef3c7;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    pointer-events: none;
  }
  /* Issue #15：overlay 整体不拦截，控件区单独可点，让棋盘 cell 仍可接收点击 */
  .replay-board-overlay .replay-controls { pointer-events: auto; }

  /* 响应式 */
  @media (max-width: 600px) {
    .board { --cs: 38px; }
    .board-wrap { padding: 12px; }
    .info-bar { padding: 10px 12px; gap: 8px; }
    .info-cell { padding: 6px 8px; }
    .info-value { font-size: 15px; }
    .controls { padding: 12px; gap: 6px; }
    .btn { padding: 7px 12px; font-size: 12px; }
    .title { font-size: 14px; letter-spacing: 0.08em; }
    /* Issue #2：窄屏难度按钮压缩 padding 与字号 */
    .diff-btn { padding: 3px 6px; font-size: 11px; }
    /* Issue #3：窄屏用户信息按钮压缩 */
    .user-link, .user-pill { padding: 4px 10px; font-size: 12px; }
    .status-pill { padding: 4px 10px; font-size: 12px; }
  }
  /* Issue #2：超窄屏（< 380px）进一步压缩 */
  @media (max-width: 380px) {
    .diff-btn { padding: 3px 4px; font-size: 10px; }
    .info-bar { padding: 8px 6px; gap: 6px; }
    .info-cell { padding: 4px 6px; }
  }
