.coach-callout {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-block: 1.75rem 0;
  padding: 1.25rem;
  border: 1px solid #d6cceb;
  border-radius: 20px;
  background: #eee8fb;
}
.coach-callout h2 { font-size: clamp(1.2rem, 3vw, 1.65rem); }
.coach-callout p { margin-block-start: .35rem; line-height: 1.45; }
.coach-callout .button { margin-inline-start: auto; white-space: nowrap; }
.coach-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 15px;
  background: #342465;
  color: #fff;
}
.coach-icon svg { inline-size: 70%; }
.coach { max-inline-size: 1050px; margin-inline: auto; }
.coach-hero {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2vw, 1.5rem);
  border: 1px solid #ebc56e;
  border-radius: 24px;
  padding: clamp(1.1rem, 4vw, 2.3rem);
  background: linear-gradient(110deg,#fff2c4 0%,#ffe098 100%);
}
.coach-hero .coach-icon {
  inline-size: clamp(3rem, 7vw, 4.3rem);
  block-size: clamp(3rem, 7vw, 4.3rem);
}
.coach-hero h1 { font-size: clamp(1.75rem, 4vw, 3.2rem); line-height: 1.13; }
.coach-hero h1 span { color: #7350a9; }
.coach-hero p { margin-block-start: .6rem; line-height: 1.55; }
.coach-stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .65rem;
  margin-block: .9rem 1.15rem;
}
.coach-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: .42rem;
  min-inline-size: 0;
  padding: .85rem 1rem;
  border: 1px solid #e0d8ed;
  border-radius: 15px;
  background: #f5f0fc;
}
.coach-stats dt { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.coach-stats dd { margin: 0; font-size: 1.42rem; font-weight: 800; }
.coach-layout {
  display: grid;
  grid-template-columns: minmax(0,2.1fr) minmax(0,1fr);
  gap: 1rem;
  align-items: start;
}
.coach-chat {
  min-inline-size: 0;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 21px;
}
.coach-chat header { padding: 1rem 1.15rem; border-block-end: 1px solid var(--line); }
.coach h2 { font-size: 1.18rem; }
.coach-log {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-block-size: 10rem;
  max-block-size: min(430px, 55svh);
  overflow: auto;
  padding: .85rem 1rem;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.coach-message {
  align-self: flex-start;
  inline-size: fit-content;
  max-inline-size: 95%;
  padding: .8rem;
  border: 1px solid #e7def6;
  border-radius: 15px 4px 15px 15px;
  background: #f5f0fc;
  overflow-wrap: anywhere;
}
.coach-message p, .coach-next p { line-height: 1.6; }
.coach-message-question {
  align-self: flex-end;
  border-color: #f1dfb0;
  border-radius: 4px 15px 15px 15px;
  background: #fff2cc;
}
.coach-message-author { display: flex; gap: .35rem; align-items: center; margin-block-end: .22rem; }
.coach-message-author svg { inline-size: 1.35rem; color: #3a2a9c; }
.coach-message-question strong, .coach-message-author strong { font-size: .84rem; }
.coach-compose { display: grid; gap: .8rem; padding: .85rem 1rem 1rem; border-block-start: 1px solid var(--line); }
.coach-prompts, .coach-links { display: flex; gap: .4rem; flex-wrap: wrap; align-items: start; }
.coach-links { margin-block-start: .65rem; }
.coach-prompts button {
  min-block-size: 40px;
  border-radius: 99rem;
  border: 1px solid #d5cce8;
  padding: .45rem .75rem;
  background: #fff;
  color: #362967;
  font-size: .84rem;
}
.coach-prompts button:hover { background: #eee8fb; }
.coach-input-row { display: flex; gap: .55rem; margin-block-start: .35rem; }
#coach-form label { font-size: .88rem; font-weight: 700; }
#coach-input {
  flex: 1;
  min-inline-size: 0;
  inline-size: 100%;
  border: 1px solid #bfb4d6;
  border-radius: 12px;
  padding: .7rem;
  background: #fff;
  color: var(--ink);
}
#coach-input:focus-visible { outline: 2px solid var(--outline); outline-offset: 2px; }
.coach-next {
  padding: 1rem 1.1rem;
  background: #edf5ed;
  border: 1px solid #cddfcf;
  border-radius: 20px;
}
.coach-next p { margin-block-start: .5rem; }
.coach-note { margin: .7rem .5rem; font-size: .84rem; color: var(--muted); line-height: 1.5; }
.coach-words { list-style: none; margin: .5rem 0 0; padding: 0; }
.coach-words li { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding-block: .25rem; }
.coach-words bdi { font-weight: 700; }
.coach-links .button, .coach-input-row .button { min-block-size: 44px; }
@media (max-width: 700px) {
  .coach-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 475px) {
  .coach-callout { flex-wrap: wrap; }
  .coach-callout div:not(.coach-icon) { flex: 1; }
  .coach-callout .button { margin-inline-start: 0; }
  .coach-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .coach-stats div { padding: .65rem .8rem; }
  .coach-chat header, .coach-compose, .coach-log { padding-inline: .7rem; }
  .coach-message { max-inline-size: 100%; }
}
