/* Artifact 9 chat/story adaptations. Shared, scoped reference rules live in tool-artifact.css. */
.artifact-v9:is([data-kind=chat],[data-kind=story]){--brand-font-body:'Artifact Inter',Inter,system-ui,sans-serif;--brand-font-heading:'Artifact Instrument Sans','Artifact Inter',system-ui,sans-serif;--serif:var(--brand-font-heading);font-family:var(--brand-font-body);color:var(--ink);background:#fff;line-height:1.55}
.artifact-v9:is([data-kind=chat],[data-kind=story]) [hidden]{display:none!important}
.artifact-v9:is([data-kind=chat],[data-kind=story]) :is(h1,h2,h3,h4,h5,h6){text-align:center}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .artifact-sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;padding:0!important;border:0!important}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .tool-relay{max-width:none;margin:0;min-width:0}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .tool-msg{margin:9px 0 0;padding:8px 0;font-size:12px;color:#a43e3e;line-height:1.6;text-align:center}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .tool-go{position:static;text-decoration:none;transform:none;box-shadow:none;margin:0;display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer;min-height:0}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .tool-go .tool-arrow{display:block;position:static;transform:none;flex:none;width:16px;height:16px;margin:0;opacity:1}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .tool-go::after{content:none}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .related-card .related-symbol{font-size:28px;line-height:1;color:var(--green);font-weight:300}
.artifact-v9:is([data-kind=chat],[data-kind=story]) .related-card h3{font-size:14px;margin:0 0 6px}
.artifact-v9[data-kind=chat] .chat-compose-inner textarea.tool-free{border:0;outline:none;box-shadow:none;background:transparent;width:100%;margin:0;font-family:var(--brand-font-body);line-height:1.6;color:var(--chat-ink)}
.artifact-v9[data-kind=chat] .chat-compose #chat-send{align-self:end;width:47px;height:47px;margin:0;min-width:47px;min-height:47px;border-radius:14px}
.artifact-v9[data-kind=chat] .chat-compose .fineprint{display:block}
.artifact-v9[data-kind=chat] .chat-example-options .chat-idea{appearance:none}
.artifact-v9[data-kind=chat] .chat-example-content p{font-size:.875rem}
.artifact-v9[data-kind=chat] .chat-example-question.review-followup{margin-top:7px}
.artifact-v9[data-kind=chat] .chat-example-answer.review-followup-answer{background:#fff}
.artifact-v9[data-kind=chat] .chat-welcome{overflow:visible}
.artifact-v9[data-kind=chat] .artifact-example-note{margin:10px 0 0;text-align:center;color:var(--chat-muted);font-size:11px;line-height:1.5}
.artifact-v9[data-kind=chat] .chat-ideas-motion .motion-pause{display:block}
.artifact-v9[data-kind=chat] .motion-paused .chat-ideas-motion .motion-pause{display:none}
.artifact-v9[data-kind=chat] .motion-paused .chat-ideas-motion .motion-play{display:block}
.artifact-v9[data-kind=story] .composer>.artifact-story-form{display:block;overflow:visible;min-width:0}
.artifact-v9[data-kind=story] .artifact-story-form textarea.tool-free{display:block;width:100%;height:auto;min-height:205px;margin:0;border:1px solid var(--line);border-radius:10px;background:var(--tool-surface);padding:16px;font:400 14px/1.75 var(--brand-font-body);resize:vertical;outline:none;box-shadow:none}
.artifact-v9[data-kind=story] .artifact-story-form textarea.tool-free:focus{border-color:#8c9aff;box-shadow:0 0 0 3px #e8ebff}
.artifact-v9[data-kind=story] .composer-footer .tool-go{width:100%;height:49px;font-size:13px;border-radius:8px}
.artifact-v9[data-kind=story] .story-view-tabs{display:flex;align-items:center;gap:2px}
.artifact-v9[data-kind=story] .story-view-tabs [role=tab][aria-selected=true]{background:#e8e4d8;color:#5e5647}
.artifact-v9[data-kind=story] #story-edit-text{margin-left:auto}
.artifact-v9[data-kind=story] .story-paper .story-body{white-space:normal}
.artifact-v9[data-kind=story] .story-body p{margin:0 0 1.95em;line-height:1.95}
.artifact-v9[data-kind=story] .story-body[contenteditable="plaintext-only"]{outline:1px dashed #c2b18e;outline-offset:10px;background:#fffdf3}
.artifact-v9[data-kind=story] #story-craft-panel{padding:24px;min-height:0;overflow:auto}
.artifact-v9[data-kind=story] .result-toolbar{flex:none}
.artifact-v9[data-kind=story] .result-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.artifact-v9[data-kind=story] .result-actions button{cursor:pointer}
.artifact-v9[data-kind=story] .select-choices{display:flex}
.artifact-v9[data-kind=story] .select-choice{cursor:pointer}
.artifact-v9[data-kind=story] .story-library .book-card{min-width:0;cursor:pointer}
.artifact-v9[data-kind=story] .story-library .book-card.chosen .book-cover{outline:2px solid #b6a17b;outline-offset:5px}
.artifact-v9:is([data-kind=chat],[data-kind=story]) :is(button,a,[contenteditable="plaintext-only"],[role=tab],textarea):focus-visible{outline:2px solid #465beb;outline-offset:3px}
@media(max-width:760px){.artifact-v9[data-kind=story] .editor-layout{grid-template-columns:1fr}.artifact-v9[data-kind=story] .result-toolbar{align-items:stretch}.artifact-v9[data-kind=story] .result-actions{justify-content:flex-end}.artifact-v9[data-kind=story] .story-view-tabs button{white-space:nowrap}.artifact-v9[data-kind=story] .story-body p{margin-bottom:1.5em}}
@media(prefers-reduced-motion:reduce){.artifact-v9[data-kind=chat] :is(.chat-idea,.chat-sphere){animation:none!important}.artifact-v9[data-kind=chat] .chat-ideas-motion{display:none}}

.artifact-v9[data-kind=story] .result-actions button{display:inline-flex;align-items:center;justify-content:center;gap:7px}
