  /* =====================================================================
     KYVERA ASSISTANT — floating chat widget
     Self-contained: drop the <div id="kyveraChat">…</div> markup + this
     <style> block + the closing <script> block into any page. Only
     dependency is the site's existing "GC Akihiko" font-face + the
     kyvera-logo.png asset (falls back gracefully if missing).
     ===================================================================== */
  :root {
    --kc-ink: #071a2a;
    --kc-panel: #0b2338;
    --kc-panel-2: #0f2b43;
    --kc-line: rgba(255, 255, 255, 0.1);
    --kc-gold: #d4a75c;
    --kc-gold-light: #f0cf94;
    --kc-gold-dark: #c09043;
    --kc-text: #eef2f3;
    --kc-muted: #aab7bc;
  }

  #kyveraChat {
    position: fixed;
    z-index: 2000;
    right: 24px;
    bottom: 24px;
    font-family: Arial, Helvetica, sans-serif;
  }

  /* ---- Launcher button ---- */
  /* #kyveraChat prefix (ID selector) bumps specificity so this reliably
     beats the theme's hello-elementor/reset.css rule
     "[type="button"], [type="submit"], button { border: 1px solid #cc3366 }"
     — our <button type="button"> matches BOTH the bare "button" tag AND the
     "[type=button]" attribute selector in that rule, giving it specificity
     equal to a single class (0,1,0), which ties our own ".kc-launcher"
     class rule and then wins on source order (reset.css loads later). The
     same tie affects .kc-header-close, .kc-chip and .kc-send below. */
  #kyveraChat .kc-launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #123048, var(--kc-ink) 75%);
    box-shadow: 0 16px 34px rgba(7, 26, 42, 0.45);
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease;
  }

  .kc-launcher:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(7, 26, 42, 0.5);
  }

  .kc-launcher::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(212, 167, 92, 0.45);
    animation: kcPulseRing 2.6s ease-out infinite;
  }

  @keyframes kcPulseRing {
    0%   { transform: scale(0.92); opacity: 0.9; }
    70%  { transform: scale(1.28); opacity: 0; }
    100% { transform: scale(1.28); opacity: 0; }
  }

  .kc-launcher svg {
    width: 26px;
    height: 26px;
    color: var(--kc-gold-light);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .kc-launcher .kc-icon-close {
    /* Absolutely-positioned icon needs an explicit centering anchor
       (top/left 50% + translate) — without it the icon falls back to its
       flex-item "static position" (as the 2nd icon in the row), which sits
       to the right of center and spills outside the circular button. */
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-45deg) scale(0.7);
  }

  #kyveraChat.is-open .kc-launcher .kc-icon-chat {
    opacity: 0;
    transform: rotate(45deg) scale(0.7);
  }

  #kyveraChat.is-open .kc-launcher .kc-icon-close {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }

  .kc-launcher-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--kc-gold);
    color: #10202c;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 0 0 3px #f2f1ec;
  }

  #kyveraChat.is-open .kc-launcher-badge { display: none; }

  /* ---- Panel ---- */
  .kc-panel {
    position: absolute;
    right: 0;
    bottom: 78px;
    width: 392px;
    max-width: calc(100vw - 32px);
    height: min(640px, calc(100vh - 130px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: var(--kc-panel);
    border: 1px solid var(--kc-line);
    box-shadow: 0 30px 70px rgba(7, 19, 31, 0.4);
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    pointer-events: none;
    transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1), transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
  }

  #kyveraChat.is-open .kc-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  /* ---- Header ---- */
  .kc-header {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 16px;
    background: linear-gradient(120deg, #0a1f31 0%, #123048 100%);
    border-bottom: 1px solid var(--kc-line);
  }

  .kc-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 12% 0%, rgba(212, 167, 92, 0.22), transparent 55%);
    pointer-events: none;
  }

  .kc-header-avatar {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 32%, var(--kc-gold-light), var(--kc-gold) 60%, var(--kc-gold-dark) 100%);
    color: #10202c;
    font-family: "GC Akihiko", "Montserrat", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0.02em;
  }

  .kc-header-text {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
  }

  .kc-header-text h2 {
    margin: 0;
    color: var(--kc-text);
    font-family: "GC Akihiko", "Montserrat", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.02em;
  }

  .kc-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    color: var(--kc-muted);
    font-size: 11.5px;
  }

  .kc-header-status span.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6fd39a;
    box-shadow: 0 0 6px rgba(111, 211, 154, 0.8);
  }

  #kyveraChat .kc-header-close {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: transparent;
    color: var(--kc-muted);
    cursor: pointer;
    transition: 160ms ease;
  }

  #kyveraChat .kc-header-close:hover {
    border-color: var(--kc-gold);
    color: var(--kc-gold);
  }

  .kc-header-close svg { width: 13px; height: 13px; }

  /* ---- Message thread ---- */
  .kc-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 16px 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 167, 92, 0.35) transparent;
  }

  .kc-body::-webkit-scrollbar { width: 6px; }
  .kc-body::-webkit-scrollbar-thumb { background: rgba(212, 167, 92, 0.35); border-radius: 999px; }

  .kc-row { display: flex; }
  .kc-row--bot { justify-content: flex-start; }
  .kc-row--user { justify-content: flex-end; }

  .kc-bubble {
    max-width: 82%;
    padding: 11px 14px;
    font-size: 13.5px;
    line-height: 1.6;
    animation: kcBubbleIn 260ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes kcBubbleIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .kc-row--bot .kc-bubble {
    border-radius: 4px 14px 14px 14px;
    background: var(--kc-panel-2);
    border: 1px solid var(--kc-line);
    color: var(--kc-text);
  }

  .kc-row--bot .kc-bubble p { margin: 0 0 8px; }
  .kc-row--bot .kc-bubble p:last-child { margin-bottom: 0; }
  .kc-row--bot .kc-bubble ul { margin: 6px 0; padding-left: 18px; }
  .kc-row--bot .kc-bubble li { margin-bottom: 4px; }
  .kc-row--bot .kc-bubble b { color: var(--kc-gold-light); font-weight: 700; }

  .kc-row--user .kc-bubble {
    border-radius: 14px 4px 14px 14px;
    background: linear-gradient(135deg, var(--kc-gold-light), var(--kc-gold) 65%, var(--kc-gold-dark));
    color: #10202c;
    font-weight: 600;
  }

  /* typing indicator */
  .kc-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 13px 14px;
    border-radius: 4px 14px 14px 14px;
    background: var(--kc-panel-2);
    border: 1px solid var(--kc-line);
  }

  .kc-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kc-gold);
    animation: kcTypingDot 1.1s ease-in-out infinite;
  }

  .kc-typing span:nth-child(2) { animation-delay: 0.15s; }
  .kc-typing span:nth-child(3) { animation-delay: 0.3s; }

  @keyframes kcTypingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
  }

  /* ---- Quick reply chips ---- */
  .kc-chips {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--kc-line);
  }

  #kyveraChat .kc-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid rgba(212, 167, 92, 0.4);
    border-radius: 999px;
    background: rgba(212, 167, 92, 0.08);
    color: var(--kc-gold-light);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 160ms ease;
    white-space: nowrap;
  }

  #kyveraChat .kc-chip:hover {
    background: var(--kc-gold);
    color: #10202c;
    border-color: var(--kc-gold);
  }

  #kyveraChat .kc-chip--cta {
    background: linear-gradient(135deg, var(--kc-gold-light), var(--kc-gold) 65%, var(--kc-gold-dark));
    color: #10202c;
    border-color: transparent;
  }

  /* ---- Input row ---- */
  .kc-input-row {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--kc-line);
    background: var(--kc-ink);
  }

  .kc-input-row input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--kc-line);
    border-radius: 20px;
    background: var(--kc-panel-2);
    color: var(--kc-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13.5px;
  }

  .kc-input-row input::placeholder { color: rgba(238, 242, 243, 0.4); }

  .kc-input-row input:focus {
    outline: none;
    border-color: var(--kc-gold);
  }

  #kyveraChat .kc-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kc-gold-light), var(--kc-gold) 65%, var(--kc-gold-dark));
    color: #10202c;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
  }

  .kc-send:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(212, 167, 92, 0.35); }
  .kc-send svg { width: 16px; height: 16px; }

  .kc-footnote {
    flex: 0 0 auto;
    padding: 8px 16px 12px;
    background: var(--kc-ink);
    color: rgba(238, 242, 243, 0.35);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
  }

  @media (max-width: 480px) {
    #kyveraChat { right: 16px; bottom: 16px; }

    .kc-panel {
      position: fixed;
      inset: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      max-width: 100%;
      height: 100%;
      border-radius: 0;
    }
  }
