/* "Ask Coach" — first-party scripted assistant. No external AI, no third-party chat service. */
.ac-launcher {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #041E42;
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: .95rem;
  border: 0;
  cursor: pointer;
  padding: 13px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  -webkit-tap-highlight-color: transparent;
}
.ac-launcher:hover { background: #021233; }
.ac-panel {
  position: fixed;
  left: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  width: min(340px, calc(100vw - 32px));
  max-height: min(62vh, 480px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #122129;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  overflow: hidden;
  font-family: "DM Sans", system-ui, sans-serif;
}
.ac-panel[hidden] { display: none; }
.ac-head {
  background: #0a1411;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px solid #A89968;
}
.ac-head strong { font-size: 1rem; }
.ac-head span { font-size: .78rem; opacity: .65; flex: 1; }
.ac-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.ac-body { padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: inherit; }
.ac-chat { flex: 1; overflow-y: auto; padding: 14px 14px 4px; display: flex; flex-direction: column; min-height: 120px; }
.ac-msg { max-width: 88%; margin: 0 0 10px; padding: 10px 13px; font-size: .92rem; line-height: 1.5; }
.ac-msg p { margin: 0 0 8px; }
.ac-msg p:last-child { margin-bottom: 0; }
.ac-msg ul { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; }
.ac-msg li { margin-bottom: 5px; }
.ac-msg-coach { align-self: flex-start; background: #f7faf8; border: 1px solid #c9d8d3; color: #122129; border-radius: 14px 14px 14px 4px; }
.ac-msg-user { align-self: flex-end; background: #041E42; color: #fff; border-radius: 14px 14px 4px 14px; }
.ac-typing { opacity: .7; font-style: italic; }
.ac-opts { display: flex; flex-direction: column; gap: 0; margin: 2px 0 12px; }
.ac-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #c9d8d3; background: #f7faf8; flex-shrink: 0; }
.ac-input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 2px solid #c9d8d3; font-size: .9rem; background: #fff; color: #122129; }
.ac-input:focus { outline: none; border-color: #041E42; }
.ac-send { padding: 10px 18px; border-radius: 999px; border: 0; background: #041E42; color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.ac-send:hover { background: #021233; }
.ac-opt {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 8px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 2px solid #c9d8d3;
  background: #f7faf8;
  color: #122129;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.ac-opt:hover { border-color: #041E42; background: #eaf4f1; }
.ac-opt-primary { background: #A89968; border-color: #A89968; color: #fff; }
.ac-opt-primary:hover { background: #b83f18; border-color: #b83f18; color: #fff; }
@media (max-width: 480px) {
  .ac-launcher { left: 12px; padding: 11px 16px; font-size: .88rem; }
  .ac-panel { left: 12px; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}
