.save-notice{position:fixed;z-index:10000;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:14px;width:max-content;max-width:calc(100% - 24px);max-height:45vh;overflow-y:auto;padding:14px 16px;border:2px solid #18836b;border-radius:12px;background:#ecfff7;color:#124d3d;box-shadow:0 5px 24px #102a4330;font-size:15px;font-weight:700;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.save-notice[hidden]{display:none}.save-notice>span{min-width:0}.save-notice>button{position:sticky;top:0;align-self:flex-start;flex:0 0 44px;min-width:44px;min-height:44px;padding:4px;background:transparent;color:inherit;font-size:24px}.save-notice>button:focus-visible{outline:3px solid #087e8b;outline-offset:2px}.save-notice[data-kind=pending],.save-notice[data-kind=info]{background:#eef7ff;border-color:#327599;color:#163c55}.save-notice[data-kind=error]{background:#fff2f2;border-color:#b33242;color:#842333}form[aria-busy=true] [aria-disabled=true]{opacity:.65;cursor:wait}

@keyframes story-button-spin{to{transform:translate(-50%,-50%) rotate(360deg)}}
:is(button,a,[role=button],input)[data-story-action]{position:relative;min-width:44px;pointer-events:none}
:is(button,a,[role=button])[data-story-action]{color:transparent!important;text-shadow:none!important}
:is(button,a,[role=button])[data-story-action]>*{visibility:hidden!important}
:is(button,a,[role=button])[data-story-action]::after{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#fff!important;font:700 18px/1 system-ui,sans-serif;text-shadow:0 1px 2px #0005}
:is(button,a,[role=button])[data-story-action=loading]::after{content:"";width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;color:#fff!important;animation:story-button-spin .55s linear infinite}
:is(button,a,[role=button])[data-story-action=success]::after{content:"✓"}
:is(button,a,[role=button])[data-story-action=error]::after{content:"!"}
input[data-story-action]{text-align:center}

/* Import results stay in document flow so touch actions remain reachable. */
body.endpoint-import_text > .save-notice{position:static;transform:none;width:auto;max-width:calc(100% - 40px);max-height:none;margin:20px auto;box-shadow:none}

@media (prefers-reduced-motion:reduce){:is(button,a,[role=button])[data-story-action=loading]::after{animation-duration:1.2s}}
