.ghost-media-message{min-width:0;max-width:100%}.ghost-media-card{display:grid;gap:12px;width:min(100%,640px);min-width:0;padding:16px;border:1px solid var(--border,rgba(148,163,184,.2));border-radius:16px;background:var(--panel,#101727)}.ghost-media-card strong{overflow-wrap:anywhere;font-size:14px}.ghost-media-card img,.ghost-media-card video{display:block;width:100%;max-height:65vh;object-fit:contain;border-radius:10px;background:#080c15}.ghost-media-card audio{width:100%;min-width:0}.ghost-media-card p:empty{display:none}.ghost-media-card p{margin:0;line-height:1.5;font-size:13px;overflow-wrap:anywhere}.ghost-media-card a,.ghost-media-card button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--border,rgba(148,163,184,.2));border-radius:10px;color:var(--text,#eef3ff);background:var(--surface,#182137);text-decoration:none;cursor:pointer}.ghost-media-card a{justify-self:start;min-width:144px}.ghost-active-chat-drawer .ghost-media-card{width:100%}@media(max-width:480px){.ghost-media-card{padding:12px;gap:10px}.ghost-media-card img,.ghost-media-card video{max-height:50vh}}
.ghost-create-response-action,#ghostCreateToggle,#ghostCreatePanel button{min-height:44px;border:1px solid var(--border,rgba(148,163,184,.25));border-radius:10px;background:var(--surface,#182137);color:var(--text,#eef3ff);padding:8px 12px;cursor:pointer}
.ghost-create-response-action{margin:12px 8px 0 0;font-size:13px}
#ghostCreateToggle{flex:0 0 auto;font-size:13px}
#ghostCreatePanel[hidden],#ghostCreatePanel [hidden]{display:none!important}
#ghostCreatePanel{grid-column:2;grid-row:1/-1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;min-width:0;width:100%;z-index:1100;background:var(--panel,#101727);border-left:1px solid var(--border,rgba(148,163,184,.25));color:var(--text,#eef3ff);overflow:hidden}
#ghostCreatePanel header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border-bottom:1px solid var(--border,rgba(148,163,184,.25))}
#ghostCreatePanel header div{display:grid;gap:5px}#ghostCreatePanel small{font-size:12px;color:var(--muted,#a8b6cb);line-height:1.5}#ghostCreatePanel header strong{font-size:16px}
.ghost-create-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding:14px;display:flex;flex-direction:column;gap:14px}
#ghostCreatePanel label{display:grid;gap:7px;font-size:13px;color:var(--text,#eef3ff)}
#ghostCreatePanel textarea,#ghostCreatePanel select{width:100%;min-width:0;border:1px solid var(--border,#34415c);border-radius:10px;background:var(--surface,#182137);color:var(--text,#eef3ff);padding:10px;font:inherit;font-size:14px;line-height:1.5}
#ghostCreatePanel select{min-height:44px}#ghostCreatePanel textarea{resize:vertical;min-height:88px;max-height:45vh}
#ghostCreatePanel section{display:grid;gap:14px}#ghostCreatePanel section[hidden],#ghostCreatePanel p[hidden]{display:none!important}
#ghostCreatePanel p{font-size:13px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.ghost-create-types{display:flex;gap:8px}.ghost-create-types button{flex:1}
#ghostCreatePanel footer{display:grid;gap:10px;padding:14px;border-top:1px solid var(--border,#34415c);background:var(--panel,#101727)}
#ghostCreatePanel [data-create-generate]{background:var(--accent,#a83e55);color:white;font-weight:700}#ghostCreatePanel button:disabled{opacity:.5;cursor:default}
body[data-ghost-create-open="true"]{--ghost-context-column:380px}
body[data-ghost-create-open="true"] #ghostContextRail,body[data-ghost-create-open="true"] #ghostContextBackdrop{display:none!important}
body[data-ghost-create-open="true"] .main{grid-template-columns:minmax(0,1fr) 380px!important}
@media(max-width:1099px){
body[data-ghost-create-open="true"]{--ghost-context-column:0px}body[data-ghost-create-open="true"] .main{grid-template-columns:minmax(0,1fr) 0px!important}
#ghostCreatePanel{position:fixed;inset:0 0 0 auto;width:min(440px,100vw);max-width:100vw;height:100dvh;z-index:1450;box-shadow:-12px 0 50px rgba(0,0,0,.5)}
}
@media(prefers-reduced-motion:reduce){body[data-ghost-create-open="true"] .main{transition:none}}

body[data-ghost-create-open="true"][data-ghost-create-overlay="true"]{--ghost-context-column:0px}
body[data-ghost-create-open="true"][data-ghost-create-overlay="true"] .main{grid-template-columns:minmax(0,1fr) 0px!important}
body[data-ghost-create-overlay="true"] #ghostCreatePanel{position:fixed;inset:0 0 0 auto;width:min(440px,100vw);height:100dvh;z-index:1450;box-shadow:-12px 0 50px rgba(0,0,0,.5)}
@media(max-width:1099px){
body[data-ghost-ui="v4"] .top-title{min-width:0!important;flex:1 1 0!important;overflow:hidden}
body[data-ghost-ui="v4"] .top-title>strong{display:none}
body[data-ghost-ui="v4"] #ghostChatModelTrigger{min-width:0!important;max-width:90px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-ghost-ui="v4"] .top-actions{flex:0 0 auto!important;gap:6px!important}
body[data-ghost-ui="v4"] .topbar{gap:8px!important}
body[data-ghost-ui="v4"] .top-actions>.ghost-live-cortex{display:none!important}
body[data-ghost-ui="v4"] #ghostContextToggle{height:44px!important;min-height:44px!important;width:44px!important;min-width:44px!important;padding:0!important}
body[data-ghost-ui="v4"] #accountBtn{height:44px!important;min-height:44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;padding:0!important;font-size:0!important}
body[data-ghost-ui="v4"] #accountBtn::before{content:"";display:inline-block;width:20px;height:20px;background:currentColor;vertical-align:middle;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8v-2c0-3 3-5 7-5s7 2 7 5v2H5Z'/%3E%3C/svg%3E") center/contain no-repeat}
}

/* A readable creation sheet needs an opaque surface over the conversation. */
#ghostCreatePanel{background:var(--ghost-create-surface,#08121e)}

#ghostCreatePanel [data-create-recommendations],#ghostCreatePanel [data-create-output-settings]{display:grid;gap:10px;min-width:0}
#ghostCreatePanel [data-create-recommendations]>div{border:1px solid var(--border,#273b51);border-radius:10px;padding:10px;overflow-wrap:anywhere}
#ghostCreatePanel [data-create-output-settings] select{min-height:44px;width:100%}
.ghost-create-asset{border:1px solid var(--ghost-line,rgba(255,255,255,.15));border-radius:12px;padding:12px;margin:10px 0;overflow-wrap:anywhere}.ghost-create-asset img{display:block;width:100%;max-height:160px;object-fit:contain;border-radius:8px}.ghost-create-asset button{margin:4px 4px 4px 0;min-height:44px}.ghost-create-asset label{display:flex;gap:8px;align-items:center;margin:10px 0}.ghost-create-asset input[type=checkbox]{width:20px;height:20px;flex:none}


#ghostCreatePanel summary{min-height:44px;display:list-item;padding:12px 0;cursor:pointer;font-weight:600}
#ghostCreatePanel details{border-top:1px solid var(--border);padding-top:4px}
#ghostCreatePanel details[open]>label{margin-top:8px}
/* Phone Create shares its shell slot with the persistent taskbar. Keep after the wider breakpoint. */
@media(max-width:700px){#ghostCreatePanel,body[data-ghost-create-overlay="true"] #ghostCreatePanel{left:var(--ghost-nav-width,56px);right:0;width:calc(100vw - var(--ghost-nav-width,56px));max-width:none}}
