.chat-context{flex:none}
.chat-settings-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 10px;border:1px solid #ffffff12;border-radius:11px;background:#ffffff05;color:#d6c8e3;font-size:11px;flex-shrink:0}
.chat-settings-trigger:hover{background:#a855f71a;color:#f3e8ff;border-color:#a855f749}
.chat-settings-trigger .icon{width:16px;height:16px}
.story-primary-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:#c084fc;margin-right:5px;vertical-align:middle;box-shadow:0 0 8px #a855f740}
.chat-settings-overlay{justify-content:flex-end;align-items:stretch;padding:0;background:#05040a99;backdrop-filter:blur(6px)}
.chat-settings-drawer{width:min(420px,100%);max-width:420px;height:100dvh;max-height:100dvh;border-radius:20px 0 0 20px;display:flex;flex-direction:column;overflow:hidden;background:#0c0b14f5;border:0;border-left:1px solid #ffffff16;box-shadow:-20px 0 70px #0005;animation:chat-drawer-enter .18s ease-out}
.chat-settings-drawer .modal-head{flex:none;position:static;background:#17132199;padding:19px 21px}
.chat-settings-drawer .modal-head h2{font-size:17px}
.chat-settings-drawer .modal-body{flex:1;min-height:0;overflow-y:auto;padding:22px;overscroll-behavior:contain}
.chat-settings-panel>section+section{border-top:1px solid #ffffff0e;margin-top:22px;padding-top:22px}
.chat-settings-panel h3{font-size:13px;color:#e9d5ff;margin:0 0 12px}
.chat-settings-panel .helper{font-size:11px;line-height:1.8;margin-bottom:12px}
.chat-settings-panel .chat-model-picker{max-width:none;width:100%;min-height:46px}
.chat-settings-panel .chat-model-picker strong{font-size:12px}
.chat-settings-panel .story-panel{padding:0;background:none;border:0}
.chat-settings-panel .story-stage{flex-wrap:wrap;gap:10px}
.chat-settings-panel .story-slots-strip{flex-wrap:wrap;overflow:visible;padding-bottom:0}
.chat-settings-panel .story-slot-chip,.chat-settings-panel .story-slot-add{max-width:100%}
.chat-settings-panel .story-slot-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-settings-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.chat-settings-actions .btn{justify-content:flex-start}
.chat-settings-panel .ai-disclaimer{font-size:11px;line-height:1.9}
@keyframes chat-drawer-enter{from{transform:translateX(24px);opacity:.6}to{transform:translateX(0);opacity:1}}
@media(max-width:760px){
 .chat-page .chat-header{height:52px;min-height:52px;max-height:52px;flex:0 0 52px;padding:0 12px;gap:8px;flex-wrap:nowrap;box-sizing:border-box;background:#0c0b14cc;backdrop-filter:blur(20px)}
 .chat-page .chat-header .story-heading{flex:1;min-width:0}
 .chat-page .chat-header .story-heading h2{font-size:14px;line-height:18px;margin:0 0 1px}
 .chat-page .chat-header .story-heading p{display:block;font-size:10px;line-height:14px;margin:0;color:#b99ad2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .chat-page .chat-header .chat-sidebar-toggle,.chat-page .chat-header .story-exit{width:27px;height:30px;flex:0 0 27px}
 .chat-page .chat-header .chat-sidebar-toggle .icon,.chat-page .story-exit svg{width:16px;height:16px}
 .chat-page .chat-header .chat-header-tools{width:auto;flex:0 0 auto;margin:0;gap:0}
 .chat-page .chat-header-tools>.chat-model-picker,.chat-page .chat-header-tools>[data-action=toggle-memory],.chat-page .chat-context{display:none}
 .chat-page .chat-header .chat-settings-trigger{min-height:30px;padding:6px 9px;gap:5px;font-size:11px}
 .chat-settings-drawer{border-radius:16px 0 0 16px}
}
@media(prefers-reduced-motion:reduce){.chat-settings-drawer{animation:none}}
