body .message:has(.rpg-scene){padding-left:0;border-left:0}
body .message:has(.rpg-scene):before,body .message:has(.rpg-scene)>.speaker{display:none}
.rpg-scene{display:grid;gap:14px;min-width:0;white-space:normal}
.rpg-dialogue{display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;align-items:start;min-width:0}
.npc-avatar{display:block;position:relative;width:36px;height:42px;overflow:hidden;background:#232921;border:1px solid #7d795044;border-radius:4px;flex-shrink:0}
.npc-avatar svg{width:100%;height:100%;fill:#a2a88e;opacity:.75}
.npc-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.npc-lines{min-width:0}.npc-lines header{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:0 0 5px;line-height:1.45;overflow-wrap:anywhere}
.npc-lines header b{font-size:.87em;color:#dbc38e;font-weight:650}.npc-lines header small{font-size:.72em;color:#a0aa96}
.npc-speech{background:#26302055;border-left:2px solid #9d895c70;padding:8px 11px;color:#eee9d9;white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}
body .message-text .rpg-action{margin:0;color:#a4ad9b;font-style:italic;font-size:.9em;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.rpg-narration{color:#c5ccbc;overflow-wrap:anywhere}.rpg-narration p{margin-bottom:.5em}
.rpg-system{border:1px solid #a38b5440;border-left:2px solid #ac935c;padding:7px 10px;background:#80703910;color:#c8c2a7;font-size:.82em;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.rpg-system.warning{border-left-color:#b88271;color:#dcc1ae}
.npc-target-context{display:flex;gap:10px;align-items:center;margin:0 20px 9px;font-size:12px;color:#cbb88c;min-width:0}.npc-target-context span{overflow-wrap:anywhere}.npc-target-context button{margin-left:auto;background:transparent;border:1px solid var(--line);color:var(--muted);font-size:12px;padding:5px 8px;flex-shrink:0}
.npc-target-button{background:none;color:var(--accent);border:1px solid var(--line);padding:5px 8px;font-size:12px;margin-top:6px}
@media(max-width:480px){body .story-log{padding:18px 12px}body .message:has(.rpg-scene){margin-bottom:22px}.rpg-dialogue{grid-template-columns:30px minmax(0,1fr);gap:7px}.rpg-dialogue .npc-avatar{width:30px;height:36px}.npc-speech{padding:7px 9px}.rpg-scene{gap:11px}body .composer{padding-left:10px;padding-right:10px}.composer-field{min-width:0}body .composer input{min-width:0;width:100%}}

.world-pending{display:flex;align-items:center;gap:7px;min-height:24px;margin:4px 0;padding:0 16px;font-size:13px;line-height:24px;color:var(--muted);flex:none}
.world-spinner{width:12px;height:12px;box-sizing:border-box;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:world-spin .8s linear infinite;flex:none}
@keyframes world-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.world-spinner{animation:none}}
.next-actions{display:flex;gap:6px;flex-wrap:wrap;padding:6px 12px;min-width:0;flex:none}
.next-actions[hidden]{display:none}
.next-actions button{font:inherit;font-size:12px;min-height:40px;max-width:100%;min-width:0;padding:7px 10px;border:1px solid var(--line);border-radius:8px;color:var(--muted);background:var(--panel2);overflow-wrap:anywhere;text-align:left;cursor:pointer}
.next-actions button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.stream-error{display:block;color:var(--muted);font-size:12px;margin-top:6px}
.npc-speech{white-space:pre-wrap}
.message-text strong{font-weight:750;color:#f1dfb6}.message-text .narrative-emphasis{color:#e4f5dd;background:linear-gradient(transparent 50%,#6eac8050 50%);text-shadow:0 0 12px #8dcc8d35;padding:0 .08em;border-radius:2px;font-weight:600}
