
    /* 1. 基础重置与 Mac 暗黑质感变量 */
    /* tokens in tokens.css */

    

    /* 空间透视网格背景 */
    .spatial-grid-wrap {
      position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
    }
    .spatial-grid {
      position: absolute; inset: -50%; width: 200%; height: 200%;
      background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
      background-size: 50px 50px;
      transform: perspective(1000px) rotateX(60deg) translateY(-100px) translateZ(-200px);
      animation: grid-flow 25s linear infinite;
    }
    @keyframes grid-flow {
      0% { transform: perspective(1000px) rotateX(60deg) translateY(0) translateZ(-200px); }
      100% { transform: perspective(1000px) rotateX(60deg) translateY(50px) translateZ(-200px); }
    }

    /* 顶级 Mac 毛玻璃通用类 */
    /* mac-glass in tokens.css */

    /* SoftPad dark keycaps */
    .neo-key {
      background: linear-gradient(180deg, rgba(58, 60, 68, 0.98) 0%, rgba(32, 34, 40, 0.98) 100%);
      color: #e8eaef;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      cursor: pointer;
      user-select: none;
      transition: all 0.15s cubic-bezier(0.32, 0.72, 0, 1);
      box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 2px 0 #121317;
    }
    .neo-key:hover {
      transform: translateY(-2px);
      border-color: rgba(42, 156, 196, 0.35);
      box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 3px 0 #0c0d10,
        0 0 18px rgba(42, 156, 196, 0.12);
    }
    .neo-key:active, .neo-key.is-pressed {
      transform: translateY(2px) scale(0.96) !important;
      background: linear-gradient(180deg, rgba(28, 30, 36, 0.98) 0%, rgba(22, 24, 28, 0.98) 100%) !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), inset 0 2px 5px rgba(0, 0, 0, 0.45), 0 0 0 #000 !important;
    }
    .neo-key i {
      color: rgba(232, 234, 239, 0.88);
    }

    /* 物理角标 (Numpad Label) */
    .neo-key-badge {
      position: absolute;
      bottom: 4px;
      right: 6px;
      font-size: 9px;
      font-family: 'JetBrains Mono', monospace;
      color: rgba(160, 164, 176, 0.75);
      font-weight: 600;
      pointer-events: none;
    }

    /* 氛围彩色光晕 (dark SoftPad) */
    .glow-mint {
      border-color: rgba(16, 185, 129, 0.45) !important;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 16px rgba(16, 185, 129, 0.28) !important;
    }
    .glow-mint i { color: #34d399 !important; }
    .glow-orange {
      border-color: rgba(249, 115, 22, 0.45) !important;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 16px rgba(249, 115, 22, 0.28) !important;
    }
    .glow-orange i { color: #fb923c !important; }
    .glow-pink {
      border-color: rgba(244, 63, 94, 0.45) !important;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 16px rgba(244, 63, 94, 0.28) !important;
    }
    .glow-pink i { color: #fb7185 !important; }
    .glow-blue {
      border-color: rgba(59, 130, 246, 0.45) !important;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 16px rgba(59, 130, 246, 0.28) !important;
    }
    .glow-blue i { color: #60a5fa !important; }

    /* HUD 形变容器 */
    .hud-deck-wrap {
      perspective: 1000px;
      transition: all 0.6s cubic-bezier(0.32, 0.72, 0, 1);
    }
    .hud-deck {
      transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, opacity 0.4s ease;
      transform-style: preserve-3d;
    }

    /* Hero pad demo: CSS-driven full <-> mini (no Tailwind .hidden dependency) */
    #pad-demo[data-pad-mode="full"] #view-mini-bar,
    #pad-demo[data-pad-mode="mini"] #view-full-deck {
      display: none !important;
    }

    .pad-mode-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.4rem 1rem;
      border-radius: 9999px;
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--mac-text-muted);
      background: transparent;
      transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
      user-select: none;
      pointer-events: none;
    }

    #pad-demo[data-pad-mode="full"] #btn-mode-full,
    #pad-demo[data-pad-mode="mini"] #btn-mode-mini {
      color: #000;
      background: #fff;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    }

    /* Left hero: supported agent brands */
    .pad-hero-brands {
      margin-top: 0.25rem;
      padding: 0.85rem 1rem;
      border-radius: 1rem;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .pad-hero-brands-label {
      margin: 0 0 0.65rem;
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: rgba(134, 134, 139, 0.95);
    }

    .pad-hero-brands-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem;
    }

    .pad-hero-brand {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2.15rem;
      height: 2.15rem;
      border-radius: 0.55rem;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.06);
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }

    .pad-hero-brand img {
      width: 1.35rem;
      height: 1.35rem;
      border-radius: 0.3rem;
      object-fit: contain;
      opacity: 0.48;
      filter: grayscale(0.25);
      transition: opacity 0.2s ease, filter 0.2s ease;
    }

    .pad-hero-brand:hover {
      background: rgba(42, 156, 196, 0.12);
      border-color: rgba(42, 156, 196, 0.28);
      transform: translateY(-1px);
    }

    .pad-hero-brand:hover img {
      opacity: 1;
      filter: none;
    }

    /* HUD dock: agent brand row */
    .pad-hud-agents {
      display: flex;
      align-items: center;
      gap: 0.2rem;
      padding: 0.55rem 0.65rem;
      overflow-x: auto;
      border-radius: 1rem;
      background: rgba(0, 0, 0, 0.38);
      border: 1px solid rgba(255, 255, 255, 0.08);
      scrollbar-width: none;
    }

    .pad-hud-agents::-webkit-scrollbar {
      display: none;
    }

    .pad-hud-agents .agent-icon-wrap {
      position: relative;
      flex: 0 0 auto;
      padding: 0.35rem;
      border-radius: 0.65rem;
      cursor: default;
      transition: background 0.2s ease;
    }

    .pad-hud-agents .agent-icon-wrap:hover {
      background: rgba(255, 255, 255, 0.08);
    }

    .pad-hud-agents .agent-icon-wrap img {
      display: block;
      width: 1.55rem;
      height: 1.55rem;
      border-radius: 0.4rem;
      object-fit: contain;
      opacity: 0.62;
      filter: saturate(0.85);
      transition: opacity 0.2s ease, filter 0.2s ease;
    }

    .pad-hud-agents .agent-icon-wrap:hover img {
      opacity: 1;
      filter: none;
    }

    .agent-led {
      position: absolute;
      top: 0.2rem;
      right: 0.2rem;
      width: 0.4rem;
      height: 0.4rem;
      border-radius: 999px;
      border: 1px solid rgba(0, 0, 0, 0.35);
    }

    .agent-led-on {
      background: #34d399;
      box-shadow: 0 0 6px rgba(52, 211, 153, 0.55);
    }

    .agent-led-busy {
      background: var(--mac-accent);
      box-shadow: 0 0 6px rgba(42, 156, 196, 0.55);
    }

    .agent-led-idle {
      background: rgba(255, 255, 255, 0.22);
      box-shadow: none;
    }

    .pad-hud-agents-more {
      flex: 0 0 auto;
      margin-left: 0.15rem;
      padding: 0.3rem 0.45rem;
      border-radius: 0.5rem;
      font-size: 0.7rem;
      font-family: "JetBrains Mono", ui-monospace, monospace;
      color: rgba(134, 134, 139, 0.95);
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.07);
    }

    /* Agent preset buttons with real brand icons */
    .agent-preset-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      padding: 0.65rem 0.75rem;
      border-radius: 0.85rem;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.03);
      color: var(--mac-text-muted);
      font-size: 0.75rem;
      font-family: "JetBrains Mono", ui-monospace, monospace;
      font-weight: 500;
      cursor: pointer;
      transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .agent-preset-btn img {
      width: 1.1rem;
      height: 1.1rem;
      border-radius: 0.28rem;
      object-fit: contain;
      opacity: 0.7;
      transition: opacity 0.2s ease;
    }

    .agent-preset-btn:hover {
      color: #fff;
      border-color: rgba(255, 255, 255, 0.18);
      background: rgba(255, 255, 255, 0.06);
    }

    .agent-preset-btn:hover img,
    .agent-preset-btn.is-active img {
      opacity: 1;
    }

    .agent-preset-btn.is-active {
      color: #fff;
      border-color: rgba(42, 156, 196, 0.55);
      background: rgba(42, 156, 196, 0.12);
      box-shadow: 0 0 0 1px rgba(42, 156, 196, 0.18), 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    /* Dark SoftPad numpad plate (remap picker) */
    .pad-numpad {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      grid-auto-rows: 2.75rem;
      gap: 0.45rem;
      padding: 0.85rem;
      border-radius: 1.15rem;
      background: linear-gradient(160deg, rgba(36, 38, 46, 0.96) 0%, rgba(18, 19, 24, 0.98) 100%);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        0 18px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(42, 156, 196, 0.12);
    }

    .pad-numpad-key {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 0.7rem;
      background: linear-gradient(180deg, rgba(58, 60, 68, 0.98) 0%, rgba(32, 34, 40, 0.98) 100%);
      color: #e8eaef;
      box-shadow:
        0 3px 0 #121317,
        0 6px 12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
      cursor: pointer;
      transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    }

    .pad-numpad-key i {
      font-size: 1rem;
      line-height: 1;
      color: rgba(232, 234, 239, 0.88);
    }

    .pad-numpad-key[data-picker-key="power"] i { color: #fb923c; }
    .pad-numpad-key[data-picker-key="undo"] i { color: #fb923c; }
    .pad-numpad-key[data-picker-key="send"] i { color: #fb7185; }
    .pad-numpad-key[data-picker-key="stop"] i { color: #60a5fa; }

    .pad-numpad-cap {
      position: absolute;
      right: 0.35rem;
      bottom: 0.2rem;
      font-size: 0.58rem;
      font-family: "JetBrains Mono", ui-monospace, monospace;
      font-weight: 700;
      color: rgba(160, 164, 176, 0.72);
      line-height: 1;
      pointer-events: none;
    }

    .pad-numpad-tall {
      grid-row: span 2;
      min-height: 100%;
    }

    .pad-numpad-wide {
      grid-column: span 2;
    }

    .pad-numpad-key:hover {
      transform: translateY(-1px);
      border-color: rgba(42, 156, 196, 0.4);
      box-shadow:
        0 4px 0 #0c0d10,
        0 8px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 0 14px rgba(42, 156, 196, 0.15);
    }

    .pad-numpad-key:active {
      transform: translateY(2px);
      box-shadow:
        0 1px 0 #0a0b0d,
        inset 0 2px 5px rgba(0, 0, 0, 0.45);
    }

    .pad-numpad-key.is-picked {
      border-color: rgba(42, 156, 196, 0.7);
      box-shadow:
        0 3px 0 #121317,
        0 0 0 2px rgba(42, 156, 196, 0.35),
        0 8px 18px rgba(42, 156, 196, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    /* Hero SoftPad chassis — dark */
    #view-full-deck #key-matrix {
      padding: 0.75rem;
      border-radius: 1rem;
      background: linear-gradient(160deg, rgba(36, 38, 46, 0.96) 0%, rgba(18, 19, 24, 0.98) 100%);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(42, 156, 196, 0.1);
    }

    /* Mini 胶囊栏形态 */
    .mini-bar {
      background: rgba(22, 22, 26, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 99px;
      padding: 6px 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.2);
      backdrop-filter: blur(30px);
    }
    .mini-bar-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .mini-bar-btn:hover {
      background: rgba(42, 156, 196,0.2);
      border-color: var(--mac-accent);
      color: var(--mac-accent);
    }
    .mini-bar-btn.is-active {
      background: var(--mac-accent);
      color: #000;
      box-shadow: 0 0 12px var(--mac-accent);
    }

    /* 语音波动柱 */
    .mic-wave-bars {
      display: flex; gap: 3px; align-items: center; height: 14px;
    }
    .mic-wave-bars span {
      width: 2px; height: 4px; background: var(--mac-accent); border-radius: 1px;
      animation: mic-wave 1s infinite alternate ease-in-out;
    }
    .mic-wave-bars span:nth-child(2) { animation-delay: 0.2s; }
    .mic-wave-bars span:nth-child(3) { animation-delay: 0.4s; }
    .mic-wave-bars span:nth-child(4) { animation-delay: 0.6s; }
    @keyframes mic-wave { 0% { height: 3px; } 100% { height: 14px; } }

    /* Agent 遥测 Popover 浮窗 */
    .agent-popover {
      position: absolute;
      bottom: calc(100% + 12px);
      left: 50%;
      transform: translateX(-50%) translateY(10px);
      width: 260px;
      background: rgba(15, 15, 18, 0.95);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 16px;
      padding: 14px 16px;
      box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.1);
      backdrop-filter: blur(20px);
      opacity: 0;
      pointer-events: none;
      transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
      z-index: 50;
    }
    .agent-icon-wrap:hover .agent-popover {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0);
    }

    /* 光纤连线 (Numpad Bridge Line) */
    .bridge-line {
      height: 2px;
      background: rgba(255,255,255,0.1);
      position: relative;
      overflow: hidden;
    }
    .bridge-particle {
      position: absolute;
      top: 0; left: -100%;
      width: 50%; height: 100%;
      background: linear-gradient(90deg, transparent, var(--mac-accent), transparent);
      animation: bridge-flow 2s infinite linear;
    }
    @keyframes bridge-flow { 0% { left: -50%; } 100% { left: 100%; } }
  