/* One quiet hierarchy: content first, controls second. Saved custom wallpapers stay intact. */
html[data-background=none] #messages{background-image:radial-gradient(ellipse at 85% 10%,#8aa58b09,transparent 65%)!important;background-color:var(--d-bg,var(--d-surface))!important}
html[data-look] #messages .message:not(.join-notice):not(.sticker117){padding:5px 9px!important;border:0!important;border-radius:9px!important;box-shadow:none!important;background:color-mix(in srgb,var(--d-message,var(--d-panel)) 77%,transparent)!important}
html[data-look] #messages .message.own:not(.join-notice):not(.sticker117){background:color-mix(in srgb,var(--d-own) 72%,var(--d-surface))!important}
html[data-caption-style=normal] #messages .message:not(.join-notice):not(.sticker117){border-radius:12px!important}
html[data-look] #messages .message .body{line-height:1.4!important;margin-block:1px!important}
html[data-look] #messages .message .meta{font-size:10px!important;line-height:1.3;color:var(--d-muted);margin-bottom:2px}
html[data-look] #messages .message .message-bottom92{column-gap:7px;row-gap:2px;margin-top:2px!important;min-height:14px!important}
html #messages .message-status92{opacity:.8;gap:3px}
html #messages .message-status92 :is(.message-mini-time,.read-receipt){font-size:10px!important}
html #messages .message .message-more{font-size:14px;min-width:28px;min-height:26px;padding:0 4px!important;background:transparent!important;box-shadow:none}
html[data-look] #messages .message .reactions button{height:24px!important;min-height:24px!important;min-width:28px;padding:2px 5px!important;gap:3px;border:0!important;border-radius:12px!important;box-shadow:none!important;background:color-mix(in srgb,var(--d-ink) 5%,transparent)!important}
html[data-look] #messages .message .reactions button.mine{background:color-mix(in srgb,var(--d-accent) 16%,transparent)!important;color:var(--d-ink)}
html[data-look] #messages .message .reactions .reaction-symbol{flex:0 0 18px!important;min-width:18px!important;width:18px!important;height:18px!important}
html[data-look] #messages .message .reactions img.live-emoji110{width:18px!important;height:18px!important;min-width:18px!important}
html #messages .reaction-count{font-size:10px!important;font-weight:500}
html #messages .message .reply-quote{padding:3px 6px!important;margin-block:2px 4px!important;border-radius:3px!important;border-left:2px solid var(--d-accent)!important;background:color-mix(in srgb,var(--d-ink) 4%,transparent)!important;box-shadow:none!important}
html #messages .message .forward-author{background:transparent!important;border-left:0!important;padding:0!important;font-size:10px!important}
html[data-look] #messages .message:not(.join-notice):has(.image-preview,video):not(.sticker117),html[data-look] #messages .message.own:not(.join-notice):has(.image-preview,video):not(.sticker117){background:transparent!important;padding:3px 0!important;box-shadow:none!important}
html #messages .message:has(.image-preview,video):not(.sticker117)>.body:not(:empty){padding:4px 8px!important;border-radius:8px;background:var(--d-message,var(--d-panel))}
html #messages .message.own:has(.image-preview,video):not(.sticker117)>.body:not(:empty){background:var(--d-own)}
html #messages .image-preview{background:transparent!important;box-shadow:none!important;border:0!important}
html :is(#messageMenu,#selectedRoomMenu,#toolbarOverflowMenu,.person-actions-menu,.attachment-picker){padding:6px!important;border-radius:9px!important;box-shadow:0 6px 20px #0002!important;background:var(--d-surface)!important;color:var(--d-ink)!important}
html[data-look] :is(#messageActions,#selectedRoomMenu,#toolbarOverflowMenu,.person-actions-menu,.attachment-picker-options) button.menu-row105{min-height:32px;padding:5px 8px!important;gap:9px;border-radius:5px;font-size:12px}
html[data-look] #messageMenu #messageActions button.menu-row103{min-height:32px;padding:5px 8px!important;gap:9px;border-radius:5px;font-size:12px}
html[data-look] #messageMenu #messageActions button.menu-row103.menu-separator103:not(.danger):not(.menu-danger101){border-top:0;margin-top:0;padding-top:5px!important}
html :is(#messageMenu,#selectedRoomMenu) .dialog-heading{padding:3px 5px!important;margin-bottom:3px}
html :is(#messageMenu,#selectedRoomMenu) h2{font-size:11px;color:var(--d-muted)}
html #messageMenu #quickReactions{gap:2px;background:transparent!important;padding:2px 0!important}
html #messageMenu #quickReactions>button{background:transparent!important;border:0!important;box-shadow:none!important;min-height:36px;padding:3px!important}
html #messageMenu #quickReactions>button:is(:hover,:focus-visible){background:var(--d-active)!important}
html[data-look] #messageMenu .reaction-entry115>button{background:transparent!important;min-height:32px;padding:4px 6px;font-size:11px}
html #messageMenu .menu-thread-shortcut{background:transparent!important;color:var(--d-muted)!important;border:0!important;box-shadow:none!important;font-size:11px;padding:4px!important}
html[data-look] #rooms .room-item.active{background:color-mix(in srgb,var(--d-accent) 12%,var(--d-panel))!important;color:var(--d-ink)!important}
html[data-look] #rooms .room-item.active .room-title{color:var(--d-ink)!important}
html #forwardRooms>button,html .forward-room-button{background:transparent!important;box-shadow:none!important;border:0!important;border-bottom:1px solid var(--d-line)!important;border-radius:0!important;min-height:42px;padding:6px 8px!important}
html :is(#membersList,#contactsList) .member-row,html .member-row{padding:5px 3px!important;gap:8px!important;min-height:46px;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;border-bottom:1px solid color-mix(in srgb,var(--d-line) 50%,transparent)!important}
html .member-row :is(.avatar,.person-avatar,.user-avatar){width:32px!important;height:32px!important;flex-basis:32px!important}
html .member-row :is(strong,b){font-size:12px;font-weight:500}
html .member-row button{box-shadow:none!important;background:transparent!important;color:var(--d-ink);padding:4px 7px;font-size:12px;border-radius:6px}
html #emojiPicker82 .emoji-grid82:not(.themed116) button,html #messageMenu .reaction-grid:not(.theme-grid110) button{background:transparent!important;box-shadow:none!important;border:0!important}
html #emojiPicker82 .emoji-grid82:not(.themed116) button{min-height:36px;padding:3px}
html #emojiPicker82 .emoji-grid82.themed116 button{background:transparent!important;box-shadow:none!important;border:0!important;min-height:72px;justify-content:center}
html #emojiPicker82 .emoji-grid82.themed116 .emoji-caption116{display:none}
.emoji-hint118{position:absolute;bottom:6px;left:8px;right:8px;z-index:2;padding:5px 8px;background:var(--d-surface);border:1px solid var(--d-line);border-radius:6px;color:var(--d-ink);font-size:11px;text-align:center;pointer-events:none}.emoji-hint118[hidden]{display:none!important}
html #emojiPicker82 .emoji-grid82 button:is(:hover,:focus-visible),html #messageMenu .reaction-grid button:is(:hover,:focus-visible){background:var(--d-active)!important}
.video-frame118{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:8px;background:#14181c;isolation:isolate}
html #messages .video-frame118 video{display:block;width:100%!important;height:100%!important;max-height:none!important;aspect-ratio:16/9!important;object-fit:contain!important;margin:0!important;border-radius:8px!important}
.video-state118{position:absolute;inset:0 0 38px;display:flex;align-items:center;justify-content:center;padding:12px;text-align:center;font-size:12px;color:#e7ebe9;background:#14181caa;pointer-events:none}
.video-state118[hidden]{display:none!important}.video-state118 button{pointer-events:auto;font:inherit;background:#2d3733;color:#f3f5f3;border:1px solid #607166;padding:8px 12px;border-radius:6px}
.video-play118{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:48px!important;height:48px!important;min-width:48px;min-height:48px;padding:10px!important;border:1px solid #ffffff70!important;border-radius:50%!important;background:#17221cbb!important;color:#fff!important;box-shadow:none!important;display:grid;place-items:center}.video-play118 svg{width:25px;height:25px}.video-play118[hidden]{display:none!important}.video-play118:focus-visible{outline:2px solid white;outline-offset:3px}
@media(pointer:coarse){html[data-look] :is(#messageActions,#selectedRoomMenu,#toolbarOverflowMenu,.person-actions-menu,.attachment-picker-options) button.menu-row105{min-height:44px}html .member-row button{min-height:44px}html #emojiPicker82 .emoji-grid82:not(.themed116) button{min-height:44px}html #messages .message .reactions button{height:32px!important;min-height:32px!important;min-width:32px}html #messages .message .message-more{min-height:36px}}
@media(prefers-reduced-motion:reduce){html #app *{scroll-behavior:auto!important}}
@media(pointer:coarse){html[data-look] #messageMenu #messageActions button.menu-row103{min-height:44px}}
/* Keep the central play target above the native video hit-test layer. */
html #messages .video-frame118 video{position:relative;z-index:0}
html #messages .video-frame118 .video-play118{z-index:2;pointer-events:auto}
html #messages .video-frame118 .video-state118{z-index:3}
html #messages .video-frame118 .video-play118{transform:translate(-50%,-50%)!important}
