/* PartYard Chat widget. Scoped under #pyc-root to resist theme styles.
   Colours and type follow the PartYard website: deep navy, sky blue, ice paper, Plus Jakarta Sans. */
#pyc-root {
  --pyc-brand: #0b304b;
  --pyc-deep: #071f31;
  --pyc-sky: #93b7d3;
  --pyc-blue: #2d5885;
  --pyc-ink: #0f2536;
  --pyc-muted: #5f7686;
  --pyc-steel: #e8eef4;
  --pyc-line: #dbe5ea;
  --pyc-paper: #ffffff;
  --pyc-wash: #f6f8fa;
  --pyc-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --pyc-display: 'Plus Jakarta Sans', inherit;
  --pyc-hover: #12456b;
  --pyc-glow: rgba(147, 183, 211, 0.28);
  --pyc-ring: rgba(147, 183, 211, 0.35);
  --pyc-r-pill: 999px;
  --pyc-r-panel: 26px;
  --pyc-r-bubble: 18px;
  --pyc-r-card: 14px;
  --pyc-r-input: 22px;
  --pyc-r-round: 50%;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--pyc-ink);
}
#pyc-root *, #pyc-root *::before, #pyc-root *::after { box-sizing: border-box; }
#pyc-root [hidden] { display: none !important; }
#pyc-root button, #pyc-root input, #pyc-root textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
}
#pyc-root button { cursor: pointer; }
#pyc-root :focus-visible { outline: 2px solid var(--pyc-sky); outline-offset: 2px; }

/* Launcher: same pill as the site's navy buttons */
#pyc-root .pyc-launcher {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 14px 22px 14px 18px;
  border: 0;
  border-radius: var(--pyc-r-pill);
  background: var(--pyc-brand);
  color: #fff;
  font-family: var(--pyc-display);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  box-shadow: 0 16px 38px rgba(7, 31, 49, 0.38);
  transition: transform 0.35s var(--pyc-ease), background 0.25s, box-shadow 0.35s;
}
#pyc-root .pyc-launcher:hover { transform: translateY(-2px); background: var(--pyc-hover); box-shadow: 0 22px 46px rgba(7, 31, 49, 0.42); }
#pyc-root .pyc-launcher svg { width: 20px; height: 20px; fill: currentColor; }
#pyc-root.pyc-is-open .pyc-launcher-label { display: none; }
#pyc-root.pyc-is-open .pyc-launcher { padding: 14px; }
#pyc-root .pyc-dot {
  position: absolute;
  top: 3px;
  right: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pyc-sky);
  border: 2px solid var(--pyc-brand);
}

/* Panel */
#pyc-root .pyc-panel {
  display: flex;
  flex-direction: column;
  width: 400px;
  height: min(680px, calc(100vh - 110px));
  margin-bottom: 14px;
  background: var(--pyc-paper);
  border: 1px solid rgba(11, 48, 75, 0.1);
  border-radius: var(--pyc-r-panel);
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(7, 31, 49, 0.32), 0 6px 20px rgba(7, 31, 49, 0.1);
  animation: pyc-in 0.35s var(--pyc-ease);
  transition: width 0.3s var(--pyc-ease), height 0.3s var(--pyc-ease);
}
#pyc-root.pyc-wide .pyc-panel {
  width: min(600px, calc(100vw - 40px));
  height: min(820px, calc(100vh - 110px));
}
@keyframes pyc-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

#pyc-root .pyc-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 18px 22px;
  background:
    radial-gradient(260px 120px at 90% -20%, var(--pyc-glow), transparent 70%),
    linear-gradient(160deg, var(--pyc-deep), var(--pyc-brand));
  color: #fff;
}
#pyc-root .pyc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#pyc-root .pyc-title strong { font-family: var(--pyc-display); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
#pyc-root .pyc-sub { font-size: 12.5px; color: var(--pyc-sky); }
#pyc-root .pyc-sub::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--pyc-sky);
  vertical-align: 1px;
}
#pyc-root[data-status="human"] .pyc-sub::before { background: #4cd07d; }
#pyc-root .pyc-human {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--pyc-r-pill);
  background: transparent;
  color: #fff;
  font-family: var(--pyc-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}
#pyc-root .pyc-human:hover { background: #fff; color: var(--pyc-brand); }
#pyc-root .pyc-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  transition: background 0.25s;
}
#pyc-root .pyc-close svg { width: 19px; height: 19px; fill: currentColor; }
#pyc-root .pyc-close:hover { background: rgba(255, 255, 255, 0.14); }

/* Messages */
#pyc-root .pyc-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--pyc-wash);
  scrollbar-width: thin;
  scrollbar-color: var(--pyc-line) transparent;
}
#pyc-root .pyc-msg { display: flex; flex-direction: column; max-width: 88%; }
#pyc-root .pyc-bubble {
  padding: 11px 15px;
  border-radius: var(--pyc-r-bubble);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
#pyc-root .pyc-bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
#pyc-root .pyc-user { align-self: flex-end; }
#pyc-root .pyc-user .pyc-bubble { background: var(--pyc-brand); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }
#pyc-root .pyc-assistant { align-self: flex-start; }
#pyc-root .pyc-assistant .pyc-bubble { background: var(--pyc-paper); border: 1px solid var(--pyc-line); border-bottom-left-radius: 6px; box-shadow: 0 6px 18px rgba(7, 31, 49, 0.05); }
#pyc-root .pyc-agent { align-self: flex-start; }
#pyc-root .pyc-agent .pyc-bubble { background: var(--pyc-steel); border: 1px solid var(--pyc-line); border-left: 3px solid var(--pyc-blue); border-bottom-left-radius: 6px; }
#pyc-root .pyc-who { font-size: 12px; font-weight: 600; color: var(--pyc-blue); margin: 0 0 4px 4px; }
#pyc-root .pyc-system { align-self: center; max-width: 94%; }
#pyc-root .pyc-system .pyc-bubble { background: transparent; color: var(--pyc-muted); font-size: 13px; text-align: center; padding: 2px 6px; }

#pyc-root .pyc-typing .pyc-bubble { display: flex; align-items: center; gap: 5px; padding: 15px 17px; }
#pyc-root .pyc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--pyc-blue); animation: pyc-bounce 1.2s infinite ease-in-out; }
#pyc-root .pyc-typing i:nth-child(2) { animation-delay: 0.16s; }
#pyc-root .pyc-typing i:nth-child(3) { animation-delay: 0.32s; }
@keyframes pyc-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Suggestions and resume */
#pyc-root .pyc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 18px 12px; background: var(--pyc-wash); }
#pyc-root .pyc-chip {
  padding: 8px 14px;
  border: 1px solid var(--pyc-line);
  border-radius: var(--pyc-r-pill);
  background: var(--pyc-paper);
  color: var(--pyc-brand);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
#pyc-root .pyc-chip:hover { background: var(--pyc-brand); border-color: var(--pyc-brand); color: #fff; }
#pyc-root .pyc-resume {
  margin: 0;
  padding: 10px 18px;
  border: 0;
  border-top: 1px solid var(--pyc-line);
  background: var(--pyc-steel);
  color: var(--pyc-brand);
  font-size: 13px;
  text-align: left;
  text-decoration: underline;
}

/* Topic list (empty state) */
#pyc-root .pyc-topics { margin-top: 2px; }
#pyc-root .pyc-topics-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 2px;
  padding: 0 2px 8px;
  font-family: var(--pyc-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pyc-blue);
}
#pyc-root .pyc-topics-title::before { content: ""; width: 26px; height: 2px; background: currentColor; }
#pyc-root .pyc-topic { border-top: 1px solid var(--pyc-line); }
#pyc-root .pyc-topic:last-child { border-bottom: 1px solid var(--pyc-line); }
#pyc-root .pyc-topic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 2px;
  border: 0;
  background: transparent;
  color: var(--pyc-ink);
  font-family: var(--pyc-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  transition: color 0.2s;
}
#pyc-root .pyc-topic-head:hover, #pyc-root .pyc-topic.is-open .pyc-topic-head { color: var(--pyc-blue); }
#pyc-root .pyc-plus {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--pyc-line);
  border-radius: 50%;
  background: var(--pyc-paper);
  transition: transform 0.35s var(--pyc-ease), background 0.25s, color 0.25s, border-color 0.25s;
}
#pyc-root .pyc-plus svg { width: 16px; height: 16px; fill: currentColor; }
#pyc-root .pyc-topic-head:hover .pyc-plus { border-color: var(--pyc-brand); }
#pyc-root .pyc-plus svg { transition: transform 0.35s var(--pyc-ease); }
#pyc-root .pyc-topic.is-open .pyc-plus { background: var(--pyc-brand); border-color: var(--pyc-brand); color: #fff; }
#pyc-root .pyc-topic.is-open .pyc-plus svg { transform: rotate(45deg); }
#pyc-root .pyc-topic-pane { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--pyc-ease); }
#pyc-root .pyc-topic.is-open .pyc-topic-pane { grid-template-rows: 1fr; }
#pyc-root .pyc-topic-inner { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
#pyc-root .pyc-topic.is-open .pyc-topic-inner { padding-bottom: 14px; }
#pyc-root .pyc-q {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--pyc-line);
  border-radius: var(--pyc-r-card);
  background: var(--pyc-paper);
  color: var(--pyc-brand);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--pyc-ease);
}
#pyc-root .pyc-q:hover { background: var(--pyc-brand); border-color: var(--pyc-brand); color: #fff; transform: translateX(3px); }

/* Handoff form */
#pyc-root .pyc-handoff {
  align-self: stretch;
  padding: 18px;
  border: 1px solid var(--pyc-line);
  border-radius: var(--pyc-r-card);
  background: var(--pyc-paper);
  box-shadow: 0 10px 28px rgba(7, 31, 49, 0.07);
}
#pyc-root .pyc-handoff-title { margin: 0 0 12px; font-family: var(--pyc-display); font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
#pyc-root .pyc-handoff label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--pyc-muted); }
#pyc-root .pyc-handoff input, #pyc-root .pyc-handoff textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--pyc-line);
  border-radius: var(--pyc-r-input);
  background: var(--pyc-wash);
  color: var(--pyc-ink);
  font-size: 15px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}
#pyc-root .pyc-handoff input:focus, #pyc-root .pyc-handoff textarea:focus { border-color: var(--pyc-brand); background: #fff; outline: 0; }
#pyc-root .pyc-handoff-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
#pyc-root .pyc-btn, #pyc-root .pyc-btn-ghost { padding: 10px 18px; border-radius: var(--pyc-r-pill); font-family: var(--pyc-display); font-size: 13px; font-weight: 700; }
#pyc-root .pyc-btn { border: 0; background: var(--pyc-brand); color: #fff; }
#pyc-root .pyc-btn:hover { background: var(--pyc-hover); }
#pyc-root .pyc-btn:disabled { opacity: 0.6; }
#pyc-root .pyc-btn-ghost { border: 1px solid var(--pyc-line); background: transparent; color: var(--pyc-ink); }
#pyc-root .pyc-err { margin: 0 0 8px; color: #b42318; font-size: 13px; }

/* Notice above the composer (for example when the microphone is blocked) */
#pyc-root .pyc-note { margin: 0; padding: 8px 18px; background: #fdecea; color: #912018; font-size: 13px; }

/* Input */
#pyc-root .pyc-input { margin: 0; padding: 12px 14px 4px; background: var(--pyc-paper); }
#pyc-root .pyc-box {
  padding: 10px 8px 6px 16px;
  border: 1px solid var(--pyc-line);
  border-radius: var(--pyc-r-input);
  background: var(--pyc-wash);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
#pyc-root .pyc-box:focus-within { border-color: var(--pyc-brand); background: #fff; box-shadow: 0 0 0 4px var(--pyc-ring); }
#pyc-root .pyc-input textarea {
  display: block;
  width: 100%;
  min-height: 26px;
  max-height: 120px;
  padding: 2px 0 8px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 15px;
}
#pyc-root .pyc-input textarea:focus-visible { outline: 0; }
#pyc-root .pyc-input textarea::placeholder { color: #8a9ea9; }
#pyc-root .pyc-tools { display: flex; align-items: center; gap: 4px; }
#pyc-root .pyc-grow { flex: 1; }
#pyc-root .pyc-tool {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pyc-muted);
  transition: background 0.25s, color 0.25s;
}
#pyc-root .pyc-tool svg { width: 20px; height: 20px; fill: currentColor; }
#pyc-root .pyc-tool:hover { background: var(--pyc-steel); color: var(--pyc-brand); }
#pyc-root .pyc-mic.is-listening { background: #fde8e6; color: #b42318; animation: pyc-listen 1.3s ease-in-out infinite; }
@keyframes pyc-listen { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.35); } 50% { box-shadow: 0 0 0 7px rgba(180, 35, 24, 0); } }
#pyc-root .pyc-send {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pyc-brand);
  color: #fff;
  transition: background 0.25s, transform 0.3s var(--pyc-ease);
}
#pyc-root .pyc-send:hover { background: var(--pyc-hover); transform: translateY(-1px); }
#pyc-root .pyc-send:disabled { opacity: 0.5; transform: none; }
#pyc-root .pyc-send svg { width: 18px; height: 18px; fill: currentColor; }
#pyc-root .pyc-foot { padding: 5px 20px 10px; background: var(--pyc-paper); font-size: 11.5px; color: var(--pyc-muted); }
#pyc-root .pyc-foot a { color: inherit; }

/* Mobile: full screen panel */
@media (max-width: 480px) {
  #pyc-root { right: 12px; bottom: 12px; }
  #pyc-root .pyc-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  #pyc-root.pyc-is-open .pyc-launcher { display: none; }
  #pyc-root .pyc-expand { display: none; }
  #pyc-root .pyc-input textarea { font-size: 16px; } /* prevents iOS zoom */
}

@media (prefers-reduced-motion: reduce) {
  #pyc-root .pyc-panel, #pyc-root .pyc-typing i, #pyc-root .pyc-mic.is-listening { animation: none; }
  #pyc-root .pyc-panel, #pyc-root .pyc-topic-pane, #pyc-root .pyc-plus, #pyc-root .pyc-launcher, #pyc-root .pyc-q { transition: none; }
}

/* Sentinel AI (PartYard Defense): olive and sage, square corners, condensed uppercase labels */
#pyc-root[data-theme="sentinel"] {
  --pyc-brand: #1b2a12;
  --pyc-deep: #0f1a09;
  --pyc-sky: #b4bb98;
  --pyc-blue: #566138;
  --pyc-ink: #1a1a12;
  --pyc-muted: #6b6a58;
  --pyc-steel: #e9e6da;
  --pyc-line: #d9d4c4;
  --pyc-paper: #fbfaf6;
  --pyc-wash: #f4f1ea;
  --pyc-display: 'Barlow Condensed', inherit;
  --pyc-hover: #2c4019;
  --pyc-glow: rgba(153, 160, 124, 0.3);
  --pyc-ring: rgba(153, 160, 124, 0.45);
  --pyc-r-pill: 3px;
  --pyc-r-panel: 6px;
  --pyc-r-bubble: 4px;
  --pyc-r-card: 3px;
  --pyc-r-input: 4px;
  --pyc-r-round: 3px;
}
#pyc-root[data-theme="sentinel"] .pyc-panel { border-color: rgba(15, 26, 9, 0.18); box-shadow: 0 40px 90px rgba(15, 26, 9, 0.42), 0 6px 20px rgba(15, 26, 9, 0.14); }
#pyc-root[data-theme="sentinel"] .pyc-head { border-bottom: 2px solid #99a07c; }
#pyc-root[data-theme="sentinel"] .pyc-panel { width: 420px; }
#pyc-root[data-theme="sentinel"] .pyc-head { gap: 10px; }
#pyc-root[data-theme="sentinel"] .pyc-title strong { font-size: 18px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
#pyc-root[data-theme="sentinel"] .pyc-sub { letter-spacing: 0.04em; white-space: nowrap; }
#pyc-root[data-theme="sentinel"] .pyc-human,
#pyc-root[data-theme="sentinel"] .pyc-btn,
#pyc-root[data-theme="sentinel"] .pyc-btn-ghost { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
#pyc-root[data-theme="sentinel"] .pyc-human { padding: 7px 10px; font-size: 12.5px; letter-spacing: 0.07em; }
#pyc-root[data-theme="sentinel"] .pyc-human:hover { background: #99a07c; border-color: #99a07c; color: #0f1a09; }
#pyc-root[data-theme="sentinel"] .pyc-launcher { background: #99a07c; color: #0f1a09; font-weight: 600; letter-spacing: 0.12em; font-size: 14px; box-shadow: 0 16px 38px rgba(15, 26, 9, 0.4); }
#pyc-root[data-theme="sentinel"] .pyc-launcher:hover { background: #aab18d; }
#pyc-root[data-theme="sentinel"] .pyc-dot { background: #1b2a12; border-color: #99a07c; }
#pyc-root[data-theme="sentinel"] .pyc-topics-title,
#pyc-root[data-theme="sentinel"] .pyc-handoff-title { text-transform: uppercase; letter-spacing: 0.14em; }
#pyc-root[data-theme="sentinel"] .pyc-topic-head { font-size: 17px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
#pyc-root[data-theme="sentinel"] .pyc-plus,
#pyc-root[data-theme="sentinel"] .pyc-send,
#pyc-root[data-theme="sentinel"] .pyc-tool,
#pyc-root[data-theme="sentinel"] .pyc-close { border-radius: var(--pyc-r-round); }
#pyc-root[data-theme="sentinel"] .pyc-send { background: #1b2a12; }
#pyc-root[data-theme="sentinel"] .pyc-user .pyc-bubble { background: #1b2a12; }
#pyc-root[data-theme="sentinel"] .pyc-assistant .pyc-bubble { box-shadow: none; }
#pyc-root[data-theme="sentinel"] .pyc-q:hover { background: #1b2a12; border-color: #1b2a12; }
#pyc-root[data-theme="sentinel"] .pyc-typing i { background: #566138; }
#pyc-root[data-theme="sentinel"] .pyc-box:focus-within { border-color: #566138; }

/* Avatar peeking from behind the launcher: rises, looks around, says hello, hides again */
#pyc-root .pyc-peek { position: absolute; right: 12px; bottom: 36px; width: 98px; height: 104px; z-index: 1; pointer-events: none; }
#pyc-root.pyc-is-open .pyc-peek { display: none; }
/* only the bottom is cut (the avatar hides behind the button); props like the drone may fly above and beside */
#pyc-root .pyc-peek-clip { position: absolute; inset: 0; clip-path: inset(-260px -260px 0 -260px); }
#pyc-root .pyc-peek-fig { position: absolute; left: 0; bottom: 0; width: 98px; height: 98px; transform: translateY(104%); transform-origin: 50% 100%; transition: transform 0.45s var(--pyc-ease); }
#pyc-root .pyc-peek-fig svg { display: block; width: 100%; height: 100%; overflow: visible; }
#pyc-root .pyc-launcher:hover + .pyc-peek .pyc-peek-fig { transform: translateY(34%); }
#pyc-root .pyc-peek.is-peeking .pyc-peek-fig { animation: pyc-peek-rise 7.2s ease-in-out both; }
#pyc-root .pyc-peek-bubble {
  position: absolute;
  right: 104px;
  bottom: 48px;
  width: max-content;
  max-width: 210px;
  padding: 9px 13px;
  border: 1px solid var(--pyc-line);
  border-radius: var(--pyc-r-bubble);
  background: var(--pyc-paper);
  color: var(--pyc-ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  box-shadow: 0 10px 26px rgba(7, 31, 49, 0.18);
  opacity: 0;
  transform: translateY(6px) scale(0.92);
  transform-origin: 100% 100%;
}
#pyc-root .pyc-peek-bubble::after { content: ""; position: absolute; right: -6px; bottom: 11px; width: 10px; height: 10px; background: var(--pyc-paper); border-top: 1px solid var(--pyc-line); border-right: 1px solid var(--pyc-line); transform: rotate(45deg); }
#pyc-root .pyc-peek.is-peeking .pyc-peek-bubble { animation: pyc-peek-say 7.2s ease-in-out both; }
@keyframes pyc-peek-rise {
  0% { transform: translateY(104%) rotate(0); }
  11% { transform: translateY(-8%) rotate(0); }
  18% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(0) rotate(-4deg); }
  40% { transform: translateY(0) rotate(4deg); }
  50% { transform: translateY(0) rotate(-2.5deg); }
  58% { transform: translateY(0) rotate(0); }
  86% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(104%) rotate(0); }
}
@keyframes pyc-peek-say {
  0%, 16% { opacity: 0; transform: translateY(6px) scale(0.92); }
  24%, 80% { opacity: 1; transform: none; }
  90%, 100% { opacity: 0; transform: translateY(4px) scale(0.96); }
}

/* shared drawing rules: thick rounded outline, flat colours */
#pyc-root .pyc-peek svg .o { stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
#pyc-root .pyc-peek svg .pk-sclera { fill: #fff; }
#pyc-root .pyc-peek svg .pk-glint { fill: #fff; }
#pyc-root .pyc-peek svg .pk-eyes { transform-box: fill-box; transform-origin: 50% 50%; }
#pyc-root .pyc-peek svg .pk-pupil { transform-box: fill-box; transform-origin: 50% 50%; }
#pyc-root .pyc-peek svg .pk-char { transform-box: view-box; transform-origin: 50% 100%; }
#pyc-root .pyc-peek.is-peeking svg .pk-eyes { animation: pyc-blink-eye 3.2s ease-in-out 1s infinite; }
#pyc-root .pyc-peek.is-peeking svg .pk-pupil { animation: pyc-look 3.4s ease-in-out 0.6s infinite; }
#pyc-root .pyc-peek.is-peeking svg .pk-char { animation: pyc-sway 3.6s ease-in-out infinite; }
@keyframes pyc-blink-eye { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
@keyframes pyc-look { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-2px); } 70% { transform: translateX(2px); } }
@keyframes pyc-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.2deg); } }

/* Sentinel palette */
#pyc-root .pyc-peek-sentinel svg .o { stroke: #0f1a09; }
#pyc-root .pyc-peek-sentinel svg .pk-sbody { fill: #1f2e14; }
#pyc-root .pyc-peek-sentinel svg .pk-sage-fill { fill: #99a07c; }
#pyc-root .pyc-peek-sentinel svg .pk-skin { fill: #ecd0aa; }
#pyc-root .pyc-peek-sentinel svg .pk-skin2 { fill: #d6b184; }
#pyc-root .pyc-peek-sentinel svg .pk-pupil { fill: #1a1a12; }
#pyc-root .pyc-peek-sentinel svg .pk-brow { fill: none; stroke: #0f1a09; stroke-width: 3; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-mouth { fill: none; stroke: #0f1a09; stroke-width: 3; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-helm { fill: #52672f; }
#pyc-root .pyc-peek-sentinel svg .pk-stripe { fill: none; stroke: #99a07c; stroke-width: 3.2; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-cup { fill: #2c4019; }
#pyc-root .pyc-peek-sentinel svg .pk-boom { fill: none; stroke: #0f1a09; stroke-width: 2.6; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-mic { fill: #99a07c; }
/* VR operator + drone */
#pyc-root .pyc-peek-sentinel svg .pk-strap { fill: none; stroke: #0f1a09; stroke-width: 4; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-vr { fill: #1b2a12; }
#pyc-root .pyc-peek-sentinel svg .pk-lens { fill: #b4bb98; }
#pyc-root .pyc-peek-sentinel svg .pk-grin { stroke-width: 3.2; }
#pyc-root .pyc-peek-sentinel svg .pk-darm { fill: none; stroke: #0f1a09; stroke-width: 2.4; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-dbody { fill: #b4bb98; stroke-width: 2; }
#pyc-root .pyc-peek-sentinel svg .pk-rotor { fill: #99a07c; opacity: 0.85; transform-box: fill-box; transform-origin: 50% 50%; }
#pyc-root .pyc-peek-sentinel svg .pk-dleg { fill: none; stroke: #0f1a09; stroke-width: 1.8; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-dcam { fill: #1b2a12; stroke-width: 1.6; }
#pyc-root .pyc-peek-sentinel svg .pk-dled { fill: #e4544b; }
#pyc-root .pyc-peek-sentinel svg .pk-fly { transform-box: view-box; }
#pyc-root .pyc-peek.is-peeking.pk-v-vr svg .pk-fly { animation: pyc-drone-orbit 4.2s ease-in-out infinite; }
#pyc-root .pyc-peek.is-peeking.pk-v-vr svg .pk-drone { animation: pyc-drone-tilt 4.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
#pyc-root .pyc-peek.is-peeking.pk-v-vr svg .pk-rotor { animation: pyc-rotor 0.1s linear infinite; }
#pyc-root .pyc-peek.is-peeking.pk-v-vr svg .pk-dled { animation: pyc-led 0.6s steps(2, jump-none) infinite; }
#pyc-root .pyc-peek.is-peeking.pk-v-vr svg .pk-lens { animation: pyc-lens 1.4s ease-in-out infinite; }
#pyc-root .pyc-peek.is-peeking.pk-v-vr svg .pk-tilt { animation: pyc-follow 4.2s ease-in-out infinite; }
@keyframes pyc-drone-orbit {
  0%, 100% { transform: translate(-30px, 4px) scale(0.85); }
  25% { transform: translate(0, -9px) scale(0.75); }
  50% { transform: translate(30px, 4px) scale(0.85); }
  75% { transform: translate(0, 12px) scale(1.15); }
}
@keyframes pyc-drone-tilt { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes pyc-follow { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes pyc-rotor { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.5); } 100% { transform: scaleX(1); } }
@keyframes pyc-led { 0% { opacity: 1; } 100% { opacity: 0.15; } }
@keyframes pyc-lens { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
/* anti-tank soldier */
#pyc-root .pyc-peek-sentinel svg .pk-tube { fill: #3b4c27; }
#pyc-root .pyc-peek-sentinel svg .pk-warhead { fill: #99a07c; }
#pyc-root .pyc-peek-sentinel svg .pk-band { fill: none; stroke: #0f1a09; stroke-width: 3; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-paint { fill: none; stroke: #566138; stroke-width: 2.6; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-scrim { fill: none; stroke: #2c4019; stroke-width: 3; stroke-linecap: round; }
/* jet pilot */
#pyc-root .pyc-peek-sentinel svg .pk-phelm { fill: #ece9dd; }
#pyc-root .pyc-peek-sentinel svg .pk-pstripe { fill: none; stroke: #99a07c; stroke-width: 3.2; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-pvisor { fill: #3a3321; }
#pyc-root .pyc-peek-sentinel svg .pk-pglint { fill: none; stroke: #e7d79a; stroke-width: 2.6; stroke-linecap: round; opacity: 0.8; }
#pyc-root .pyc-peek-sentinel svg .pk-teeth { fill: #fff; stroke-width: 2.4; }
#pyc-root .pyc-peek-sentinel svg .pk-mask { fill: #2c4019; }
#pyc-root .pyc-peek-sentinel svg .pk-hose { fill: none; stroke: #0f1a09; stroke-width: 2.6; stroke-linecap: round; }
#pyc-root .pyc-peek-sentinel svg .pk-jbody { fill: #cfd3be; stroke-width: 2.2; }
#pyc-root .pyc-peek-sentinel svg .pk-jwing { fill: #99a07c; stroke-width: 2; }
#pyc-root .pyc-peek-sentinel svg .pk-trail { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 5; opacity: 0.8; }
#pyc-root .pyc-peek.is-peeking.pk-v-pilot svg .pk-jet { animation: pyc-jet 3.6s linear 0.8s infinite; opacity: 0; }
@keyframes pyc-jet {
  0% { transform: translate(0, 4px); opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translate(190px, -16px); opacity: 0; }
}
/* Sonar AI: robot sailor with a pinging antenna */
#pyc-root .pyc-peek-sonar svg .o { stroke: var(--pyc-brand); }
#pyc-root .pyc-peek-sonar svg .pk-nbody { fill: var(--pyc-brand); }
#pyc-root .pyc-peek-sonar svg .pk-ncollar { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
#pyc-root .pyc-peek-sonar svg .pk-nhead { fill: #e8eef4; }
#pyc-root .pyc-peek-sonar svg .pk-nbolt { fill: #93b7d3; }
#pyc-root .pyc-peek-sonar svg .pk-nport { fill: var(--pyc-brand); }
#pyc-root .pyc-peek-sonar svg .pk-neyeball { fill: #fff; }
#pyc-root .pyc-peek-sonar svg .pk-npupil { fill: #2d5885; transform-box: fill-box; transform-origin: 50% 50%; }
#pyc-root .pyc-peek-sonar svg .pk-nsmile { fill: none; stroke: var(--pyc-brand); stroke-width: 3.2; stroke-linecap: round; }
#pyc-root .pyc-peek-sonar svg .pk-ncap { fill: #fff; }
#pyc-root .pyc-peek-sonar svg .pk-nband { fill: var(--pyc-brand); }
#pyc-root .pyc-peek-sonar svg .pk-nbadge { fill: #93b7d3; stroke-width: 2; }
#pyc-root .pyc-peek-sonar svg .pk-nant { fill: none; stroke: var(--pyc-brand); stroke-width: 3; stroke-linecap: round; }
#pyc-root .pyc-peek-sonar svg .pk-nbulb { fill: #93b7d3; stroke-width: 2; }
#pyc-root .pyc-peek-sonar svg .pk-ping { fill: none; stroke: #93b7d3; stroke-width: 2.4; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
#pyc-root .pyc-peek.is-peeking.pk-v-sonar svg .pk-ping { animation: pyc-ping 1.8s ease-out infinite; }
#pyc-root .pyc-peek.is-peeking.pk-v-sonar svg .pk-ping2 { animation-delay: 0.9s; }
@keyframes pyc-ping { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }
@media (max-width: 480px) {
  #pyc-root .pyc-peek { transform: scale(0.8); transform-origin: 100% 100%; }
}
/* Reduced motion: the avatar still shows up, but only fades in and out, and nothing on it moves */
#pyc-root .pyc-peek-calm .pyc-peek-fig { transform: none; opacity: 0; }
#pyc-root .pyc-peek-calm.is-peeking .pyc-peek-fig { animation: pyc-peek-fade 6s ease both; }
#pyc-root .pyc-launcher:hover + .pyc-peek-calm .pyc-peek-fig { transform: none; }
#pyc-root .pyc-peek-calm svg *, #pyc-root .pyc-peek-calm.is-peeking svg * { animation: none !important; }
@keyframes pyc-peek-fade { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #pyc-root .pyc-peek .pyc-peek-fig { transition: none; }
}
