.story-icon { display: inline-flex; align-items: center; justify-content: center; padding: .42rem; border: 1px solid #81abdb45; border-radius: .55rem; background: #354d6b25; color: inherit; cursor: pointer; }
.story-icon svg, .story-speaker svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.story-icon:hover, .story-speaker:is(button):hover { background: #3c659153; }
.story-branch { margin-inline: .25rem; min-width: 2.25rem; min-height: 2.25rem; }
#storyMemoryButton { gap: .4rem; white-space: nowrap; min-height: 2.5rem; }
.story-import-trigger { width: 100%; justify-content: center; }
.story-dialog { width: min(32rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 2rem); background: #121b2a; color: #edf4ff; border: 1px solid #435775; border-radius: 1.05rem; padding: 0; box-shadow: 0 24px 90px #0009; }
.story-dialog::backdrop { background: #050a14b8; }
.story-dialog form { display: grid; gap: .85rem; padding: clamp(.9rem, 3.5vw, 1.45rem); }
.story-dialog header { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.story-dialog h2, .story-dialog p { margin: 0; }
.story-dialog label { display: grid; gap: .3rem; font-weight: 650; font-size: .9rem; }
.story-dialog label small { color: #aebed4; font-weight: 400; }
.story-dialog :is(input, textarea, select) { width: 100%; box-sizing: border-box; padding: .55rem .65rem; background: #0a1321; border: 1px solid #3c4c66; border-radius: .5rem; color: inherit; font: inherit; font-weight: 400; }
.story-dialog :is(input, textarea, select) { scroll-margin-block: 1rem; }
.story-dialog textarea { resize: vertical; }
.story-dialog .story-icon { min-width: 2.5rem; min-height: 2.5rem; }
.story-dialog :focus-visible, .story-icon:focus-visible, .story-speaker:focus-visible { outline: 2px solid #a5d9ff; outline-offset: 2px; }
.story-recap { border-block-start: 1px solid #435775; padding-top: .65rem; }
.story-recap summary { cursor: pointer; }
.story-recap p { margin-top: .6rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.story-dialog footer { display: flex; justify-content: flex-end; }
.story-dialog .story-status { color: #ffb4a8; }
.story-status:empty { display: none; }
.story-segment { padding: .4rem .65rem; margin-block: .25rem; border-inline-start: 2px solid #8298b753; overflow-wrap: anywhere; }
.story-segment-speech { border-color: #7fcaf1; background: #367dae14; }
.story-segment-thought { border-color: #af9fe2; background: #56427c22; }
.story-segment-thought > div { font-style: italic; }
.story-segment-action { border-color: #7ed7b4; }
.story-speaker { display: inline-flex; gap: .4rem; align-items: center; margin-bottom: .22rem; font-weight: 750; font-size: .74rem; color: inherit; }
.story-speaker:is(button) { min-height: 2rem; padding: .18rem .38rem; background: #a4673940; border: 1px solid #c58d636f; border-radius: .4rem; cursor: pointer; }
.story-segment p { margin: .15rem 0 .45rem; }

@media (pointer: coarse) {
  .story-icon, .story-speaker:is(button), .story-dialog .btn { min-height: 2.75rem; }
  .story-dialog :is(input, textarea, select) { font-size: 1rem; }
}
