/* Cream on the left is the owner; pale sage on the right is the named guest. */
.service-layout>.conversation,.service-layout>.neighbor-dialogue{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;gap:8px 22px}
.conversation>.conversation-heading{grid-column:1;display:flex;align-items:center;justify-content:space-between;gap:16px;color:#d1dce0;font-size:12px}
.conversation>.conversation-heading .dialogue-position{font-size:12px}
.conversation>.speech-frame,.neighbor-dialogue>.speech-frame{grid-column:1;grid-row:2;min-width:0}
.conversation>.actions,.neighbor-dialogue>.actions{grid-column:2;grid-row:1/3}
.conversation>.dialogue-tools{grid-row:3}
.conversation>.transcript{grid-column:1;grid-row:2;max-height:27dvh;overflow:auto;padding-right:7px;min-width:0}
.speech-frame{display:block;max-width:94%;margin:0;min-width:0}
.speech-frame+.speech-frame{margin-top:14px}
.speech-frame.role-guest{margin-left:auto}
.dialogue-identity{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-size:14px;color:#ffe0ab}
.speech-frame.role-guest>.dialogue-identity{justify-content:flex-end;color:#d6e9d2}
.dialogue-identity>b{color:inherit!important;margin:0!important;font-size:14px!important;line-height:1.4}
.dialogue-identity>small{font-size:11px;color:inherit;border:1px solid currentColor;border-radius:4px;padding:0 4px;opacity:.85}
.dialogue-avatar{display:block;width:29px;height:29px;flex:0 0 29px;border-radius:50%;overflow:hidden;border:1px solid #d7ba84;background-color:#f4e6cd}
.dialogue-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.dialogue-avatar.portrait{margin:0;background-size:300% 200%;box-shadow:none}
.dialogue-avatar.owner-avatar img{object-fit:cover;object-position:center 36%;transform:scale(1.3)}
.speech-frame.role-guest .dialogue-avatar{order:3;border-color:#bfd2b9}
.dialogue-bubble{position:relative;padding:12px 16px;border-radius:3px 15px 15px 15px;background:#f5e7cd;color:#35495a;border-left:4px solid #d3a263;box-shadow:0 2px 3px #1023351a}
.speech-frame.role-guest .dialogue-bubble{border-radius:15px 3px 15px 15px;background:#e4ecdf;border-left:0;border-right:4px solid #a4bea0;color:#29433b}
.speech-frame .dialogue-bubble>.line{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;max-width:none;color:inherit;line-height:1.7!important;font-size:clamp(16px,1.35vw,19px)!important}
.speech-frame.role-narrator{max-width:100%;margin-left:0;color:#d0dbe0}
.speech-frame.role-narrator .dialogue-identity{color:#bdcdd5;font-size:12px}
.speech-frame.role-narrator .dialogue-identity>b{font-size:12px!important;font-weight:400;letter-spacing:.08em}
.speech-frame.role-narrator .dialogue-bubble{padding:4px 0 4px 12px;background:none;border:0;border-left:2px solid #73909e;border-radius:0;box-shadow:none;color:#e6ded0}
.speech-frame.role-narrator .dialogue-bubble>.line{font-size:16px!important;line-height:1.8!important}
.role-history>.speech-frame{margin-block:10px;max-width:92%;padding:0;background:none;display:block}
.role-history>.role-guest{margin-left:auto}
.role-history .role-source,.role-history .role-send-status{display:block;font-size:12px;margin-top:8px;color:#52675f}
.role-history .role-retry{display:inline-block;margin-top:8px;font-size:13px;min-height:34px;border:1px dashed #8e7a56;background:transparent;color:#35495a;padding:4px 9px}
.role-chat summary{color:#d8e4e8}.role-chat>label{font-size:14px;color:#e2e4d6}
.service-layout>.conversation:has(.choices),.service-layout>.conversation:has(.shopkeeper-choice),.service-layout>.neighbor-dialogue:has(.neighbor-say){grid-template-columns:1fr}
.service-layout>.conversation:has(.choices)>.actions,.service-layout>.conversation:has(.shopkeeper-choice)>.actions,.service-layout>.neighbor-dialogue:has(.neighbor-say)>.actions{grid-column:1;grid-row:3;max-width:none;justify-content:flex-start}
.service-layout>.conversation:has(.choices)>.dialogue-tools,.service-layout>.conversation:has(.shopkeeper-choice)>.dialogue-tools{grid-column:1;grid-row:4}
.neighbor-dialogue .neighbor-scent-progress{grid-column:1;grid-row:3}.neighbor-dialogue:has(.neighbor-scent-progress)>.actions{grid-row:1/4}
.neighbor-say{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left}.neighbor-say small{font-size:11px;opacity:.8}
.mutual-dialogue>.speech-frame,.mutual-dialogue>.transcript{width:100%;max-height:27dvh;overflow:auto}
.scent-dialogue .speaker:before{content:'旁白 · ';color:#bccdd4;font-size:12px}
@media(max-width:650px){.service-layout>.conversation,.service-layout>.neighbor-dialogue{grid-template-columns:1fr;gap:7px;max-height:53dvh;padding:14px 18px}.speech-frame{max-width:94%}.dialogue-bubble{padding:10px 12px}.dialogue-identity{font-size:13px}.dialogue-avatar{width:25px;height:25px;flex-basis:25px}.service-layout>.conversation .dialogue-tools{grid-column:1;grid-row:4;justify-content:flex-start}.service-layout>.conversation>.actions,.service-layout>.neighbor-dialogue>.actions{grid-column:1;grid-row:3;max-width:none;justify-content:flex-start}.neighbor-dialogue:has(.neighbor-scent-progress)>.actions{grid-row:4}.role-history{max-height:27dvh}.speech-frame .dialogue-bubble>.line{font-size:16px!important}.speech-frame.role-narrator .dialogue-bubble>.line{font-size:15px!important}}
@media(max-height:580px) and (orientation:landscape){.dialogue-bubble{padding:8px 12px}.dialogue-avatar{width:24px;height:24px;flex-basis:24px}.speech-frame .dialogue-bubble>.line{font-size:15px!important}.dialogue-identity{margin-bottom:4px}}
.neighbor-exchange{grid-column:1;grid-row:2;max-height:29dvh;overflow:auto;padding-right:7px;min-width:0}
.role-history .dialogue-bubble>.line{display:block;padding:0;margin:0;background:none;border-radius:0}
