    /* ─── CONTEXT MENU ─────────────────────────────────────────────────── */
    .ctx-menu {
      position: fixed; z-index: 10000;
      background: var(--surface); border: 1px solid var(--border-hi);
      border-radius: 10px; padding: 6px 0;
      min-width: 180px; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
      backdrop-filter: blur(16px);
      animation: ctxIn 0.15s ease-out;
      font-family: var(--font-mono);
    }
    @keyframes ctxIn { from { opacity: 0; transform: scale(0.95) translateY(-4px); } }
    .ctx-item {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 16px; font-size: 0.78rem;
      color: var(--text); cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }
    .ctx-item:hover { background: var(--accent-lo); color: var(--accent); }
    .ctx-item-icon { font-size: 0.9rem; width: 20px; text-align: center; }
    .ctx-sep { height: 1px; background: var(--border); margin: 4px 8px; }
    .ctx-item.danger:hover { background: var(--red-lo); color: var(--red); }

    /* ─── BUTTON RIPPLE ────────────────────────────────────────────────── */
    .ripple-host { position: relative; overflow: hidden; }
    .ripple-wave {
      position: absolute; border-radius: 50%; pointer-events: none;
      background: radial-gradient(circle, rgba(212,160,56,0.35) 0%, transparent 70%);
      transform: scale(0); animation: rippleAnim 0.5s ease-out forwards;
    }
    @keyframes rippleAnim { to { transform: scale(2.5); opacity: 0; } }

    /* ─── RECENTLY USED ────────────────────────────────────────────────── */
    .card.recently-used::after, .skill-card.recently-used::after {
      content: '●'; position: absolute; top: 8px; right: 10px;
      color: var(--green); font-size: 0.5rem;
      animation: recentPulse 2s ease-in-out infinite;
    }
    @keyframes recentPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

    /* ─── CARD STATUS DOT ─────────────────────────────────────────────── */
    .card-status-dot {
      position: absolute; top: 8px; left: 10px;
      width: 8px; height: 8px; border-radius: 50%;
      z-index: 2; pointer-events: none;
      animation: statusPulse 2.5s ease-in-out infinite;
    }
    .card-status-dot[data-status="running"] { background: var(--green); box-shadow: 0 0 6px var(--green); }
    .card-status-dot[data-status="wip"]     { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
    .card-status-dot[data-status="problem"] { background: var(--red);   box-shadow: 0 0 6px var(--red); }
    @keyframes statusPulse {
      0%, 100% { opacity: 0.6; transform: scale(1); }
      50%      { opacity: 1;   transform: scale(1.2); }
    }

    /* ─── STATUS SUBMENU ──────────────────────────────────────────────── */
    .ctx-submenu {
      position: relative;
    }
    .ctx-submenu-items {
      display: none;
      position: absolute; left: 100%; top: -4px;
      background: var(--surface2); border: 1px solid var(--border-hi);
      border-radius: 10px; padding: 6px 0; min-width: 140px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.4);
      z-index: 10001;
    }
    .ctx-submenu:hover .ctx-submenu-items { display: block; }
    .ctx-status-label { display: flex; align-items: center; gap: 8px; }
    .ctx-status-dot {
      width: 8px; height: 8px; border-radius: 50%; display: inline-block;
    }

    /* ─── FAVORITES SECTION ───────────────────────────────────────────── */
    .favorites-empty {
      text-align: center; padding: 40px 20px;
      color: var(--muted); font-size: 0.85rem;
    }
    .favorites-empty-icon { font-size: 2rem; margin-bottom: 12px; }
    .fav-card-clone { cursor: pointer; }
    .fav-card-clone:hover { border-color: var(--accent); }

    /* ─── TAB SLIDE ────────────────────────────────────────────────────── */
    .section, .dashboard {
      animation: tabSlideIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    }
    @keyframes tabSlideIn {
      from { opacity: 0; transform: translateY(12px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ─── TAB PULSE (new card added) ───────────────────────────────────── */
    .tab.pulse-badge .tab-count {
      animation: tabBadgePulse 0.6s ease-out;
    }
    @keyframes tabBadgePulse {
      0% { transform: scale(1); }
      40% { transform: scale(1.5); color: var(--accent); }
      100% { transform: scale(1); }
    }

    /* ─── KI THINKING DISPLAY ─────────────────────────────────────────── */
    .ki-thinking-wrap {
      align-self: flex-start;
      max-width: 85%;
      animation: slideUp 0.25s var(--ease-out);
      margin-bottom: -4px;
    }
    .ki-thinking-toggle {
      display: flex; align-items: center; gap: 6px;
      background: rgba(212,160,56,0.06);
      border: 1px solid rgba(212,160,56,0.12);
      color: var(--muted); font-family: var(--font-mono);
      font-size: 0.7rem; cursor: pointer;
      padding: 5px 10px; border-radius: 8px;
      transition: all 0.2s;
    }
    .ki-thinking-toggle:hover { color: var(--accent); background: var(--accent-lo); border-color: rgba(212,160,56,0.3); }
    .ki-thinking-toggle .toggle-icon {
      transition: transform 0.3s var(--ease-out); display: inline-flex; font-size: 0.6rem;
    }
    .ki-thinking-toggle.open .toggle-icon { transform: rotate(180deg); }
    .ki-thinking-spinner {
      width: 10px; height: 10px;
      border: 1.5px solid rgba(212,160,56,0.2);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      flex-shrink: 0;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .ki-thinking-content {
      max-height: 0; overflow: hidden; opacity: 0;
      transition: max-height 0.4s var(--ease-out), opacity 0.3s, padding 0.3s;
      background: rgba(22,24,32,0.5);
      border: 1px solid rgba(212,160,56,0.08);
      border-radius: 0 0 8px 8px;
      border-top: none;
      margin-top: -1px;
    }
    .ki-thinking-content.open {
      max-height: 300px; opacity: 1; overflow-y: auto;
      padding: 0;
    }
    .ki-thinking-text {
      padding: 10px 12px;
      font-size: 0.72rem; color: var(--muted);
      line-height: 1.55; white-space: pre-wrap;
      opacity: 0.7;
    }
    .ki-thinking-label {
      font-size: 0.6rem; text-transform: uppercase;
      letter-spacing: 0.1em; color: var(--accent);
      padding: 8px 12px 2px; font-weight: 600;
      opacity: 0.7;
    }

    /* ─── SITE EDITOR ─────────────────────────────────────────────────── */
    .editor-toggle {
      width: 38px; height: 38px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: linear-gradient(135deg, var(--surface), var(--surface2));
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.3s var(--ease-out);
      color: var(--muted);
      font-size: 1rem;
    }
    .editor-toggle:hover {
      border-color: var(--accent-dk);
      color: var(--accent);
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(212,160,56,0.2);
    }
    .editor-toggle.active {
      border-color: var(--accent);
      color: var(--accent);
      box-shadow: 0 0 16px rgba(212,160,56,0.3);
      animation: goldPulse 2s ease-in-out infinite;
    }

    .editor-panel {
      position: fixed;
      top: 0; left: 0;
      width: 320px; height: 100vh;
      background: rgba(11,12,14,0.96);
      backdrop-filter: blur(24px);
      border-right: 1px solid var(--border);
      z-index: 3000;
      transform: translateX(-100%);
      transition: transform 0.4s var(--ease-out);
      display: flex; flex-direction: column;
      box-shadow: 10px 0 40px rgba(0,0,0,0.5);
    }
    .editor-panel.open { transform: translateX(0); }
    .editor-panel::before {
      content: '';
      position: absolute; top: 0; right: 0; bottom: 0;
      width: 1px;
      background: linear-gradient(180deg, transparent, rgba(212,160,56,0.3), transparent);
    }

    .editor-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      position: relative;
    }
    .editor-header::after {
      content: '';
      position: absolute; bottom: 0; left: 20px; right: 20px;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(212,160,56,0.2), transparent);
    }
    .editor-title {
      font-family: var(--font-head);
      font-weight: 700; font-size: 1.1rem;
      background: linear-gradient(135deg, var(--accent-hi), var(--accent));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .editor-close {
      background: none; border: none; color: var(--muted);
      font-size: 1.2rem; cursor: pointer; padding: 4px;
      transition: color 0.2s;
    }
    .editor-close:hover { color: var(--accent); }

    .editor-tabs {
      display: flex; border-bottom: 1px solid var(--border);
    }
    .editor-tab {
      flex: 1; padding: 8px 4px;
      background: none; border: none;
      color: var(--muted); font-family: var(--font-mono);
      font-size: 0.68rem; cursor: pointer;
      text-transform: uppercase; letter-spacing: 0.04em;
      transition: color 0.2s, background 0.2s;
      position: relative;
    }
    .editor-tab:hover { color: var(--text); background: var(--surface2); }
    .editor-tab.active { color: var(--accent); }
    .editor-tab.active::after {
      content: '';
      position: absolute; bottom: -1px; left: 0; right: 0;
      height: 2px;
      background: var(--accent);
    }

    .editor-body {
      flex: 1; overflow-y: auto;
      padding: 16px 20px;
    }
    .editor-section {
      margin-bottom: 20px;
    }
    .editor-label {
      font-size: 0.68rem; text-transform: uppercase;
      letter-spacing: 0.1em; color: var(--muted);
      margin-bottom: 8px; font-weight: 500;
    }
    .editor-row {
      display: flex; align-items: center; gap: 10px;
      margin-bottom: 10px;
    }
    .editor-row label {
      font-size: 0.78rem; color: var(--text); flex: 1;
    }
    .editor-color {
      width: 32px; height: 32px;
      border: 2px solid var(--border);
      border-radius: 8px;
      cursor: pointer;
      -webkit-appearance: none;
      padding: 0; overflow: hidden;
    }
    .editor-color::-webkit-color-swatch-wrapper { padding: 0; }
    .editor-color::-webkit-color-swatch { border: none; border-radius: 6px; }
    .editor-color:hover { border-color: var(--accent-dk); }

    .editor-slider {
      -webkit-appearance: none;
      width: 120px; height: 4px;
      background: var(--border);
      border-radius: 2px;
      outline: none;
    }
    .editor-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 14px; height: 14px;
      border-radius: 50%;
      background: var(--accent);
      cursor: pointer;
      box-shadow: 0 0 8px rgba(212,160,56,0.3);
    }

    /* ── Toggle Switch ── */
    .toggle-switch {
      position: relative;
      display: inline-block;
      width: 38px;
      height: 20px;
      cursor: pointer;
    }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider {
      position: absolute;
      inset: 0;
      background: var(--border);
      border-radius: 20px;
      transition: background 0.25s ease;
    }
    .toggle-slider::before {
      content: '';
      position: absolute;
      left: 2px; top: 2px;
      width: 16px; height: 16px;
      border-radius: 50%;
      background: var(--text);
      transition: transform 0.25s ease;
    }
    .toggle-switch input:checked + .toggle-slider {
      background: var(--accent);
    }
    .toggle-switch input:checked + .toggle-slider::before {
      transform: translateX(18px);
    }

    .editor-select {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 0.78rem;
      padding: 6px 10px;
      cursor: pointer;
      width: 140px;
    }
    .editor-select:focus { outline: none; border-color: var(--accent); }
    .editor-select option { background: var(--surface); }

    .editor-btn {
      width: 100%; padding: 10px;
      border-radius: 8px; border: 1px solid var(--border);
      background: var(--surface2); color: var(--text);
      font-family: var(--font-mono); font-size: 0.8rem;
      cursor: pointer; transition: all 0.2s;
      margin-bottom: 8px;
    }
    .editor-btn:hover { border-color: var(--accent-dk); color: var(--accent); }
    .editor-btn.primary {
      background: linear-gradient(135deg, var(--accent), var(--accent-dk));
      border-color: transparent; color: #0b0c0e; font-weight: 600;
    }
    .editor-btn.primary:hover {
      box-shadow: 0 4px 20px rgba(212,160,56,0.4);
    }
    .editor-btn.danger { border-color: var(--red-lo); color: var(--red); }
    .editor-btn.danger:hover { background: var(--red-lo); }

    .editor-none-hint {
      text-align: center; padding: 40px 20px;
      color: var(--muted); font-size: 0.8rem;
    }

    /* Editor mode card overlays */
    body.editor-mode .card,
    body.editor-mode .skill-card {
      cursor: grab; position: relative;
    }
    body.editor-mode .card::after,
    body.editor-mode .skill-card::after {
      content: '⋮⋮';
      position: absolute;
      top: 8px; right: 8px;
      color: var(--accent);
      font-size: 0.8rem;
      opacity: 0.4;
      letter-spacing: 2px;
      pointer-events: none;
    }
    body.editor-mode .card:hover::after,
    body.editor-mode .skill-card:hover::after { opacity: 1; }
    body.editor-mode .card.editor-selected,
    body.editor-mode .skill-card.editor-selected {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      box-shadow: 0 0 20px rgba(212,160,56,0.15);
    }
    body.editor-mode .card.drag-over,
    body.editor-mode .skill-card.drag-over {
      border-color: var(--accent);
      box-shadow: 0 0 24px rgba(212,160,56,0.2);
    }
    .card.dragging, .skill-card.dragging {
      opacity: 0.4;
    }

    /* Effect classes */
    .fx-shimmer { position: relative; overflow: hidden; }
    .fx-shimmer::before {
      content: ''; position: absolute;
      top: 0; left: -100%; width: 50%; height: 100%;
      background: linear-gradient(90deg, transparent, rgba(212,160,56,0.06), transparent);
      animation: shimmerLine 3s ease-in-out infinite;
    }
    .fx-pulse { animation: goldPulse 2s ease-in-out infinite; }
    .fx-float { animation: floatAnim 4s ease-in-out infinite; }
    @keyframes floatAnim {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-6px); }
    }
    .fx-glow { box-shadow: 0 0 20px rgba(212,160,56,0.15), 0 0 40px rgba(212,160,56,0.05); }
    .fx-rainbow {
      animation: rainbowBorder 4s linear infinite;
    }
    @keyframes rainbowBorder {
      0% { border-color: #f16060; }
      16% { border-color: #f0b429; }
      33% { border-color: #3ecf8e; }
      50% { border-color: #5b9cf6; }
      66% { border-color: #a78bfa; }
      83% { border-color: #f472b6; }
      100% { border-color: #f16060; }
    }
    .fx-wiggle:hover { animation: wiggle 0.4s ease-in-out; }
    @keyframes wiggle {
      0%, 100% { transform: rotate(0); }
      25% { transform: rotate(-2deg); }
      75% { transform: rotate(2deg); }
    }
    .fx-neon { box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-lo), inset 0 0 8px var(--accent-lo); }

    /* Entrance animations */
    .entrance-bounce { animation: bounceIn 0.6s var(--ease-out); }
    @keyframes bounceIn {
      0% { opacity: 0; transform: scale(0.3); }
      50% { transform: scale(1.05); }
      70% { transform: scale(0.95); }
      100% { opacity: 1; transform: scale(1); }
    }
    .entrance-slide-right {
      animation: slideRight 0.5s var(--ease-out);
    }
    @keyframes slideRight {
      from { opacity: 0; transform: translateX(-30px); }
      to { opacity: 1; transform: translateX(0); }
    }
    .entrance-rotate {
      animation: rotateIn 0.5s var(--ease-out);
    }
    @keyframes rotateIn {
      from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
      to { opacity: 1; transform: rotate(0) scale(1); }
    }
    .entrance-flip {
      animation: flipIn 0.6s var(--ease-out);
    }
    @keyframes flipIn {
      from { opacity: 0; transform: perspective(400px) rotateY(-90deg); }
      to { opacity: 1; transform: perspective(400px) rotateY(0); }
    }

    /* ─── QUICK NOTES / SCRATCHPAD ─────────────────────────────────────── */
    .scratchpad-wrap {
      position: relative;
      margin-top: 20px;
    }
    .scratchpad-title {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      margin-bottom: 8px;
    }
    .scratchpad-area {
      width: 100%;
      min-height: 80px;
      max-height: 300px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 0.82rem;
      padding: 12px 14px;
      resize: none;
      overflow-y: auto;
      transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
    }
    .scratchpad-area::placeholder { color: var(--muted); }
    .scratchpad-area:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-lo);
    }
    .scratchpad-clear {
      position: absolute;
      top: 0; right: 0;
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--muted);
      font-family: var(--font-mono);
      font-size: 0.65rem;
      padding: 3px 10px;
      border-radius: 6px;
      cursor: pointer;
      transition: color 0.2s, border-color 0.2s, background 0.2s;
    }
    .scratchpad-clear:hover {
      color: var(--red);
      border-color: var(--red);
      background: var(--red-lo);
    }

    /* ─── POMODORO TIMER ───────────────────────────────────────────────── */
    .pomodoro-wrap {
      display: flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      user-select: none;
      margin-left: 12px;
    }
    .pomodoro-ring {
      width: 32px;
      height: 32px;
      transform: rotate(-90deg);
    }
    .pomodoro-ring-bg {
      fill: none;
      stroke: var(--border);
      stroke-width: 3;
    }
    .pomodoro-ring-progress {
      fill: none;
      stroke: var(--accent);
      stroke-width: 3;
      stroke-linecap: round;
      transition: stroke-dashoffset 1s linear;
    }
    .pomodoro-time {
      font-size: 0.75rem;
      color: var(--muted);
      font-family: var(--font-mono);
      min-width: 38px;
    }
    .pomodoro-wrap.running .pomodoro-time { color: var(--accent); }
    .pomodoro-wrap.done .pomodoro-time { color: var(--red); }
    @keyframes pomo-blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.3; }
    }
    .pomodoro-wrap.done .pomodoro-time {
      animation: pomo-blink 0.5s ease 4;
    }

    /* ─── THEME PRESETS ────────────────────────────────────────────────── */
    .theme-presets-row {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 6px;
    }
    .theme-preset {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 2px solid transparent;
      cursor: pointer;
      position: relative;
      transition: transform 0.2s var(--ease-out), border-color 0.2s;
    }
    .theme-preset:hover { transform: scale(1.15); }
    .theme-preset.active {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-lo);
    }
    .theme-preset-inner {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .theme-preset-dot {
      width: 14px;
      height: 14px;
      border-radius: 50%;
    }

    /* ─── RESPONSIVE ───────────────────────────────────────────────────── */
    @media (max-width: 768px) {
      .sidebar {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0;
        width: 100% !important; height: auto;
        flex-direction: row; padding: 0;
        border-right: none; border-top: 1px solid var(--border);
      }
      .sidebar-collapse { display: none; }
      .sidebar-nav {
        flex-direction: row; gap: 0; padding: 0;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
      }
      .sidebar .tab {
        padding: 10px 14px; border-radius: 0; flex-shrink: 0;
      }
      .sidebar .tab::before { font-size: 12px; min-width: auto; }
      .sidebar .tab.active::after {
        left: 4px; right: 4px; top: auto; bottom: 0;
        width: auto; height: 2px;
        border-radius: 2px 2px 0 0;
        background: var(--accent);
      }
      .wrapper { margin-left: 0 !important; padding: 16px; padding-bottom: 60px; }
      body.editor-mode .wrapper { margin-left: 0 !important; }
      .header { flex-direction: column; align-items: flex-start; }
      .grid { grid-template-columns: 1fr; }
      .ki-window { width: calc(100% - 32px); right: 16px; bottom: 60px; height: 60vh; }
      .editor-panel { width: 280px; }
    }

    /* ─── KI TEMPLATES PANEL ─────────────────────────────────────────── */
    .ki-templates {
      display: none; flex-direction: column; gap: 6px;
      padding: 10px; background: var(--surface);
      border-bottom: 1px solid var(--border);
      max-height: 220px; overflow-y: auto;
    }
    .ki-templates.visible { display: flex; }
    .ki-templates-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
    }
    .ki-tpl-item {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 10px; border-radius: 6px;
      font-size: 0.72rem; font-family: var(--font-mono);
      color: var(--text); cursor: pointer;
      background: var(--surface2); border: 1px solid var(--border);
      text-align: left; transition: all 0.15s;
      position: relative;
    }
    .ki-tpl-item:hover {
      background: var(--accent-lo); border-color: var(--accent);
      color: var(--accent);
    }
    .ki-tpl-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ki-tpl-delete {
      opacity: 0; background: none; border: none; color: var(--muted);
      cursor: pointer; font-size: 0.75rem; padding: 0 3px; transition: all 0.15s;
      position: absolute; top: 2px; right: 4px;
    }
    .ki-tpl-item:hover .ki-tpl-delete { opacity: 1; }
    .ki-tpl-delete:hover { color: var(--red); }
    .ki-tpl-add {
      display: flex; align-items: center; justify-content: center; gap: 5px;
      padding: 6px; border-radius: 6px; font-size: 0.72rem;
      font-family: var(--font-mono); color: var(--muted);
      cursor: pointer; background: transparent;
      border: 1px dashed var(--border); transition: all 0.15s;
      grid-column: 1 / -1;
    }
    .ki-tpl-add:hover { color: var(--accent); border-color: var(--accent); }
    .ki-tpl-form {
      display: none; flex-direction: column; gap: 6px;
      padding: 8px; background: var(--surface2);
      border-radius: 6px; border: 1px solid var(--border);
      grid-column: 1 / -1;
    }
    .ki-tpl-form.visible { display: flex; }
    .ki-tpl-form input, .ki-tpl-form textarea {
      width: 100%; padding: 6px 10px;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 6px; color: var(--text);
      font-family: var(--font-mono); font-size: 0.75rem;
    }
    .ki-tpl-form input:focus, .ki-tpl-form textarea:focus {
      outline: none; border-color: var(--accent);
    }
    .ki-tpl-form-actions { display: flex; gap: 6px; justify-content: flex-end; }
    .ki-tpl-form-actions button {
      padding: 4px 10px; border-radius: 4px; font-size: 0.7rem;
      font-family: var(--font-mono); cursor: pointer; border: none;
    }
    .ki-tpl-form-save { background: var(--accent); color: var(--bg); }
    .ki-tpl-form-cancel { background: var(--surface); color: var(--muted); border: 1px solid var(--border) !important; }

    /* ─── KI MODEL SWITCHER ──────────────────────────────────────────── */
    .ki-model-switcher {
      display: none; align-items: center; position: relative;
    }
    .ki-model-switcher.visible { display: flex; }
    .ki-model-toggle {
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--muted); font-size: 0.65rem; font-family: var(--font-mono);
      padding: 3px 8px; border-radius: 4px; cursor: pointer;
      transition: all 0.2s; white-space: nowrap;
    }
    .ki-model-toggle:hover { color: var(--accent); border-color: var(--accent); }

    /* ─── RESEARCH MODE TOGGLE ─────────────────────────────────────── */
    .ki-research-toggle {
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--muted); font-size: 0.6rem; font-family: var(--font-mono);
      padding: 3px 8px; border-radius: 12px; cursor: pointer;
      transition: all 0.3s; white-space: nowrap; margin-left: 4px;
    }
    .ki-research-toggle:hover { color: var(--accent); border-color: var(--accent); }
    .ki-research-toggle.active {
      background: rgba(212, 160, 56, 0.15); border-color: var(--accent);
      color: var(--accent); box-shadow: 0 0 8px rgba(212, 160, 56, 0.3);
    }
    .ki-window-header.research-glow {
      animation: research-pulse 2s ease-in-out infinite;
    }
    @keyframes research-pulse {
      0%, 100% { box-shadow: inset 0 -1px 0 var(--border); }
      50% { box-shadow: inset 0 -1px 0 var(--border), 0 0 12px rgba(212, 160, 56, 0.2); }
    }
    .ki-research-badge {
      font-size: 0.55rem; color: var(--accent); font-family: var(--font-mono);
      margin-left: 6px; background: rgba(212, 160, 56, 0.12);
      padding: 1px 6px; border-radius: 8px; vertical-align: middle;
    }

    .ki-model-badge {
      font-size: 0.6rem; color: var(--muted); font-family: var(--font-mono);
      margin-left: 6px; opacity: 0.7;
    }

