/* ============================================================
   Kestrel 1 — chat page (light/pastel, built on the shared
   AxiomInference design tokens in styles.css)
   ============================================================ */

:root {
  --k-sidebar-bg: #f5f3ee;
  --k-main-bg: var(--paper);
  --k-user-bubble: #f0efe9;
  --k-input-bg: #ffffff;
  --k-border: var(--line);
  --k-sidebar-w: 272px;
  --k-skill-accent: #4378aa;
}

html, body.kestrel-body {
  height: 100%;
  overflow: hidden;
  background: var(--k-main-bg);
  overscroll-behavior: none;
}

/* ---------- Access gate ---------- */
.gate[hidden] {
  display: none;
}

.gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-warm);
  z-index: 500;
  padding: 24px;
}

.gate-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.gate-mark {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
}

.gate-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.gate-copy {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 28px;
}

#gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-input {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  outline: none;
}
.gate-input[type="email"] { letter-spacing: 0; }
.kaccount-logout {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--ink-soft);
  font: 0.76rem var(--font-body);
  text-align: left;
  cursor: pointer;
}
.kaccount-logout:hover { color: var(--ink); }

.gate-input:focus {
  border-color: var(--ink);
}

.gate-submit {
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.gate-error {
  color: #b3432b;
  font-size: 0.88rem;
  margin: 16px 0 0;
}

.gate-back {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.gate-back:hover { color: var(--ink); }

.gate.shake { animation: gate-shake 0.32s ease; }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ---------- App shell ---------- */
.kapp {
  display: flex;
  height: 100vh;
  height: 100dvh;
}

.kapp[hidden] {
  display: none;
}

/* Mobile top bar + menu toggle + scrim: hidden entirely on desktop, only shown under
   the responsive breakpoint below, where the sidebar becomes an off-canvas drawer. */
.kmobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--k-border);
  background: var(--k-sidebar-bg);
  flex: none;
}

.kmobile-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.kmenu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--k-border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  flex: none;
  position: relative;
}
.kmenu-toggle span,
.kmenu-toggle span::before,
.kmenu-toggle span::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.kmenu-toggle span { top: 18px; }
.kmenu-toggle span::before { top: -6px; }
.kmenu-toggle span::after { top: 6px; }

.kmenu-scrim[hidden] {
  display: none;
}
.kmenu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(22, 21, 15, 0.35);
  z-index: 590;
}

.ksidebar {
  width: var(--k-sidebar-w);
  flex: none;
  background: var(--k-sidebar-bg);
  border-right: 1px solid var(--k-border);
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  gap: 18px;
}

.kbrand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.ksidebar-new {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--k-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ksidebar-new:hover { background: #ffffff; transform: translateY(-1px); }
.ksidebar-new span { font-size: 1.05rem; line-height: 1; color: var(--ink-soft); }

.ksidebar-tabs {
  display: flex;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--k-border);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.ksidebar-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ksidebar-tab.active {
  background: var(--ink);
  color: var(--paper);
}

.ksidebar-view[hidden] {
  display: none;
}

.ksidebar-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}

.ksidebar-note {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
  margin: -6px 0 0;
}

/* ---------- Saved chat list (rename / delete live per-item) ---------- */
.chat-sessions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.chat-sessions-empty {
  color: var(--ink-soft);
  font-size: 0.82rem;
  padding: 8px 4px;
}

.chat-session-item {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 8px;
}

.chat-session-item.active {
  background: var(--paper);
}

.csi-open {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 9px 8px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 8px;
}
.chat-session-item.active .csi-open { font-weight: 600; }
.csi-open:hover { background: var(--paper); }

.csi-rename,
.csi-delete {
  flex: none;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.86rem;
  padding: 6px;
  border-radius: 6px;
  min-width: 28px;
  min-height: 28px;
}
.csi-rename:hover { color: var(--ink); background: #ffffff; }
.csi-delete:hover { color: #b3432b; background: #ffffff; }

/* ---------- Projects file bar (lives at the top of the Projects panel, not the sidebar,
   so it stays reachable regardless of sidebar/drawer state on any screen size) ---------- */
.kproj-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px clamp(16px, 6vw, 24px);
  border-bottom: 1px solid var(--k-border);
  transition: background 0.15s ease;
}

.kproj-bar.drag-over {
  background: var(--paper-warm);
}

.kproj-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--k-border);
  border-radius: 999px;
  background: var(--paper);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--ink);
  cursor: pointer;
  flex: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.kproj-add-btn:hover { background: #ffffff; transform: translateY(-1px); }
.kproj-add-btn span { color: var(--ink-soft); }

.kproj-hint {
  margin: 0;
  font-size: 0.7rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  flex: none;
  width: 100%;
}

.kproj-lead {
  max-width: 480px;
  margin: -8px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.project-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.project-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--k-border);
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  font-size: 0.82rem;
  max-width: 220px;
}

.project-file .pf-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.project-file .pf-size {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  flex: none;
}

.project-file .pf-remove {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 2px 4px;
  flex: none;
  min-width: 28px;
  min-height: 28px;
}
.project-file .pf-remove:hover { color: #b3432b; }

.ksidebar-foot {
  padding-top: 8px;
  border-top: 1px solid var(--k-border);
}

.k-status { border-color: var(--k-border); color: var(--ink-soft); }

/* ---------- Main column ---------- */
.kmain {
  flex: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.kpanel[hidden] {
  display: none;
}

.kpanel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.kgreeting[hidden] {
  display: none;
}

.kgreeting {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.greet-mark {
  width: 44px;
  height: 44px;
}

.kgreeting .section-title {
  margin: 0;
}

/* Randomized personalized greeting (replaces the old static "What can I help with?" +
   suggestion-card grid) -- a fresh phrase fades in each time the greeting is (re)shown. */
@keyframes kgreet-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.kgreet-text.animate {
  animation: kgreet-fade 0.4s ease;
}

/* ---------- "New chat" usage overview ---------- */
.kusage-overview[hidden] { display: none; }

.kusage-overview {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.kusage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kusage-stat {
  border: 1px solid var(--k-border);
  border-radius: var(--radius-md);
  background: var(--k-sidebar-bg);
  padding: 12px 14px;
}

.kusage-stat-label {
  margin: 0 0 4px;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.kusage-stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
}

.kusage-heatmap {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 11px;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.kusage-cell {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--k-sidebar-bg);
  border: 1px solid var(--k-border);
}

.kusage-cell.lvl1 { background: #cfe0f2; border-color: #cfe0f2; }
.kusage-cell.lvl2 { background: #9cc0e3; border-color: #9cc0e3; }
.kusage-cell.lvl3 { background: #6fa3d6; border-color: #6fa3d6; }
.kusage-cell.lvl4 { background: #3d76ad; border-color: #3d76ad; }

.kusage-footer {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
}

@media (max-width: 620px) {
  .kusage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kusage-cell { width: 9px; height: 9px; }
}

/* ---------- Message thread ---------- */
.kthread {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 28px clamp(16px, 6vw, 0px);
}

.kthread-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 12px;
}

.kmsg { display: flex; flex-direction: column; gap: 6px; }

.kmsg-user {
  align-self: flex-end;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.kmsg-user .kmsg-bubble {
  background: var(--k-user-bubble);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.96rem;
  white-space: pre-wrap;
}

.kmsg-resend {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  flex: none;
}
.kmsg-resend:hover { color: var(--ink); background: var(--k-sidebar-bg); }

.kmsg-assistant { align-self: stretch; }

.kmsg-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.kmsg-body {
  font-size: 0.98rem;
  line-height: 1.6;
  white-space: normal;
}

.kmsg-connecting {
  color: var(--ink-soft);
  font-style: italic;
  animation: kconnecting-pulse 1.6s ease-in-out infinite;
}

.kcanvas-building {
  display: flex;
  align-items: center;
  gap: 10px;
  font-style: normal;
}

.kcanvas-building::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid color-mix(in srgb, var(--k-skill-accent) 28%, transparent);
  border-top-color: var(--k-skill-accent);
  border-radius: 50%;
  animation: kcanvas-build-spin 0.65s linear infinite !important;
  will-change: transform;
}

@keyframes kcanvas-build-spin {
  to { transform: rotate(360deg); }
}

@keyframes kconnecting-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.kmsg-body p { margin: 0 0 12px; }
.kmsg-body p:last-child { margin-bottom: 0; }
.kmsg-body h1, .kmsg-body h2, .kmsg-body h3, .kmsg-body h4, .kmsg-body h5, .kmsg-body h6 {
  line-height: 1.25;
  margin: 20px 0 9px;
}
.kmsg-body h1:first-child, .kmsg-body h2:first-child, .kmsg-body h3:first-child,
.kmsg-body h4:first-child, .kmsg-body h5:first-child, .kmsg-body h6:first-child { margin-top: 0; }
.kmsg-body ul, .kmsg-body ol { margin: 0 0 12px 1.4rem; padding: 0; }
.kmsg-body li + li { margin-top: 4px; }
.kmsg-body blockquote {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-left: 3px solid var(--k-border);
  color: var(--ink-soft);
  background: var(--paper-warm);
}
.kmsg-body hr { border: 0; border-top: 1px solid var(--k-border); margin: 16px 0; }
.kmarkdown-table-wrap { overflow-x: auto; margin: 0 0 12px; }
.kmsg-body table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.kmsg-body th, .kmsg-body td { padding: 8px 10px; border: 1px solid var(--k-border); text-align: left; vertical-align: top; }
.kmsg-body th { background: var(--paper-warm); font-weight: 600; }
.kmsg-body .katex-display { overflow-x: auto; overflow-y: hidden; margin: 12px 0; }
.kmsg-body pre { white-space: pre; }
.kmsg-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-warm);
  padding: 2px 6px;
  border-radius: 5px;
}
.kmsg-body pre {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  background: var(--ink);
  color: var(--panel-text);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.kmsg-body pre code { background: transparent; padding: 0; }

/* ---------- Thinking disclosure ---------- */
.kthink {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}

.kthink-mark {
  width: 16px;
  height: 16px;
  flex: none;
}

.kthink-mark.spinning { animation: spark-spin 1.1s linear infinite; }

.kthink-label { letter-spacing: 0.04em; }

.kthink-caret {
  transition: transform 0.15s ease;
  font-size: 0.7rem;
}
.kthink.open .kthink-caret { transform: rotate(90deg); }

.kthink-trace {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border-left: 2px solid var(--k-border);
  padding: 10px 14px;
  margin: 0 0 8px;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}
.kthink.open + .kthink-trace { display: block; }

/* ---------- Tool call chip ---------- */
.ktool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border: 1px solid var(--k-border);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 8px;
  width: fit-content;
}

.kcompact-note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  opacity: 0.75;
  margin: 4px 0 14px;
}

/* ---------- Input bar ---------- */
.kinputbar {
  max-width: 720px;
  width: calc(100% - 48px);
  margin: 0 auto 6px;
  background: var(--k-input-bg);
  border: 1px solid var(--k-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px 10px;
  box-shadow: 0 8px 24px rgba(22, 21, 15, 0.05);
}

.kattachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 10px;
}
.kattachment-strip[hidden] { display: none; }
.kattachment-card {
  position: relative;
  width: 86px;
  height: 68px;
  overflow: hidden;
  border: 1px solid var(--k-border);
  border-radius: 9px;
  background: var(--paper-warm);
}
.kattachment-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kattachment-index,
.kattachment-remove {
  position: absolute;
  top: 5px;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font: 0.66rem var(--font-mono);
}
.kattachment-index {
  left: 5px;
  color: var(--paper);
  background: rgba(22, 21, 15, 0.78);
}
.kattachment-remove {
  right: 5px;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--paper);
  background: rgba(22, 21, 15, 0.78);
  cursor: pointer;
}
.kattachment-remove:hover { background: #a84235; }

/* The textarea's own text is made transparent (caret stays visible) and the backdrop
   underneath does the actual visible rendering -- this is what lets a specific substring
   (@ProjectCanvas) get its own color while everything else still looks like a normal input,
   which a plain <textarea> alone can never do (no way to style part of its text). */
.kinput-wrap {
  position: relative;
}

.kinput-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  max-height: 200px;
}

.kinput-backdrop .kmention {
  color: #6fa3d6;
}
.kinput-backdrop .kskill-mention { color: var(--k-skill-accent); font-weight: 650; }

.kinput {
  position: relative;
  z-index: 1;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: transparent;
  caret-color: var(--ink);
  max-height: 200px;
  line-height: 1.5;
}

.kinput::placeholder { color: #9c998e; }

.kinputbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.kcompose-wrap {
  position: relative;
  flex: none;
}

.kcompose-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--k-border);
  border-radius: 8px;
  background: var(--k-sidebar-bg);
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}
.kcompose-toggle:hover,
.kcompose-toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.kcompose-menu {
  position: absolute;
  z-index: 120;
  bottom: calc(100% + 10px);
  left: 0;
  width: 242px;
  max-height: min(58dvh, 460px);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--k-border);
  border-radius: 12px;
  background: var(--k-sidebar-bg);
  box-shadow: 0 16px 42px rgba(22, 21, 15, 0.2);
}
.kcompose-menu[hidden] { display: none; }
.kcompose-item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: 0.86rem var(--font-body);
  text-align: left;
  cursor: pointer;
}
.kcompose-item:hover, .kcompose-item.selected { background: var(--paper); }
.kcompose-item.selected { color: #2f7a4d; font-weight: 700; }
.kcompose-section { margin: 10px 10px 4px; color: var(--ink-soft); font: 0.68rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.kcompose-divider { height: 1px; margin: 8px 10px 6px; background: var(--k-skill-accent); opacity: 0.62; }
.kcompose-search-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kcompose-search-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--k-skill-accent);
  border-radius: 50%;
}
.kcompose-search-icon::before,
.kcompose-search-icon::after { content: ""; position: absolute; opacity: 0.9; }
.kcompose-search-icon::before { inset: 2px 4px; border-left: 1px solid var(--k-skill-accent); border-right: 1px solid var(--k-skill-accent); border-radius: 50%; }
.kcompose-search-icon::after { left: 1px; right: 1px; top: 6px; border-top: 1px solid var(--k-skill-accent); }

.kslash-menu {
  position: absolute;
  z-index: 125;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(420px, calc(100vw - 48px));
  max-height: min(48dvh, 350px);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--k-border);
  border-radius: 12px;
  background: var(--k-sidebar-bg);
  box-shadow: 0 16px 42px rgba(22, 21, 15, 0.2);
}
.kslash-menu[hidden] { display: none; }
.kslash-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: 0.84rem var(--font-body);
  text-align: left;
  cursor: pointer;
}
.kslash-item strong { color: var(--k-skill-accent); font-family: var(--font-mono); }
.kslash-item span { color: var(--ink-soft); font-size: 0.8rem; }
.kslash-item:hover, .kslash-item.selected { background: var(--paper); }

.kbadge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border: 1px solid var(--k-border);
  border-radius: 999px;
  padding: 4px 10px;
}

.ksearch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--k-border);
  border-radius: 999px;
  background: transparent;
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex: none;
}
.ksearch-toggle:hover { background: var(--paper-warm); }
.ksearch-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.kctx {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  flex: 1;
}

.kmodel-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 250px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--k-border);
  border-radius: 8px;
  background: var(--k-sidebar-bg);
  color: var(--ink);
  cursor: pointer;
  font: 0.72rem var(--font-mono);
  white-space: nowrap;
}
.kmodel-wrap { position: relative; flex: none; }
.kmodel-menu {
  position: absolute;
  z-index: 130;
  right: 0;
  bottom: calc(100% + 9px);
  width: min(280px, calc(100vw - 44px));
  padding: 7px;
  border: 1px solid var(--k-border);
  border-radius: 12px;
  background: var(--k-sidebar-bg);
  box-shadow: 0 16px 42px rgba(22, 21, 15, 0.2);
}
.kmodel-menu[hidden] { display: none; }
.kmodel-menu-note { margin: 5px 8px 7px; color: var(--ink-soft); font: 0.67rem var(--font-mono); line-height: 1.35; }
.kmodel-menu-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.kmodel-menu-item:hover, .kmodel-menu-item.active { background: var(--paper); }
.kmodel-menu-item strong { font: 0.8rem var(--font-body); }
.kmodel-menu-item span { color: var(--ink-soft); font: 0.68rem var(--font-mono); }
.kmodel-summary:hover { background: var(--paper-warm); border-color: var(--k-skill-accent); }
.kmodel-summary-name { overflow: hidden; text-overflow: ellipsis; }
.kmodel-summary-effort { color: var(--ink-soft); }
.kmodel-summary-caret { color: var(--k-skill-accent); font-size: 0.9rem; line-height: 0.8; }

.ksend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  flex: none;
}
.ksend:hover:not(:disabled) { transform: translateY(-1px); background: #2f2d24; }
.ksend:disabled { opacity: 0.35; cursor: default; }

.kstop[hidden] { display: none; }

.kstop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #f0d3c8;
  background: #fdf2ee;
  color: #b3432b;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  flex: none;
}
.kstop:hover { transform: translateY(-1px); background: #f7e2da; }

.kfoot-note {
  text-align: center;
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

/* ---------- Project Canvas (artifact sidebar) ---------- */
.kcanvas[hidden] {
  display: none;
}

.kcanvas {
  display: flex;
  flex-direction: column;
  width: 400px;
  flex: none;
  border-left: 1px solid var(--k-border);
  background: var(--k-sidebar-bg);
}

.kcanvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--k-border);
  flex: none;
}

.kcanvas-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
}

.kcanvas-actions {
  display: flex;
  gap: 4px;
}

.kcanvas-btn {
  border: 1px solid var(--k-border);
  background: var(--paper);
  border-radius: 8px;
  min-width: 30px;
  min-height: 30px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.kcanvas-btn:hover { color: var(--ink); background: #ffffff; }

.kcanvas-body {
  flex: 1;
  min-height: 0;
  background: var(--paper);
}

.kcanvas-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #ffffff;
}

.kproject-file-preview {
  padding: 22px;
  color: var(--ink);
}
.kproject-file-preview h2 { margin: 8px 0 4px; font-size: 1.05rem; }
.kproject-file-preview p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.kproject-file-icon { display: block; font-size: 1.6rem; }
.kproject-file-source {
  margin: 18px 0 0;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  background: var(--paper-warm);
  border: 1px solid var(--k-border);
  border-radius: 8px;
  padding: 12px;
}
.kproject-file-pdf { height: 55%; min-height: 280px; }
.kproject-file-error { color: #b3432b !important; }

.kcanvas-toggle[hidden] {
  display: none;
}

.kcanvas-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--k-border);
  background: var(--ink);
  color: var(--paper);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(22, 21, 15, 0.18);
  z-index: 400;
  transition: transform 0.15s ease;
}
.kcanvas-toggle:hover { transform: translateY(-2px); }

.kartifact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfe0f2;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink);
  background: #eaf1fa;
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 8px;
  width: fit-content;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}
.kartifact-chip:hover { background: #dfeaf7; }
.kartifact-chip:focus-visible { outline: 3px solid var(--k-skill-accent); outline-offset: 2px; }

/* ---------- Control Center ---------- */
.kctrl-open {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.kctrl-open:hover { background: #ffffff; color: var(--ink); }

.kctrl-modal[hidden] { display: none; }

.kctrl-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.kctrl-scrim {
  position: absolute;
  inset: 0;
  background: rgba(22, 21, 15, 0.4);
}

.kctrl-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 86vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--k-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(22, 21, 15, 0.28);
}
.ksettings-card { max-width: 680px; }
.ksettings-body { gap: 20px; }
.ksettings-section { display: flex; flex-direction: column; gap: 10px; }
.ksettings-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ksettings-section h2 { margin: 1px 0 0; font: 700 1.05rem var(--font-display); }
.ksettings-kicker { margin: 0; color: var(--ink-soft); font: 0.68rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.ksettings-skill-actions, .ksettings-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ksettings-action, .ksettings-cancel, .ksettings-delete { border: 1px solid var(--k-border); border-radius: 8px; padding: 8px 10px; background: var(--k-sidebar-bg); color: var(--ink); font: 600 .78rem var(--font-body); cursor: pointer; }
.ksettings-action.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ksettings-skill-note, .ksettings-empty { margin: 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.45; }
.ksettings-message { margin: 0; padding: 9px 10px; border-radius: 8px; background: #e8f2eb; color: #28653f; font-size: .82rem; }
.ksettings-message.error { background: #fbeee9; color: #a63a25; }
.ksettings-skill-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--k-border); border-radius: 10px; background: var(--k-sidebar-bg); }
.ksettings-skill-form label { display: flex; flex-direction: column; gap: 5px; color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.ksettings-skill-form input, .ksettings-skill-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--k-border); border-radius: 8px; padding: 9px 10px; background: var(--paper); color: var(--ink); font: .85rem var(--font-body); resize: vertical; }
.ksettings-skill-list { display: flex; flex-direction: column; gap: 8px; }
.ksettings-skill-card { position: relative; border: 1px solid var(--k-border); border-radius: 10px; padding: 11px 86px 11px 12px; background: var(--paper); }
.ksettings-skill-card strong { display: block; font-size: .9rem; }.ksettings-skill-card p { margin: 4px 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.4; }.ksettings-skill-card small { color: var(--ink-soft); font: .7rem var(--font-mono); }
.ksettings-delete { position: absolute; right: 10px; top: 10px; color: #a63a25; background: #fdf2ee; border-color: #f0d3c8; }
.ksettings-server { border-top: 1px solid var(--k-border); }.ksettings-server summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none; }.ksettings-server summary::-webkit-details-marker { display: none; }.ksettings-server summary strong, .ksettings-server summary small { display: block; }.ksettings-server summary small { margin-top: 3px; color: var(--ink-soft); font-size: .76rem; }

.kctrl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--k-border);
  flex: none;
}

.kctrl-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
}

.kctrl-head-actions { display: flex; align-items: center; gap: 8px; }
.kctrl-theme-btn {
  border: 1px solid var(--k-border);
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--k-sidebar-bg);
  color: var(--ink);
  font: 0.76rem var(--font-body);
  cursor: pointer;
}
.kctrl-theme-btn:hover { background: var(--paper-warm); }

.kctrl-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kctrl-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.kctrl-gate-submit {
  width: 100%;
  margin-top: 10px;
}

.kctrl-error {
  margin: 0;
  color: #b3432b;
  font-size: 0.85rem;
}

.kctrl-loading {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.kctrl-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kctrl-stat {
  border: 1px solid var(--k-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--k-sidebar-bg);
}

.kctrl-stat.wide { grid-column: 1 / -1; }

.kctrl-stat-label {
  margin: 0 0 4px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.kctrl-stat-value {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink);
  word-break: break-word;
}

.kctrl-stat-value.mode-low { color: #8a6d1d; }
.kctrl-stat-value.mode-full { color: #2f7a4d; }

.kctrl-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kctrl-model-control {
  border: 1px solid var(--k-border);
  border-radius: 10px;
  padding: 11px;
  background: var(--k-sidebar-bg);
}

.kctrl-model-control > label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kctrl-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.kctrl-model-row select {
  min-width: 0;
  border: 1px solid var(--k-border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 0.78rem var(--font-mono);
  padding: 9px;
}

.kctrl-model-row .kctrl-secondary-btn { width: auto; padding: 9px 11px; white-space: nowrap; }
.kctrl-model-note { margin: 8px 0 0; color: var(--ink-soft); font-size: 0.72rem; line-height: 1.35; }

.kctrl-power-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kctrl-power-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--k-border);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.kctrl-power-btn:hover { transform: translateY(-1px); }
.kctrl-power-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.kctrl-start-btn {
  background: #2f7a4d;
  border-color: #2f7a4d;
  color: #ffffff;
}

.kctrl-stop-btn {
  background: #fdf2ee;
  color: #b3432b;
  border-color: #f0d3c8;
}

.kctrl-confirm[hidden] { display: none; }

.kctrl-confirm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--ink-soft);
  background: #fbeee9;
  border: 1px solid #f0d3c8;
  border-radius: 10px;
  padding: 12px 14px;
}

.kctrl-confirm-row {
  display: flex;
  gap: 8px;
}

.kctrl-confirm-row button {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--k-border);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  color: var(--ink);
}

.kctrl-confirm-row button.kctrl-confirm-yes {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.kctrl-secondary-btn {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid var(--k-border);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.86rem;
  cursor: pointer;
}
.kctrl-secondary-btn:hover { color: var(--ink); background: #ffffff; }
.kctrl-secondary-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.kctrl-log {
  margin: 0;
  min-height: 1.1em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

/* ---------- Brand-sparkle animations ---------- */
.spark-idle {
  animation: spark-breathe 3.2s ease-in-out infinite;
}

.spark-spin {
  animation: spark-spin 6s linear infinite;
}

@keyframes spark-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.75; }
  50% { transform: scale(1.12) rotate(20deg); opacity: 1; }
}

@keyframes spark-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spark-idle, .spark-spin, .kthink-mark.spinning, .kmsg-connecting, .kgreet-text.animate {
    animation: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .kapp { flex-direction: column; }

  .kctrl-power-actions { grid-template-columns: 1fr; }
  .kctrl-model-row { grid-template-columns: 1fr; }
  .kctrl-model-row .kctrl-secondary-btn { width: 100%; }

  .kmobile-bar { display: flex; }
  .kmenu-toggle { display: flex; align-items: center; justify-content: center; }

  /* Sidebar becomes an off-canvas drawer, toggled by the mobile top bar's hamburger button.
     Hidden (display:none) by default on mobile -- fully out of the tab order -- and shown
     via an explicit .open class rather than a transform slide. */
  .ksidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: min(82vw, 300px);
    z-index: 600;
    box-shadow: 0 0 28px rgba(22, 21, 15, 0.14);
  }

  .ksidebar.open {
    display: flex;
  }

  .kbrand { padding: 2px 0 4px; }

  .kmain { min-height: 0; }

  /* Touch-friendlier tap targets and no accidental iOS input zoom (needs >=16px font-size). */
  .kinputbar { width: calc(100% - 24px); }
  .kinput, .kinput-backdrop, .gate-input { font-size: 16px; }
  .ksend, .kstop { width: 40px; height: 40px; }

  /* Keep the mobile composer calm and readable: model/effort gets its own center column,
     token usage moves below it, and the expanded picker becomes a bottom sheet instead of a
     narrow desktop popover forced into the row. */
  .kinputbar-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    grid-template-rows: 40px auto;
    gap: 7px 10px;
  }
  .kcompose-wrap { grid-column: 1; grid-row: 1; }
  .kmodel-wrap { grid-column: 2; grid-row: 1; min-width: 0; }
  .kmodel-summary { width: 100%; max-width: none; justify-content: center; min-height: 40px; }
  .kmodel-summary-name { max-width: min(56vw, 230px); }
  .kctx { grid-column: 1 / span 2; grid-row: 2; align-self: center; padding-left: 1px; }
  .ksend, .kstop { grid-column: 3; grid-row: 1; }
  /* Match the compact effort selector: an anchored, small drop-up rather than a full screen
     sheet. Its right edge follows the model pill, so it stays visually attached to the control. */
  .kmodel-menu {
    position: absolute;
    z-index: 130;
    right: 0;
    bottom: calc(100% + 9px);
    left: auto;
    width: min(250px, calc(100vw - 36px));
    padding: 7px;
    border: 1px solid var(--k-border);
    border-radius: 12px;
    box-shadow: 0 16px 42px rgba(22, 21, 15, 0.2);
  }
  .kmodel-menu::before { display: none; }
  .kmodel-menu-note { margin: 5px 8px 7px; font-size: 0.67rem; }
  .kmodel-menu-item { padding: 9px 10px; }
  .kmodel-menu-item strong { font-size: 0.8rem; }
  .kmodel-menu-item span { font-size: 0.68rem; }
  .ksidebar-tab { padding: 11px 12px; font-size: 0.9rem; }
  .ksidebar-new { padding: 12px 14px; }
  .kproj-add-btn { padding: 10px 16px; }
  .project-file .pf-remove { font-size: 1.15rem; }
  .kthink { padding: 10px 0; }
  .kmsg-user { max-width: 90%; }
  .kthread { padding: 20px 16px; }
  .kthread-inner { gap: 18px; }
  .suggest-card { padding: 14px 16px; }
  .kgreeting { padding: 20px 16px; gap: 14px; }

  /* Canvas becomes a full-screen overlay on mobile instead of squeezing a third column into
     an already-narrow viewport. */
  .kcanvas {
    position: fixed;
    inset: 0;
    width: auto;
    z-index: 700;
  }
  .kcanvas-toggle { right: 16px; bottom: 16px; }

  /* Control Center becomes a full-screen sheet on mobile, same reasoning as the Canvas above. */
  .kctrl-modal { padding: 0; }
  .kctrl-card {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
  }
}

@media (max-width: 420px) {
  .kbadge { display: none; }
  .kctx { font-size: 0.64rem; }
  .kmodel-summary { gap: 4px; padding: 5px 6px; }
  .kmodel-summary-name { max-width: 49vw; font-size: 0.68rem; }
  .kmodel-summary-effort { font-size: 0.68rem; }
  .ksearch-label { display: none; }
  .ksearch-toggle { padding: 5px 9px; }
  .kctrl-status-grid { grid-template-columns: 1fr; }
}

/* ---------- Deliberate dark theme (deep charcoal, not pure black) ---------- */
body.kestrel-dark {
  --paper: #1a1c1b;
  --paper-warm: #222522;
  --ink: #f1eee5;
  --ink-soft: #b8b7ae;
  --line: #424640;
  --k-sidebar-bg: #202320;
  --k-main-bg: #181a19;
  --k-user-bubble: #2a2d29;
  --k-input-bg: #242724;
  --k-border: #424640;
  color-scheme: dark;
}
body.kestrel-dark .kctrl-stop-btn { background: #402725; color: #ffc6b9; border-color: #754840; }
body.kestrel-dark .kctrl-confirm { background: #352420; border-color: #70463d; }
body.kestrel-dark .kctrl-confirm-row button { background: #292c29; color: var(--ink); }
body.kestrel-dark .kctrl-secondary-btn:hover { background: #2a2d29; }
body.kestrel-dark { --k-skill-accent: #83bfff; }
body.kestrel-dark .kcompose-menu, body.kestrel-dark .kslash-menu { box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42); }
body.kestrel-dark .kcompose-item:hover, body.kestrel-dark .kcompose-item.selected { background: #2a2d29; }
body.kestrel-dark .kslash-item:hover, body.kestrel-dark .kslash-item.selected { background: #2a2d29; }
body.kestrel-dark .kinput::placeholder { color: #9fa29c; }
