/* Every layout selector is scoped to Coach. */
#coach .message-content{min-width:0;max-width:100%}
#coach .message.coach .message-content{white-space:normal;line-height:1.75}
#coach .message-content>:first-child{margin-top:0}
#coach .message-content>:last-child{margin-bottom:0}
#coach .message-content p{margin:0 0 1em}
#coach .message-content h1,#coach .message-content h2,#coach .message-content h3{line-height:1.35;margin:1.2em 0 .55em;color:var(--ink);font-family:var(--ff-body)}
#coach .message-content h1{font-size:1.5em}#coach .message-content h2{font-size:1.3em}#coach .message-content h3{font-size:1.1em}
#coach .message-content ul,#coach .message-content ol{padding-left:1.65em;margin:.7em 0 1em;list-style-position:outside}
#coach .message-content ul{list-style-type:disc}#coach .message-content ol{list-style-type:decimal}
#coach .message-content li{padding-left:.2em;margin:.3em 0}
#coach .message-content a{color:var(--g);text-decoration:underline;text-underline-offset:3px}
#coach .message-content code{font: .9em/1.6 ui-monospace,monospace;background:rgba(150,170,195,.12);padding:2px 5px;border-radius:5px;overflow-wrap:anywhere}
#coach .message-content pre{max-width:100%;overflow-x:auto;white-space:pre;padding:14px;border-radius:12px;background:var(--navy-3);margin:1em 0}
#coach .message-content pre code{padding:0;background:none;white-space:pre;overflow-wrap:normal}
#coach .message-content hr{border:0;border-top:1px solid var(--line2);margin:1.4em 0}
#coach .chat-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;margin:1em 0;border:1px solid var(--line2);border-radius:10px}
#coach .chat-table-scroll table{width:100%;border-collapse:collapse;font:inherit;min-width:380px}
#coach .chat-table-scroll th,#coach .chat-table-scroll td{padding:9px 12px;border-bottom:1px solid var(--line2);text-align:left;vertical-align:top;min-width:100px}
#coach .chat-table-scroll th{background:var(--navy-3);font-weight:650}
#coach .reply-actions{display:flex;gap:2px;align-items:center;margin-top:8px;opacity:0;pointer-events:none;transition:opacity .12s ease}
#coach .message:hover .reply-actions,#coach .message:focus-within .reply-actions,#coach .message.latest-coach .reply-actions,#coach .message.latest-user .reply-actions,#coach .message.actions-open .reply-actions{opacity:1;pointer-events:auto}
#coach .reply-action{display:inline-flex;align-items:center;justify-content:center;width:32px;min-width:32px!important;height:32px;min-height:32px!important;padding:7px;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer}
#coach .reply-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#coach .reply-action:hover,#coach .reply-action[aria-pressed=true]{background:rgba(150,170,195,.12);color:var(--ink)}
#coach .reply-action:disabled{cursor:default;opacity:.65}
#coach .message.user .reply-actions{justify-content:flex-end}
#coach .message.user .reply-action{color:inherit}
#coach .chat-compose{position:relative}
#coach .coach-jump{position:absolute;top:-46px;left:calc(50% - 18px);z-index:3;width:36px;height:36px;min-width:36px!important;min-height:36px!important;border:1px solid var(--line2);border-radius:50%;background:var(--navy-3);color:var(--ink);font:22px/1 system-ui;cursor:pointer;box-shadow:0 3px 10px #0003}
#coach .coach-jump[hidden],#coach .chat-attach-menu[hidden]{display:none!important}
#coach .coach-empty-heading{font:600 clamp(22px,3vw,30px)/1.3 var(--ff-body);text-align:center;letter-spacing:-.5px;margin:0 0 24px;order:0}
#coach.coach-has-user .coach-empty-heading,#coach .match-id-open .coach-empty-heading{display:none}
#coach:not(.coach-has-user) .messages{display:none}
#coach:not(.coach-has-user) .chat-compose{margin-top:auto;margin-bottom:auto;max-height:calc(100% - 76px)}
#coach .coach-compose-extras{order:1}
#coach .chat-input{order:2;position:relative}
#coach .coach-empty-state{order:3;padding-top:4px}
#coach .coach-challenge-slot{min-height:16px;flex-shrink:0}
#coach #chatAttachBtn{font:300 27px/1 system-ui}
#coach .chat-attach-menu{position:absolute;bottom:calc(100% + 8px);left:0;z-index:20;width:min(300px,calc(100vw - 32px));padding:6px;border:1px solid var(--line2);border-radius:14px;background:var(--navy-2);box-shadow:0 8px 30px #0005}
#coach .chat-attach-menu button{display:block;width:100%;min-height:44px;padding:10px 12px;text-align:left;font:500 13px/1.4 var(--ff-body);color:var(--ink);background:none;border:0;border-radius:8px;cursor:pointer}
#coach .chat-attach-menu button:hover,#coach .chat-attach-menu button:focus-visible{background:rgba(150,170,195,.12)}
#coach button:focus-visible,#coach .chat-table-scroll:focus-visible{outline:2px solid var(--g);outline-offset:3px}
body.coach-keyboard #coach .coach-empty-heading{display:none}
body.is-phone #coach:not(.coach-has-user) .chat-compose{margin-top:auto;margin-bottom:calc(8px + env(safe-area-inset-bottom,0px));max-height:calc(100% - 64px)}
body.is-phone #coach .coach-empty-heading{font-size:23px;margin-bottom:16px}
body.is-phone #coach .coach-empty-state{order:1;max-height:38dvh;overflow-y:auto}
body.is-phone #coach .coach-compose-extras{order:2}
body.is-phone #coach .chat-input{order:3}
body.is-phone #coach .reply-action{width:44px;height:44px;min-height:44px!important;min-width:44px!important}
body.is-phone #coach .coach-jump{width:44px;height:44px;min-height:44px!important;min-width:44px!important;left:calc(50% - 22px);top:-52px}
@media(hover:none){#coach .message:not(.latest-coach):not(.latest-user):not(.actions-open):not(:focus-within) .reply-actions{opacity:0;pointer-events:none}}
@media(prefers-reduced-motion:reduce){#coach .reply-actions{transition:none}}
