/* The live negotiation chat: log, bubbles, composer.
 * A later pass over the base layer — order matters, keep it loaded after the files above. */
@media(max-width:1200px){.negotiation-table{grid-template-columns:1fr 1fr}.table-center{grid-column:1/-1;grid-row:2;flex-direction:row;align-items:center;flex-wrap:wrap}.character-head,.avatar.character-head{width:74px;height:74px}.participant.them{justify-content:flex-end}.table-center small{display:none}}
@media(max-width:760px){.negotiation-table{padding:22px 17px;gap:21px 14px}.participant{flex-direction:column;align-items:flex-start;gap:10px}.participant.them{align-items:flex-end;text-align:right}.participant h2{font-size:1.04rem}.participant p{font-size:.77rem}.participant .eyebrow{font-size:.61rem}.character-head,.avatar.character-head{width:70px;height:70px}.deal-metrics{grid-template-columns:1fr 1fr;gap:20px 10px}.deal-metrics>div{padding-left:0;border:0}.deal-metrics b{font-size:1.8rem}.deal-metrics small{font-size:.73rem}.table-center b{font-size:.8rem}.option-value{font-size:.87rem;overflow-wrap:anywhere}.tour-bubble{padding:20px}.tour-bubble p{font-size:.88rem}}
.chat-log{max-height:440px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:6px 4px;margin:14px 0;border:1px solid var(--line);border-radius:14px;background:#fafcff}
.chat-row{display:flex;gap:9px;align-items:flex-end}
.chat-row.me{flex-direction:row-reverse}
.chat-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background-size:500% 200%;background-color:#dde6f6;display:inline-block}
.chat-bubble{max-width:76%;padding:12px 15px;border-radius:14px;font-size:.88rem;line-height:1.55}
.chat-bubble.them{background:#eef2f8;color:var(--ink);border-bottom-left-radius:4px}
.chat-bubble.me{background:var(--ink);color:#fff;border-bottom-right-radius:4px}
.chat-bubble.typing{display:flex;gap:4px;align-items:center;padding:14px 16px}
.chat-bubble.typing i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#8b98ad;font-style:normal;animation:dl-blink 1.2s infinite}
.chat-bubble.typing i:nth-child(2){animation-delay:.2s}
.chat-bubble.typing i:nth-child(3){animation-delay:.4s}
@keyframes dl-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
@media(max-width:760px){.chat-bubble{max-width:88%}.chat-log{max-height:340px}}
.chat-log{min-height:300px;max-height:520px;padding:22px;background:linear-gradient(180deg,#f5f8fc,#fff);scroll-behavior:smooth}
.chat-bubble{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.94rem;line-height:1.7;max-width:82%;box-shadow:0 2px 5px #14213a08}
.chat-row{align-items:flex-start;margin:5px 0}
.chat-bubble .speaker{display:block;font-size:.69rem;letter-spacing:.05em;margin-bottom:5px;opacity:.7;font-weight:700}
.live-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding-bottom:16px}
.live-toolbar h2{font-size:1.1rem;margin:0}
.connection-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#719934;margin-right:7px}
.live-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}
.live-numbers>div{padding:16px;background:#eaf0f8;border-radius:12px}
.live-numbers strong{display:block;font-size:1.7rem;margin-top:5px;font-variant-numeric:tabular-nums}
.live-numbers small{font-size:.72rem}
#live-input{min-height:88px!important;max-height:220px}
.composer-help{font-size:.73rem;color:var(--muted);margin:10px 0 0}
.transcript-review{margin-top:20px}
.transcript-review summary{padding:16px 0}
.live-summary{margin-top:20px}
@media(min-width:1101px){.workspace:has(#chat-log){grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr)}}
@media(max-width:760px){.chat-log{padding:12px;min-height:260px;max-height:430px}.live-numbers>div{padding:12px}.live-numbers strong{font-size:1.3rem}.live-toolbar{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.chat-log{scroll-behavior:auto}.chat-bubble.typing i{animation:none}}

/* Keep the live room usable without a setup-sized empty transcript. */
.content:has(.live-chat-workspace){padding-top:24px;padding-bottom:16px}
.content:has(.live-chat-workspace) footer{display:none}
.page-head.live-chat-page-head{margin-bottom:20px;padding-bottom:0}
.live-chat-page-head .character-head{width:64px;height:64px}
.live-chat-page-head h1{font-size:clamp(2rem,3vw,2.8rem)}
.live-chat-workspace{gap:16px}
.live-chat-main{display:flex;flex-direction:column;gap:14px;min-width:0}
.chat-log.live-chat-log{margin:0;min-height:220px;max-height:390px;padding:18px}
.chat-log.live-chat-log.is-empty{min-height:112px}
.note.live-chat-error{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:13px 16px;background:#fff8f0}
.live-chat-error b{font-size:.8rem;line-height:1.5}
.live-chat-error .btn{flex:0 0 auto;min-height:38px;padding:8px 14px}
.card.live-chat-composer{padding:18px 20px}
.live-chat-composer>.eyebrow{margin-bottom:10px}
.live-chat-composer .ask-examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:10px}
.live-chat-composer .ask-examples button{font-size:.7rem;padding:6px 8px}
.live-chat-composer #live-input{min-height:68px!important;max-height:160px}
.live-chat-composer .composer-help{margin:6px 0 0}
.live-chat-composer .live-toolbar{padding:8px 0 0;border:0;gap:8px}
.live-chat-composer .live-toolbar .btn{min-height:38px;padding:8px 12px}
.live-chat-aside{gap:14px!important}
.live-chat-aside>.card{padding:20px}
.live-chat-aside .eyebrow{margin-bottom:10px}
.live-brief-card .brief{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;margin-top:4px}
.live-brief-card .brief li{min-width:0;padding:9px 0}
.live-brief-card .brief li:last-child{grid-column:1/-1}
.live-chat-aside .ask-lab{margin-top:0;padding-top:14px}
.live-chat-aside .ask-examples{gap:5px;margin-bottom:8px}
.live-chat-aside .ask-examples button{padding:5px 8px;font-size:.7rem}
.live-chat-aside .ask-row input{min-height:42px}
.live-chat-aside .ask-submit{min-height:42px}
@media(max-width:760px){
  .live-chat-page-head .character-head{width:58px;height:58px}
  .chat-log.live-chat-log{min-height:180px;padding:12px}
  .chat-log.live-chat-log.is-empty{min-height:96px}
  .note.live-chat-error{align-items:stretch;flex-direction:column}
  .live-chat-composer .ask-examples{grid-template-columns:1fr}
  .live-brief-card .brief{grid-template-columns:1fr}
  .live-brief-card .brief li:last-child{grid-column:auto}
}
