  * { margin: 0; padding: 0; box-sizing: border-box; }

  /* ── click ripple ── */
  .click-ripple {
    position: fixed;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    width: 20px; height: 20px;
    margin: -10px 0 0 -10px;
    pointer-events: none;
    animation: ripple 0.5s ease-out forwards;
    z-index: 9999;
  }
  @keyframes ripple {
    to { width: 56px; height: 56px; margin: -28px 0 0 -28px; opacity: 0; }
  }

  /* ── hold-to-summon ring ── */
  #hold-ring-canvas {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.15s;
  }
  #hold-ring-canvas.visible { opacity: 1; }

  /* ── agent canvas ── */
  #agent-canvas {
    position: absolute;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: pointer;
    z-index: 100;
  }

  /* ── debug overlay ── */
  #debug {
    position: fixed;
    top: 12px; right: 12px;
    z-index: 9999;
    display: none;
    width: 200px;
  }
  #debug .window-body {
    font-size: 10px;
    line-height: 1.8;
    padding: 6px 8px;
  }

  /* ── Clippy-style dialogue bubble ── */
  #dialogue {
    position: absolute;
    width: 220px;
    z-index: 200;
    display: none;
    filter: drop-shadow(2px 3px 0px rgba(0,0,0,0.3));
  }
  #dialogue.open { display: block; }

  /* Clippy yellow bubble body */
  #dialogue-bubble-body {
    background: #fffacd;
    border: 1.5px solid #c8a800;
    border-radius: 6px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
  }

  /* Buddy's reply text — no fixed min-height, shrinks to content */
  #buddy-reply {
    font-family: "Courier New", monospace;
    font-size: 11px;
    line-height: 1.45;
    color: #111;
    word-break: break-word;
  }

  /* Divider between reply and input */
  #dialogue-divider {
    border: none;
    border-top: 1px solid #d4b800;
    margin: 0;
  }

  /* User text input — full width, no send button */
  #dialogue-input-row { display: flex; }
  #dialogue-input {
    width: 100%;
    font-family: "Courier New", monospace;
    font-size: 11px;
    border: 1.5px solid #a89000;
    border-radius: 3px;
    padding: 3px 5px;
    outline: none;
    background: #fffff0;
    box-sizing: border-box;
  }
  #dialogue-input:focus { border-color: #000080; }

  /* Idle countdown bar */
  #idle-bar-track {
    height: 2px;
    background: #e8d060;
    border-radius: 2px;
    overflow: hidden;
  }
  #idle-bar-fill {
    height: 100%;
    background: #a07800;
    width: 100%;
    transform-origin: left;
    transition: none;
  }

  /* Clippy-yellow tail */
  #dialogue-tail {
    width: 0; height: 0;
    border-left: 12px solid transparent;
    border-right: 5px solid transparent;
    border-top: 14px solid #c8a800;
    margin-left: 18px;
    position: relative;
  }
  #dialogue-tail::after {
    content: '';
    position: absolute;
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 4px solid transparent;
    border-top: 12px solid #fffacd;
    top: -15px;
    left: -10px;
  }

  /* passive mode — input row hidden */
  #dialogue.passive #dialogue-input-row,
  #dialogue.passive #dialogue-divider,
  #dialogue.passive #idle-bar-track { display: none; }
  .typing-dots span {
    display: inline-block;
    animation: blink 1s infinite;
  }
  .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
  .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes blink { 0%,80%,100%{opacity:0} 40%{opacity:1} }

  /* hint text */
  #hint {
    position: fixed;
    bottom: 16px;
    right: 16px;
    color: rgba(255,255,255,0.45);
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1.8;
    text-align: right;
    pointer-events: none;
    z-index: 9999;
  }




















    * { margin: 0; padding: 0; box-sizing: border-box; }

  /* ── click ripple ── */
  .click-ripple {
    position: fixed;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    width: 20px; height: 20px;
    margin: -10px 0 0 -10px;
    pointer-events: none;
    animation: ripple 0.5s ease-out forwards;
    z-index: 9999;
  }
  @keyframes ripple {
    to { width: 56px; height: 56px; margin: -28px 0 0 -28px; opacity: 0; }
  }

  /* ── hold-to-summon ring ── */
  #hold-ring-canvas {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.15s;
  }
  #hold-ring-canvas.visible { opacity: 1; }

  /* ── agent canvas ── */
  #agent-canvas {
    position: absolute;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: pointer;
    z-index: 100;
  }

  /* ── debug overlay ── */
  #debug {
    position: fixed;
    top: 12px; right: 12px;
    z-index: 9999;
    display: none;
    width: 200px;
  }
  #debug .window-body {
    font-size: 10px;
    line-height: 1.8;
    padding: 6px 8px;
  }

  /* ── Clippy-style dialogue bubble ── */
  #dialogue {
    position: absolute;
    width: 220px;
    z-index: 200;
    display: none;
    filter: drop-shadow(2px 3px 0px rgba(0,0,0,0.3));
  }
  #dialogue.open { display: block; }

  /* Clippy yellow bubble body */
  #dialogue-bubble-body {
    background: #fffacd;
    border: 1.5px solid #c8a800;
    border-radius: 6px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
  }

  /* Buddy's reply text — no fixed min-height, shrinks to content */
  #buddy-reply {
    font-family: "Courier New", monospace;
    font-size: 11px;
    line-height: 1.45;
    color: #111;
    word-break: break-word;
  }

  /* Divider between reply and input */
  #dialogue-divider {
    border: none;
    border-top: 1px solid #d4b800;
    margin: 0;
  }

  /* User text input — full width, no send button */
  #dialogue-input-row { display: flex; }
  #dialogue-input {
    width: 100%;
    font-family: "Courier New", monospace;
    font-size: 11px;
    border: 1.5px solid #a89000;
    border-radius: 3px;
    padding: 3px 5px;
    outline: none;
    background: #fffff0;
    box-sizing: border-box;
  }
  #dialogue-input:focus { border-color: #000080; }

  /* Idle countdown bar */
  #idle-bar-track {
    height: 2px;
    background: #e8d060;
    border-radius: 2px;
    overflow: hidden;
  }
  #idle-bar-fill {
    height: 100%;
    background: #a07800;
    width: 100%;
    transform-origin: left;
    transition: none;
  }

  /* Clippy-yellow tail */
  #dialogue-tail {
    width: 0; height: 0;
    border-left: 12px solid transparent;
    border-right: 5px solid transparent;
    border-top: 14px solid #c8a800;
    margin-left: 18px;
    position: relative;
  }
  #dialogue-tail::after {
    content: '';
    position: absolute;
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 4px solid transparent;
    border-top: 12px solid #fffacd;
    top: -15px;
    left: -10px;
  }

  /* passive mode — input row hidden */
  #dialogue.passive #dialogue-input-row,
  #dialogue.passive #dialogue-divider,
  #dialogue.passive #idle-bar-track { display: none; }
  .typing-dots span {
    display: inline-block;
    animation: blink 1s infinite;
  }
  .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
  .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes blink { 0%,80%,100%{opacity:0} 40%{opacity:1} }

  /* ── hint ── */
  #hint {
    position: fixed;
    bottom: 44px; right: 16px;
    color: rgba(255,255,255,0.45);
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1.8;
    text-align: right;
    pointer-events: none;
    z-index: 9999;
  }