/* Compact world header and single-row message composer. */
:is(.world-page,.dm-input-shell){--world-surface:#fff;--world-soft:#f5f5f7;--world-line:#dedee5;--world-ink:#292734;--world-muted:#777482}
.theme-dark :is(.world-page,.dm-input-shell){--world-surface:#222326;--world-soft:#292a2e;--world-line:#35363d;--world-ink:#eeeef2;--world-muted:#a4a3ae}
.world-compact-header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
:is(.world-page,.dm-input-shell) .world-compact-header h1{margin:0;min-width:0;font-size:16px;line-height:1.3;letter-spacing:0}
.world-name-button{display:flex;align-items:center;gap:9px;max-width:100%;min-height:42px;padding:9px 14px;border:1px solid var(--world-line);border-radius:12px;background:var(--world-surface);color:var(--world-ink);font:inherit;font-weight:750;cursor:pointer}
.world-name-button>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.world-name-button .world-category-dot{flex:none}
.world-options{flex:none}.world-options-toggle{list-style:none;display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--world-line);border-radius:12px;background:var(--world-surface);color:var(--world-ink);cursor:pointer}.world-options-toggle::-webkit-details-marker{display:none}
.world-options-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:90;box-sizing:border-box;width:360px;max-width:100%;max-height:min(520px,65dvh);overflow:auto;padding:18px;border:1px solid var(--world-line);border-radius:16px;background:var(--world-surface);color:var(--world-ink);box-shadow:0 14px 40px #0002}
.world-options-name{display:block;margin:10px 0;font-size:17px;overflow-wrap:anywhere}.world-options-panel .world-description{font-size:13px;overflow-wrap:anywhere}.world-options-panel .world-meta{font-size:12px}.world-options-panel .world-share{padding:10px;margin-top:12px;background:var(--world-soft)}.world-share label{display:block;font-size:12px;font-weight:700;margin-bottom:6px}.world-options-panel .world-header-actions{margin-top:12px;padding-top:12px;flex-wrap:wrap}.world-options-panel .world-members-toggle{border:1px solid var(--world-line);background:var(--world-soft);color:var(--world-ink);min-height:40px}
:is(.world-page,.dm-input-shell) .world-composer{padding:6px 8px;border:1px solid var(--world-line);border-radius:12px;background:var(--world-surface);color:var(--world-ink);box-shadow:none;z-index:10}
.world-message-bar{display:flex;align-items:center;gap:6px;min-width:0;min-height:48px}
:is(.world-page,.dm-input-shell) .world-composer textarea{display:block;flex:1;min-width:0;width:0;min-height:44px;height:44px;max-height:160px;margin:0;padding:11px 2px;border:0;border-radius:0;background:transparent;color:var(--world-ink);font:inherit;font-size:15px;line-height:22px;resize:none;overflow-y:auto}
.world-composer textarea::placeholder{color:var(--world-muted);opacity:1}
.world-composer-icon{position:relative;display:grid;place-items:center;flex:0 0 42px;width:42px;height:44px;padding:0;margin:0;border:0;border-radius:9px;background:transparent;color:var(--world-muted);cursor:pointer;box-sizing:border-box}
.world-composer-icon img{display:block;width:24px;height:24px;object-fit:contain}.world-composer-icon:hover,.world-options-toggle:hover,.world-name-button:hover{background:var(--world-soft)}
.world-image-control input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}
:is(.world-page,.dm-input-shell) .world-send{color:var(--purple,#7358ff)}
.world-composer:focus-within{border-color:var(--world-accent)}
:is(.world-page,.dm-input-shell) :is(.world-name-button,.world-options-toggle,.world-composer-icon,.world-selected-image button):focus-visible,.world-image-control:focus-within{outline:2px solid var(--world-accent);outline-offset:2px}
.world-selected-image{display:flex;align-items:center;gap:8px;padding:6px 9px;margin:4px 0;border-radius:8px;background:var(--world-soft);font-size:12px}.world-selected-image[hidden],.world-image-error[hidden]{display:none}.world-selected-image span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.world-selected-image button{flex:none;width:32px;height:32px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer;font-size:20px}.world-image-error{margin:6px 8px;color:#b33;font-size:12px}.theme-dark .world-image-error{color:#ffaaaa}
.world-composer .embed-row{flex-wrap:wrap}.world-composer .embed-row>input{flex:1 1 140px}.world-composer .embed-check input{flex:none;width:16px;height:16px;margin:0}.world-composer .replying-bar{margin-top:4px}
.world-members .members-panel-head{position:relative;padding-right:50px}.world-members-close{position:absolute;right:8px;top:8px;width:36px;height:36px;border:0;border-radius:8px;background:transparent;color:inherit;font-size:24px;cursor:pointer}
@media(max-width:700px){:is(.world-page,.dm-input-shell) .world-container{padding-top:14px}:is(.world-page,.dm-input-shell) .world-shell{margin-top:12px}.world-message-bar{gap:2px}.world-composer-icon{flex-basis:38px;width:38px}:is(.world-page,.dm-input-shell) .world-composer{padding:5px}:is(.world-page,.dm-input-shell) .world-composer textarea{font-size:16px}:is(.world-page,.dm-input-shell) .world-join-card{flex-wrap:wrap}.world-members{max-height:calc(100dvh - 100px);overflow:auto}}

/* The same composer is also used in the shared direct-message panel. */
.chat-form.dm-input-shell{display:block;flex:none;--world-accent:var(--purple,#7358ff)}
.dm-input-shell .world-composer{position:static;bottom:auto;margin:0}
.dm-input-shell .world-message-bar{gap:2px}
.dm-input-shell .world-image-control input{padding:0;border:0;border-radius:0}
.dm-input-shell .world-composer-icon:disabled,.dm-input-shell .world-image-control:has(input:disabled){opacity:.45;cursor:default}
.dm-input-shell .embed-row{display:none;align-items:center;gap:8px;margin:6px 0 0;padding:8px;border-radius:8px;background:var(--world-soft)}
.dm-input-shell .embed-row.show{display:flex}
.dm-input-shell .embed-row input{width:100%;min-width:0;padding:8px;border:1px solid var(--world-line);border-radius:8px;background:var(--world-surface);color:var(--world-ink)}
.dm-image{display:block;width:auto;max-width:100%;max-height:300px;object-fit:contain;border-radius:10px;margin-top:5px}
.dm-message-copy{white-space:pre-wrap;overflow-wrap:anywhere}
.dm-input-shell .world-composer-icon[disabled]{pointer-events:none}

/* World identity stays within the compact header and its options. */
.world-profile-picture{flex:none;width:28px;height:28px;border-radius:50%;object-fit:cover}
.world-name-button:has(.world-profile-picture){padding-block:6px}
.world-cover-image{display:block;width:100%;height:110px;object-fit:cover;border-radius:10px;margin-bottom:14px}
.world-brand-settings{margin-top:14px;border-top:1px solid var(--world-line);padding-top:12px}
.world-brand-settings>summary{cursor:pointer;font-size:13px;font-weight:750;min-height:32px}
.world-brand-form{display:grid;gap:12px;margin-top:10px}.world-brand-form>label{display:grid;gap:6px;min-width:0;font-size:12px;font-weight:700}
.world-brand-form p,.world-admin-hint{font-size:12px;color:var(--world-muted);line-height:1.5}
.world-brand-form .mp-upload{max-width:100%;min-width:0}.world-brand-form .mp-upload-name{overflow-wrap:anywhere}
.world-members .member-controls{flex-wrap:wrap;align-items:flex-end}.world-member-role-label{display:grid;gap:3px;font-size:10px}
