/* ─── Keith Panel — bottom-sheet assistant overlay ───────────────────────── */

.keith-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(20, 15, 10, 0);
  display: flex;
  align-items: flex-end;
  transition: background 0.3s ease;
}

.keith-panel-backdrop.open {
  background: rgba(20, 15, 10, 0.45);
}

/* ─── Panel sheet ─────────────────────────────────────────────────────────── */
.keith-panel {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  height: 72%;
  background: var(--kith-bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.keith-panel-backdrop.open .keith-panel {
  transform: translateY(0);
}

/* ─── Ambient glow at top ─────────────────────────────────────────────────── */
.keith-panel-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 220px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(181, 131, 141, 0.22) 0%,
    rgba(209, 160, 38, 0.12) 40%,
    transparent 70%
  );
  filter: blur(6px);
}

/* ─── Drag handle ─────────────────────────────────────────────────────────── */
.keith-panel-handle-row {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
  position: relative;
  z-index: 2;
}

.keith-panel-handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--kith-border);
}

/* ─── Greeting ────────────────────────────────────────────────────────────── */
.keith-panel-greeting {
  padding: 28px 24px 16px;
  position: relative;
  z-index: 2;
}

.keith-greeting-hi {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--kith-text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.keith-greeting-sub {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--kith-text-muted);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ─── Scrollable body ─────────────────────────────────────────────────────── */
.keith-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 16px;
}

.keith-prompts-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--kith-text-dim);
  font-weight: 600;
  padding: 0 4px 10px;
}

/* ─── Prompts card ────────────────────────────────────────────────────────── */
.keith-prompts-card {
  background: var(--kith-surface);
  border-radius: 16px;
  box-shadow: var(--kith-shadow);
  overflow: hidden;
}

.keith-prompt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--kith-border);
  transition: background 0.12s;
  gap: 12px;
}

.keith-prompt-row:last-child {
  border-bottom: none;
}

.keith-prompt-row:hover {
  background: var(--kith-surface-2);
}

.keith-prompt-text {
  font-size: 0.95rem;
  color: var(--kith-text);
  letter-spacing: -0.005em;
  flex: 1;
}

.keith-prompt-arrow {
  font-size: 1.2rem;
  color: var(--kith-text-dim);
  flex-shrink: 0;
  line-height: 1;
}

/* ─── Persistent input bar ────────────────────────────────────────────────── */
.keith-panel-input-bar {
  padding: 12px 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  border-top: 1px solid var(--kith-border);
  background: var(--kith-bg);
  position: relative;
  z-index: 2;
}

.keith-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--kith-surface);
  border-radius: 999px;
  padding: 10px 8px 10px 18px;
  box-shadow: var(--kith-shadow-soft);
}

.keith-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--kith-text);
  min-width: 0;
}

.keith-input::placeholder {
  color: var(--kith-text-dim);
}

.keith-mic-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2D6A4F 0%, #295E2C 100%);
  color: var(--kith-on-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 4px 10px rgba(41,94,44,0.4),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.keith-mic-btn:hover {
  box-shadow:
    0 6px 20px rgba(41, 94, 44, 0.5),
    0 2px 6px rgba(41, 94, 44, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
