.iris-chat-tools{display:flex;gap:4px;align-items:center;margin-left:auto}.iris-chat-tool{display:grid;place-items:center;width:34px;height:34px;min-width:34px;padding:7px;border:0;border-radius:50%;background:var(--iris-surface-2,#f2f2f5);color:var(--iris-accent,#7052e7)}.iris-chat-tool svg{width:20px;height:20px}.iris-chat-tool:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.iris-chat-customized .message-bubble.own-message,.iris-chat-customized .own .group-message-bubble{background:var(--iris-chat-bubble)!important;color:var(--iris-chat-bubble-text)!important}.iris-chat-customized .message-bubble.gif-only,.iris-chat-customized .own .group-message-bubble.gif-only{background:transparent!important;color:inherit!important}.iris-chat-customized .group-send,.iris-chat-customized .message-compose .primary{background:var(--iris-chat-button-accent,var(--iris-accent))!important;color:#ffffff!important}.iris-chat-customized .group-chat-title strong,.iris-chat-customized .messaging-title{color:var(--iris-text)!important}
.iris-chat-custom-overlay{position:fixed;inset:0;z-index:1700;background:#0008;display:flex;align-items:flex-end;justify-content:center}.iris-chat-custom-sheet{background:var(--iris-bg,#fff);color:var(--iris-text,#111);width:min(100%,480px);padding:22px 22px calc(22px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;display:grid;gap:16px;max-height:90dvh;overflow:auto}.iris-chat-custom-sheet h2,.iris-chat-custom-sheet p{margin:0}.iris-chat-custom-sheet p{font-size:14px;line-height:1.5;color:var(--iris-muted,#666)}.iris-chat-custom-sheet label{display:flex;align-items:center;justify-content:space-between;gap:12px}.iris-chat-custom-sheet input[type=color]{width:62px;height:42px;border:0;background:none}.iris-chat-custom-actions{display:flex;gap:10px;flex-wrap:wrap}.iris-chat-custom-actions button{flex:1;min-height:42px;padding:10px;border:0;border-radius:14px;background:var(--iris-surface-2,#eee);color:inherit;font:600 14px inherit}.iris-chat-custom-actions .save{background:var(--iris-accent,#7052e7);color:var(--iris-chat-accent-text,#fff)}.iris-chat-theme-preview{display:flex;justify-content:flex-end;padding:18px;background:var(--iris-surface-2,#f2f2f5);border-radius:16px}.iris-chat-theme-preview span{padding:12px 16px;border-radius:18px}
.iris-screen-live{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:12px;background:var(--iris-surface-2,#eee);font-size:13px}.iris-screen-live[hidden]{display:none}.iris-screen-live button{border:0;border-radius:8px;padding:6px 10px;background:var(--iris-bg,#fff);color:var(--iris-accent,#7052e7);font:600 12px inherit}.iris-screen-viewer{width:min(100%,600px);background:#101114;border-radius:16px;overflow:hidden}.iris-screen-viewer img{display:block;width:100%;height:min(65dvh,550px);object-fit:contain}.iris-screen-viewer[hidden]{display:none}.iris-screen-dialog{max-width:800px}.iris-screen-dialog .iris-screen-viewer{width:100%}
.iris-gif-tabs{display:flex;gap:8px;min-height:36px}.iris-gif-tabs button{border:0;border-radius:999px;padding:8px 15px;background:var(--iris-surface-2,#eee);color:var(--iris-text,#111);font:600 13px inherit}.iris-gif-tabs [aria-selected=true]{background:var(--iris-accent,#7052e7);color:var(--iris-chat-accent-text,#fff)}.iris-gif-sheet{grid-template-rows:auto auto auto auto minmax(0,1fr)}.iris-gif-tile{position:relative;min-width:0;min-height:0}.iris-gif-star{position:absolute;z-index:1;right:6px;top:6px;width:32px;height:32px;border:0;border-radius:50%;background:#111b;color:#fff;font:23px/1 system-ui;box-shadow:0 1px 6px #0004}.iris-gif-star[aria-pressed=true]{color:#ffd766}.iris-gif-star:disabled{opacity:.5}

/* Keep customization above the existing DM/group appearance rules. */
body #app .iris-chat-customized .dm-message-row.own-message-row .message-bubble,
body #app .iris-chat-customized .group-message.own .group-message-bubble{background:var(--iris-chat-bubble)!important;color:var(--iris-chat-bubble-text)!important;border-color:transparent!important}
body #app .iris-chat-customized .dm-message-row.own-message-row .message-bubble.gif-only,
body #app .iris-chat-customized .group-message.own .group-message-bubble.gif-only{background:transparent!important;color:inherit!important}
body #app .iris-chat-customized .group-message.own .group-message-time{color:inherit!important;opacity:.75}
body #app .iris-chat-customized .group-send,
body #app .iris-chat-customized .message-compose .primary{background:var(--iris-chat-button-accent,var(--iris-accent))!important;color:#fff!important}
body #app .iris-chat-enhanced .iris-chat-tools{grid-column:3!important;grid-row:1!important;justify-self:end;margin-left:0}
body #app .iris-chat-enhanced .iris-chat-tool{color:var(--iris-text,#211e25)!important}
body #app .group-chat-screen.iris-chat-enhanced .group-chat-header{display:grid!important;grid-template-columns:36px minmax(0,1fr) 76px!important}
body #app .group-chat-screen.iris-chat-enhanced .group-chat-identity{grid-column:2!important}
body #app .iris-chat-enhanced .iris-screen-live button{color:var(--iris-text,#211e25)!important}
body.iris-chat-open #app .group-chat-screen.iris-chat-customized:not(.channel-discussion-screen) .group-message-compose .iris-composer-field .group-send,
body.iris-chat-open #app .conversation-screen.iris-chat-customized .message-compose .iris-composer-field .primary{background:var(--iris-chat-button-accent,var(--iris-accent))!important;color:#fff!important;-webkit-text-fill-color:#fff!important}

/* Personal wallpapers cover the message area while controls stay legible. */
body #app .iris-chat-background .message-thread,
body #app .iris-chat-background .group-message-thread{
 background-color:var(--iris-chat-background,var(--surface,#f1f3f6))!important;
 background-image:var(--iris-chat-background-image,none)!important;
 background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important;
}
body.dark #app .iris-chat-background .message-thread,
body.dark #app .iris-chat-background .group-message-thread{background-color:var(--iris-chat-background,#17191e)!important;}
.iris-chat-theme-preview{min-height:110px;background-size:cover;background-position:center;background-repeat:no-repeat;}
.iris-chat-background-default{align-self:flex-start;font-size:13px;}
.iris-chat-image-actions{display:flex;align-items:center;gap:10px;margin:14px 0;flex-wrap:wrap;}
.iris-chat-image-picker{position:relative;display:flex!important;align-items:center;justify-content:center;border:1px solid var(--border,#d5d7dd);border-radius:12px;padding:12px!important;cursor:pointer;font-size:14px!important;overflow:hidden;}
.iris-chat-image-picker input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;}
.iris-chat-image-picker:focus-within{outline:2px solid #7052e7;outline-offset:2px;}
.iris-chat-image-actions button{border:1px solid var(--border,#d5d7dd);border-radius:12px;padding:12px;background:transparent;color:inherit;}
