/* Native platform glyphs, shared by settings, the picker and message reactions. */
.native-emoji { font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-variant-emoji: emoji; font-weight: 400; }
html body .emoji-picker { --emoji-picker-head: 3.2rem; box-sizing: border-box; position: fixed; inset: auto; margin: 0; max-width: none; max-height: none; padding: 0; border: 0; border-radius: 1rem; background: var(--ui-surface); color: var(--color-light-01); box-shadow: 0 16px 56px #0004; overflow: hidden; }
.emoji-picker[open] { display: flex; flex-direction: column; animation: emoji-picker-in .15s ease-out; }
.emoji-picker::backdrop { background: #09080b12; }
.emoji-picker button { color: inherit; font: inherit; cursor: pointer; }
.emoji-picker button:focus-visible, .emoji-choice button:focus-visible { outline: 2px solid var(--color-accent-01); outline-offset: -2px; }
.emoji-picker .ui-icon { width: 20px; height: 20px; flex: none; margin: 0; fill: currentColor; }
/* The search (shared .directory-search) stays put while the emojis scroll; settings sit to its right. */
.emoji-picker-header { position: relative; z-index: 1; display: flex; align-items: center; gap: .45rem; flex-shrink: 0; box-sizing: border-box; height: var(--emoji-picker-head); padding: 0 .65rem; }
html body .emoji-picker .emoji-picker-header .directory-search { flex: 1; min-width: 0; min-height: 2.4rem; }
html body .emoji-picker .emoji-configure { display: grid; place-items: center; flex: 0 0 2.4rem; width: 2.4rem; height: 2.4rem; padding: 0; border: 0; border-radius: .65rem; background: color-mix(in srgb,var(--color-light-01) 8%,transparent); transition: background-color .14s; }
html body .emoji-picker .emoji-configure:is(:hover,:active) { background: color-mix(in srgb,var(--color-light-01) 14%,transparent); }
html body .emoji-picker .emoji-configure[hidden] { display: none; }
 .emoji-tone-popover:not([hidden]) { position: absolute; z-index: 3; display: flex; padding: 5px; gap: 1px; border: 1px solid var(--ui-line); border-radius: .8rem; background: color-mix(in srgb,var(--color-light-01) 12%,var(--ui-surface)); box-shadow: 0 6px 24px #0004; }
.emoji-tone-popover button { display: grid; place-items: center; width: 40px; height: 44px; padding: 0; border: 0; border-radius: .5rem; background: transparent; font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size: 1.6rem; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Emojis run behind the search and, once scrolled, fade out below it with the
   shared eased curve (trackScrollFade, top only); fully hidden behind the
   search itself. Below, the category bar's line cuts them hard. */
.emoji-picker-scroll { --scroll-fade-top-inset: calc(var(--emoji-picker-head) - .4rem); --scroll-fade-auto-size: 2.6rem; min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; margin-top: calc(-1 * var(--emoji-picker-head)); padding: calc(var(--emoji-picker-head) + .1rem) .7rem .8rem; scroll-padding-top: calc(var(--emoji-picker-head) + 1rem); outline: none; scrollbar-width: thin; /* Emojis are buttons, not text: a held finger neither selects nor shows the callout. */ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.emoji-picker-sections section + section { margin-top: 1rem; }
.emoji-picker-scroll h3 { text-align: left; margin: .2rem .3rem .6rem; font-size: .85rem; font-weight: 600; color: inherit; opacity: .7; }
.emoji-picker-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 2px; touch-action: pan-y; }
.emoji-picker-grid .native-emoji { display: grid; place-items: center; min-width: 0; height: 44px; padding: 2px; border: 0; border-radius: .55rem; background: transparent; font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size: 1.65rem; line-height: 1; transition: background-color .12s,transform .12s; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.emoji-picker-grid .native-emoji:active { transform: scale(.88); }
.emoji-picker :is(button:hover,button[aria-pressed=true]) { background: var(--shell-selection); }
.emoji-picker-status { padding: .25rem; font-size: .875rem; line-height: 1.5; }
.emoji-picker-status:empty { display: none; }
.emoji-picker-status button { display: block; border: 0; border-radius: .5rem; padding: .65rem; margin-top: .75rem; background: var(--shell-selection); }
.emoji-picker-sentinel { height: 1px; }
.emoji-categories { display: flex; align-items: center; flex-shrink: 0; padding: .4rem .45rem max(.4rem,env(safe-area-inset-bottom,0px)); border-top: 1px solid var(--ui-line); background: var(--ui-surface); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.emoji-categories button { display: grid; place-items: center; min-width: 0; flex: 1; height: 42px; padding: .35rem; border: 0; border-radius: .6rem; background: transparent; opacity: .65; }
.emoji-categories button[aria-pressed=true] { opacity: 1; color: var(--color-accent-01); }
.emoji-choice { position: relative; width: 44px; height: 44px; flex: 0 0 44px; }
.emoji-choice[hidden] { display: none; }
html body :is(.settings-content, .reaction-drag-ghost) .emoji-choice-button { display: grid; place-items: center; position: relative; width: 44px; height: 44px; padding: 5px; cursor: pointer; overflow: hidden; border-radius: .65rem; border: 0; background: transparent; color: var(--color-light-01); }
.emoji-choice-face { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; transition: opacity .12s; pointer-events: none; font-size: 1.6rem; line-height: 1; }
.emoji-choice-face .ui-icon { width: 27px; height: 27px; margin: 0 !important; flex: none; fill: currentColor; }
.emoji-choice-edit { position: absolute; inset: 0; display: grid; place-items: center; border-radius: .65rem; opacity: 0; background: transparent; transition: opacity .14s; pointer-events: none; }
.emoji-choice-edit .ui-icon { width: 27px; height: 27px; margin: 0 !important; flex: none; }
html body .settings-content .emoji-choice-clear { position: absolute; z-index: 2; right: -8px; top: -8px; display: grid; place-items: center; width: 24px; height: 24px; min-height: 0; padding: 3px; border-radius: .4rem; border: 1px solid var(--ui-line); color: var(--color-light-01); background: color-mix(in srgb,var(--color-light-01) 10%,var(--ui-surface)); opacity: 0; cursor: pointer; transition: opacity .14s,background-color .14s; }
.emoji-choice-clear[hidden] { display: none; }
.emoji-choice-clear .ui-icon { width: 16px; height: 16px; margin: 0 !important; flex: none; }
.emoji-choice:is(:hover,:focus-within) :is(.emoji-choice-edit,.emoji-choice-clear) { opacity: 1; }
#settingsSwipes .swipe-setting-icon { flex-shrink: 0; }
#settingsSwipes .swipe-setting-label { overflow-wrap: normal; }
.quick-reaction-setting { display: flex; align-items: center; gap: .7rem; min-height: 52px; box-sizing: border-box; padding: .2rem .35rem; border-radius: .6rem; background: transparent; color: var(--color-light-01); position: relative; }
.quick-reaction-label { flex: 1; min-width: 0; font-size: .9rem; }
html body .reaction-drag-handle { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: .5rem; border: 0; border-radius: .5rem; background: transparent; color: inherit; cursor: grab; touch-action: none; user-select: none !important; }
.reaction-drag-handle .ui-icon { width: 24px; height: 24px; }
.is-reorder-placeholder { background: color-mix(in srgb,currentColor 7%,transparent); }
.is-reorder-placeholder > * { opacity: .15; }
.reaction-drag-ghost { list-style: none; position: fixed; z-index: 99999; pointer-events: none; box-shadow: 0 12px 32px #0005; }
.reaction-quick-strip { display: flex; align-items: center; gap: 0; width: 100%; min-width: 0; max-width: 220px; padding: .25rem .1rem .5rem; box-sizing: border-box; border-bottom: 1px solid var(--ui-line); margin-bottom: .35rem; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.floating-menu:has(> .reaction-quick-strip) { min-width: min(14.5rem, var(--floating-menu-available-width, calc(100vw - 24px))); padding-top: .3rem; }
.floating-menu > .reaction-quick-strip { padding-top: 0; max-width: none; }
.floating-menu > .reaction-quick-strip:only-child { border-bottom: 0; margin-bottom: 0; padding-block: .25rem; }
.floating-menu:has(> .reaction-quick-strip:only-child) { padding-block: .3rem; }
.floating-menu > .reaction-quick-strip:only-child .reaction-quick-rail { padding-top: 3px; }
.floating-menu .reaction-quick-rail { padding-top: 0; }
.reaction-quick-rail { display: flex; flex: 1; width: 0; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 3px 12px 3px 0; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x; cursor: grab; --rail-fade-start: 0px; --rail-fade-end: 3.4rem; mask-image: var(--rail-fade-mask); -webkit-mask-image: var(--rail-fade-mask); transition: --rail-fade-start .32s ease, --rail-fade-end .32s ease; }
.reaction-quick-rail::-webkit-scrollbar { display: none; }
/* A held emoji starts the slide-to-choose gesture (menu-gesture.js): no text selection or callout. */
.reaction-quick-rail { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Eased fades that reach the menu's edge (larsenwork.com/easing-gradients).
   Their widths are registered lengths, so each side fades in and out smoothly
   as the rail leaves its start or reaches its end. */
@property --rail-fade-start { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --rail-fade-end { syntax: '<length>'; inherits: false; initial-value: 0px; }
.reaction-quick-rail {
  --rail-fade-mask: linear-gradient(to right, transparent 0, rgb(0 0 0/.09) calc(var(--rail-fade-start) * .25), rgb(0 0 0/.3) calc(var(--rail-fade-start) * .45),
    rgb(0 0 0/.62) calc(var(--rail-fade-start) * .65), rgb(0 0 0/.9) calc(var(--rail-fade-start) * .85), #000 var(--rail-fade-start),
    #000 calc(100% - var(--rail-fade-end)), rgb(0 0 0/.9) calc(100% - var(--rail-fade-end) * .85), rgb(0 0 0/.62) calc(100% - var(--rail-fade-end) * .65),
    rgb(0 0 0/.3) calc(100% - var(--rail-fade-end) * .45), rgb(0 0 0/.09) calc(100% - var(--rail-fade-end) * .25), transparent 100%);
}
.reaction-quick-strip.has-scrolled .reaction-quick-rail { --rail-fade-start: 2.4rem; }
.reaction-quick-strip.at-end .reaction-quick-rail { --rail-fade-end: 0px; }
html body .reaction-quick-rail .emoji-option { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 38px; min-height: 0; padding: .3rem; margin: 0; border: 0; border-radius: .5rem; background: transparent; font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size: 1.3rem; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html body .reaction-quick-more { position: relative; z-index: 1; margin-left: -12px; flex: 0 0 36px; display: grid; place-items: center; width: 36px; height: 36px; padding: 6px; cursor: pointer; border: 0; border-radius: .5rem; background: transparent; color: inherit; }
.reaction-quick-more .ui-icon { width: 26px; height: 26px; margin: 0 !important; flex: none; fill: currentColor; }
/* The small plus sits top right; centre the face on the emojis, not the box. */
.reaction-quick-more .ui-icon { translate: -1px -3px; }
html body .reaction-quick-strip .emoji-option:is(:hover,:focus-visible,:active,.is-gesture-active) { background: var(--shell-selection); transform: none; }
/* The "+" has no highlight box: it only dims a little under the pointer. */
html body .reaction-quick-strip .reaction-quick-more:is(:hover,:focus-visible,:active,.is-gesture-active) { background: transparent; transform: none; }
html body .reaction-quick-strip .reaction-quick-more { transition: color .14s ease; }
/* Dimmed through the colour: an opacity transition on this icon crashed Chromium's renderer. */
html body .reaction-quick-strip .reaction-quick-more:is(:hover,:active,.is-gesture-active) { color: color-mix(in srgb, currentColor 70%, transparent); }
html body .reaction-quick-strip .reaction-quick-more:focus-visible { outline: 2px solid var(--camayo-focus-ring, currentColor); outline-offset: -2px; }
@keyframes emoji-picker-in { from { opacity: 0; transform: translateY(5px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes emoji-picker-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@media(max-width:649.98px) {
 html body .emoji-picker { border-radius: 1.2rem 1.2rem 0 0; box-shadow: 0 -12px 40px #0003; }
 .emoji-picker[open] { animation: emoji-picker-sheet-in .22s cubic-bezier(.2,.8,.2,1); }
 /* The on-screen keyboard moves and shrinks the sheet (position() follows visualViewport). */
 .emoji-picker.is-placed { transition: top .25s cubic-bezier(.2,.8,.2,1), height .25s cubic-bezier(.2,.8,.2,1); }
 html body .emoji-picker { --directory-search-font: 1rem; }
 .emoji-picker-grid { grid-template-columns: repeat(7,minmax(0,1fr)); } .quick-reaction-setting { gap: .65rem; } }
@media(hover:none) { .emoji-choice-clear { opacity: 1; } }
@media(prefers-reduced-motion:reduce) { .emoji-picker[open] { animation: none; } .emoji-picker.is-placed { transition: none; } .emoji-picker-grid .native-emoji,.emoji-choice-edit,.emoji-choice-clear { transition: none; } }

.reaction-drag-ghost { background: color-mix(in srgb,var(--color-light-01) 7%,var(--ui-surface)); }

#quickReactionSettings.is-reorder-settling { pointer-events: none; }

#emojiSkinToneSettings { display: flex; gap: .4rem; flex-wrap: wrap; }
html body #emojiSkinToneSettings button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid transparent; padding: 0; border-radius: .6rem; background: transparent; font-size: 1.6rem; cursor: pointer; transition: background-color .14s, border-color .14s; }
html body #emojiSkinToneSettings button:active { background: color-mix(in srgb,currentColor 5%,transparent); }
@media (hover: hover) and (pointer: fine) {
  html body #emojiSkinToneSettings button:hover { background: color-mix(in srgb,currentColor 5%,transparent); }
}
html body #emojiSkinToneSettings button[aria-pressed=true] { background: color-mix(in srgb,currentColor 10%,transparent); border-color: color-mix(in srgb,currentColor 18%,transparent); }
#settingsSwipes .swipe-setting-icon .ui-icon { margin: 0 !important; flex: none; }

html body .reaction-quick-rail .emoji-option[aria-pressed=true] { background: var(--shell-selection); }

html body .reaction-quick-rail .emoji-option:is(:hover,:focus-visible,:active) { transform: none; }

.emoji-choice:not(.has-emoji) .emoji-choice-edit { display: none; }
.emoji-choice.has-emoji:is(:hover,:focus-within) .emoji-choice-face { opacity: 0; }
html body .settings-content .emoji-choice:is(:hover,:focus-within) .emoji-choice-button { background: var(--shell-selection); }

html body .settings-content .emoji-choice-clear:hover { background: color-mix(in srgb,var(--color-light-01) 20%,var(--ui-surface)); }
.emoji-choice.is-just-chosen .emoji-choice-face { opacity: 1 !important; }
.emoji-choice.is-just-chosen :is(.emoji-choice-edit,.emoji-choice-clear) { opacity: 0 !important; pointer-events: none; }

/* Enlarge the glyph around its bottom edge without moving its tap target. */
.reaction-quick-glyph { display: block; transform-origin: center bottom; transition: transform 150ms ease; }
.reaction-quick-rail .emoji-option:is(:hover,:focus-visible,:active,.is-gesture-active) .reaction-quick-glyph { transform: scale(1.18); }
/* A held finger covers its emoji. Like a keyboard key, it appears large above it. */
.reaction-magnifier {
  position: fixed; z-index: 2000; display: grid; place-items: center; width: 4.6rem; height: 4.6rem; margin: 0;
  border-radius: 1.4rem; pointer-events: none; transform-origin: 50% 100%;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size: 2.9rem; line-height: 1;
  background: var(--menu-surface, #29272df2); box-shadow: 0 .6rem 1.6rem #0005, 0 0 0 .5px color-mix(in srgb, currentColor 12%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: left 90ms ease-out, top 90ms ease-out;
  animation: reaction-magnify 170ms cubic-bezier(.25, 1.45, .45, 1);
}
.reaction-magnifier.is-leaving { animation: reaction-magnify-out 110ms ease-in forwards; }
@keyframes reaction-magnify { from { opacity: .4; transform: translateY(.9rem) scale(.4); } }
@keyframes reaction-magnify-out { to { opacity: 0; transform: translateY(.6rem) scale(.55); } }
@media (prefers-reduced-motion: reduce) { .reaction-magnifier, .reaction-magnifier.is-leaving { animation: none; transition: none; } }
@media (prefers-reduced-motion: reduce) { .reaction-quick-glyph { transition: none; } }
