body.coach-open { overflow: hidden; }
.coach-backdrop[hidden] { display: none !important; }
.coach-backdrop { position: fixed; inset: 0; z-index: 99999; background: rgba(7, 28, 48, .48); backdrop-filter: blur(3px); display: flex; justify-content: flex-start; direction: rtl; }
.coach-panel { width: min(680px, 100vw); height: 100dvh; background: #f7fbfd; color: #123047; box-shadow: 16px 0 50px rgba(3, 31, 54, .2); display: flex; flex-direction: column; overflow: hidden; }
.coach-header { background: linear-gradient(135deg, #075985, #0f766e); color: #fff; padding: 20px; display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.coach-heading { display: flex; gap: 13px; align-items: flex-start; }
.coach-avatar { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; background: rgba(255,255,255,.16); font-size: 26px; }
.coach-heading h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.coach-heading p { margin: 0; max-width: 520px; color: rgba(255,255,255,.9); line-height: 1.7; font-size: 14px; }
.coach-close { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; cursor: pointer; }
.coach-scroll { flex: 1; overflow-y: auto; padding: 18px; overscroll-behavior: contain; }
.coach-welcome { padding: 17px; border: 1px solid #d8e8ef; border-radius: 18px; background: #fff; }
.coach-welcome > span { color: #0f766e; font-weight: 800; font-size: 13px; }
.coach-welcome h3 { margin: 7px 0 5px; font-size: 21px; }
.coach-welcome p { margin: 0; line-height: 1.75; color: #526b7c; font-size: 14px; }
.coach-path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.coach-path { text-align: right; border: 1px solid #d7e4ea; border-radius: 16px; background: #fff; padding: 13px; display: flex; gap: 11px; align-items: flex-start; cursor: pointer; color: #123047; transition: .18s ease; }
.coach-path:last-child { grid-column: 1 / -1; }
.coach-path:hover, .coach-path.active { border-color: #0f766e; box-shadow: 0 7px 20px rgba(15,118,110,.1); transform: translateY(-1px); }
.coach-path i { width: 38px; height: 38px; display: grid; place-items: center; background: #eaf7f5; border-radius: 12px; font-style: normal; font-size: 21px; flex: 0 0 auto; }
.coach-path span { display: flex; flex-direction: column; gap: 4px; }
.coach-path b { font-size: 15px; }
.coach-path small { color: #5d7382; line-height: 1.55; font-size: 12px; }
.coach-tools { display: grid; gap: 12px; margin: 14px 0; }
.coach-tool-card { border-radius: 18px; padding: 16px; border: 1px solid #d6e5eb; background: #fff; }
.coach-tool-card h3 { margin: 0 0 6px; font-size: 18px; }
.coach-tool-card h4 { margin: 16px 0 8px; font-size: 15px; }
.coach-tool-card p { margin: 0 0 12px; color: #526b7c; line-height: 1.65; font-size: 13px; }
.firmness-card { border-color: #f0c989; background: linear-gradient(180deg, #fffdf8, #fff); }
.firmness-card > strong { display: block; padding: 11px 13px; border-radius: 12px; background: #fff3d9; color: #8a4c05; font-size: 13px; line-height: 1.6; }
.coach-principle { color: #304c5e !important; font-weight: 700; }
.firmness-details, .coach-knowledge { margin-top: 12px; border: 1px solid #d7e4ea; border-radius: 14px; background: #fff; overflow: hidden; }
.firmness-details summary, .coach-knowledge summary { cursor: pointer; font-weight: 800; padding: 12px 14px; color: #164e63; }
.firmness-skill-grid { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 12px 13px; }
.firmness-skill-grid span { background: #f1f7f9; border: 1px solid #dce9ee; border-radius: 999px; padding: 6px 9px; font-size: 11px; color: #425e70; }
.coach-chip-grid, .coach-scenario-grid, .coach-knowledge-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.coach-chip, .coach-scenario { border: 1px solid #cddfe6; background: #f9fcfd; color: #183c52; border-radius: 999px; padding: 8px 11px; font-family: inherit; font-size: 12px; line-height: 1.4; cursor: pointer; }
.coach-chip:hover, .coach-scenario:hover { border-color: #0f766e; background: #eaf7f5; }
.coach-scenario { border-radius: 11px; text-align: right; background: #fffaf0; border-color: #eed8ad; }
.coach-knowledge { margin: 12px 0; }
.coach-knowledge-buttons { padding: 0 12px 13px; }
.coach-messages { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 18px; }
.coach-message { max-width: 88%; display: flex; gap: 8px; align-items: flex-start; }
.coach-message.user { align-self: flex-start; }
.coach-message.assistant { align-self: flex-end; }
.coach-message p { margin: 0; white-space: pre-line; line-height: 1.75; font-size: 14px; padding: 12px 14px; border-radius: 16px; }
.coach-message.user p { background: #0f766e; color: #fff; border-bottom-right-radius: 5px; }
.coach-message.assistant p { background: #fff; color: #203f52; border: 1px solid #dbe8ed; border-bottom-left-radius: 5px; }
.coach-message-avatar { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 9px; background: #eaf7f5; display: grid; place-items: center; font-size: 14px; }
.coach-message.thinking { opacity: .72; }
.coach-composer { flex: 0 0 auto; background: #fff; border-top: 1px solid #d9e6eb; padding: 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: end; }
.coach-composer textarea { min-height: 48px; max-height: 120px; resize: vertical; border: 1px solid #cddde4; border-radius: 13px; padding: 11px 12px; font: inherit; font-size: 14px; color: #16394e; background: #fff; outline: none; }
.coach-composer textarea:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,.1); }
.coach-voice, .coach-send { min-height: 46px; border: 0; border-radius: 12px; font-family: inherit; cursor: pointer; }
.coach-voice { width: 46px; background: #eef6f8; font-size: 19px; }
.coach-voice.listening { background: #fee2e2; animation: coachPulse 1s infinite; }
.coach-send { background: #0f766e; color: #fff; font-weight: 800; padding: 0 17px; }
@keyframes coachPulse { 50% { transform: scale(.94); opacity: .65; } }
@media (max-width: 620px) {
  .coach-panel { width: 100vw; }
  .coach-header { padding: 15px; }
  .coach-heading h2 { font-size: 19px; }
  .coach-heading p { font-size: 12px; line-height: 1.55; }
  .coach-avatar { width: 41px; height: 41px; font-size: 22px; }
  .coach-scroll { padding: 12px; }
  .coach-path-grid { grid-template-columns: 1fr; }
  .coach-path:last-child { grid-column: auto; }
  .coach-path { padding: 11px; }
  .coach-composer { padding: 9px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .coach-send { padding: 0 12px; }
}
