.kennedi-launcher {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  border: 1px solid #c39a52; border-radius: 100px; padding: .72rem 1.2rem;
  background: #153b26; color: #fff; font: 700 1rem system-ui; box-shadow: 0 4px 20px #0a241c38; cursor: pointer;
}
.kennedi {
  position: fixed; inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  width: min(390px, calc(100vw - 32px)); height: min(660px, calc(100dvh - 32px));
  max-width: none; max-height: none; margin: 0; border: 1px solid #b5c0af;
  border-radius: 18px; padding: 0; background: #f8f6ef; color: #17321f;
  box-shadow: 0 12px 48px #081b1240; overflow: hidden;
}
.kennedi[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.kennedi::backdrop { background: #0a241c45; }
.kennedi-head {
  display: flex; align-items: center; justify-content: space-between; gap: .7rem;
  padding: .85rem 1rem; background: #153b26; color: #fff;
}
.kennedi-head h2 { margin: 0; color: #fff; font-size: 1.28rem; line-height: 1.2; }
.kennedi-head p { margin: .22rem 0 0; color: #f2dfb7; font-size: .8rem; }
.kennedi-close {
  border: 1px solid #d4c8a7; border-radius: 50%; width: 44px; height: 44px;
  background: transparent; color: #fff; font-size: 1.45rem; cursor: pointer;
}
.kennedi-log { overflow: auto; padding: .85rem; overscroll-behavior: contain; }
.kennedi-message { margin: 0 0 .65rem; padding: .65rem .75rem; width: fit-content; max-width: 93%; border-radius: 12px; font-size: .93rem; line-height: 1.45; overflow-wrap: anywhere; }
.kennedi-message.guide { background: #e9ede4; }
.kennedi-message.visitor { background: #17442e; color: #fff; margin-left: auto; }
.kennedi-links, .kennedi-topics { display: flex; flex-wrap: wrap; gap: .38rem; }
.kennedi-links { margin: 0 0 .65rem; }
.kennedi-links a, .kennedi-topics button {
  display: inline-flex; align-items: center; min-height: 36px; padding: .32rem .66rem;
  border-radius: 9px; font: 650 .8rem system-ui;
}
.kennedi-links a { background: #f3e5be; color: #253918; text-decoration: underline; }
.kennedi-topics { padding: .55rem .75rem; border-top: 1px solid #d8ded3; }
.kennedi-topics button { color: #153b26; background: #fff; border: 1px solid #a5b6a7; cursor: pointer; }
.kennedi-form { margin: 0; padding: .6rem .75rem; background: #fff; border-top: 1px solid #d8ded3; }
.kennedi-label { display: block; font-size: .78rem; font-weight: 700; margin-bottom: .25rem; }
.kennedi-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .42rem; }
.kennedi-entry input { min-width: 0; min-height: 44px; padding: .46rem; border: 1px solid #9aa997; border-radius: 8px; font: 1rem system-ui; }
.kennedi-entry button { border: 0; border-radius: 8px; padding: 0 .8rem; color: #fff; background: #153b26; font: 700 .88rem system-ui; cursor: pointer; }
.kennedi-form p { margin: .45rem 0 0; color: #536457; font-size: .72rem; line-height: 1.35; }
.kennedi :focus-visible, .kennedi-launcher:focus-visible { outline: 2px solid #9b6b20; outline-offset: 2px; }
@media (max-width: 520px) {
  .kennedi { inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px; width: auto; height: min(620px, calc(100dvh - 16px)); }
}

.kennedi-launcher {
  display: inline-flex; align-items: center; min-height: 48px;
  bottom: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: 16px; right: calc(16px + env(safe-area-inset-right, 0px));
  color: #fff; text-decoration: none;
}
.kennedi-launcher:hover { color: #fff; text-decoration: underline; }
.kennedi-hero-link { align-self: center; font-weight: 650; color: #153b26; text-decoration: underline; }
.kennedi-page { max-width: 720px; }
.kennedi.kennedi-inline {
  position: static; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: 100%; height: 560px; max-height: none;
}
@media (max-width: 520px) {
  .kennedi:not(.kennedi-inline) {
    height: min(620px, calc(100vh - 16px));
    height: min(620px, calc(100dvh - 16px - env(safe-area-inset-bottom, 0px)));
  }
  .kennedi-hero-link { display: inline-flex; align-items: center; min-height: 44px; }
}

.kennedi-controls { display: flex; align-items: center; gap: .4rem; }
.kennedi-reset {
  min-height: 44px; padding: 0 .6rem; border: 1px solid #d4c8a7; border-radius: 9px;
  background: transparent; color: #fff; font: 650 .75rem system-ui; white-space: nowrap; cursor: pointer;
}
.kennedi-topics { max-height: 110px; overflow: auto; }
