/* Glass reaction capsules follow the bubble's outer top corner; no fixed avatar or chat colors. */
.uwu-reactions,.uwu-reaction-overlay {
    --uwu-reaction-glass:rgba(237,239,242,.76);
    --uwu-reaction-edge:rgba(255,255,255,.82);
    --uwu-reaction-text:#262a30;
    --uwu-reaction-button:rgba(255,255,255,.5);
}
@media(prefers-color-scheme:dark){
    .uwu-reactions,.uwu-reaction-overlay {--uwu-reaction-glass:rgba(48,49,55,.78);--uwu-reaction-edge:rgba(255,255,255,.23);--uwu-reaction-text:#f5f5f7;--uwu-reaction-button:rgba(255,255,255,.09);}
}
body.night-mode-active .uwu-reactions,body.night-mode-active .uwu-reaction-overlay {--uwu-reaction-glass:rgba(48,49,55,.78);--uwu-reaction-edge:rgba(255,255,255,.23);--uwu-reaction-text:#f5f5f7;--uwu-reaction-button:rgba(255,255,255,.09);}
#message-area .message-wrapper.uwu-has-reactions {position:relative!important;overflow:visible!important;padding-top:calc(var(--uwu-reaction-base-top,0px) + var(--uwu-reaction-top,40px))!important;padding-bottom:calc(var(--uwu-reaction-base-bottom,0px) + var(--uwu-reaction-bottom,8px))!important;}
.uwu-reactions {position:absolute;z-index:6;display:flex;gap:3px;max-width:min(220px,70vw);flex-wrap:wrap;pointer-events:auto;}
/* Exact Apple Cash sticker geometry from iMessage暗by小池: 20 / 7 / 3px circles. */
.uwu-reaction-chip {
    --uwu-reaction-shape:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2052%2052%22%3E%3Cg%20fill%3D%22white%22%3E%3Ccircle%20cx%3D%2221%22%20cy%3D%2221%22%20r%3D%2220%22%2F%3E%3Ccircle%20cx%3D%2236%22%20cy%3D%2236%22%20r%3D%227%22%2F%3E%3Ccircle%20cx%3D%2246%22%20cy%3D%2246%22%20r%3D%223%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    --uwu-reaction-outline:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52'%3E%3Cg fill='none' stroke='white' stroke-width='.85'%3E%3Cpath d='M29.6848 39.0152 A20 20 0 1 1 39.0152 29.6848 A7 7 0 1 1 29.6848 39.0152 Z'/%3E%3Ccircle cx='46' cy='46' r='3'/%3E%3C/g%3E%3C/svg%3E");
    position:relative;isolation:isolate;flex:0 0 48px;width:48px;height:48px;min-width:0;padding:0;
    border-radius:0;border:0;background:transparent;color:var(--uwu-reaction-text);font-size:22px;line-height:1;
    box-shadow:none;cursor:pointer;margin:0;overflow:visible;
}
.uwu-reaction-chip::before,.uwu-reaction-chip::after {content:'';position:absolute;inset:0;pointer-events:none;}
.uwu-reaction-chip::before {background:var(--uwu-reaction-glass);-webkit-mask:var(--uwu-reaction-shape) center/contain no-repeat;mask:var(--uwu-reaction-shape) center/contain no-repeat;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);}
/* Outline the union so the joined circles have no seam across the middle. */
.uwu-reaction-chip::after {background:var(--uwu-reaction-edge);-webkit-mask:var(--uwu-reaction-outline) center/contain no-repeat;mask:var(--uwu-reaction-outline) center/contain no-repeat;}
.uwu-reaction-label {position:absolute;left:0;top:0;width:81%;height:81%;display:flex;align-items:center;justify-content:center;white-space:nowrap;}
.sent .uwu-reaction-chip::before,.sent .uwu-reaction-chip::after {transform:scaleX(-1);}
.sent .uwu-reaction-label {left:auto;right:0;}
.uwu-reaction-chip,.uwu-reaction-grid button {font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif!important;}
.uwu-reaction-overlay {position:fixed;inset:0;z-index:15000;background:#0005;display:flex;align-items:flex-end;justify-content:center;padding:16px 12px max(16px,env(safe-area-inset-bottom));box-sizing:border-box;}
.uwu-reaction-panel {width:100%;max-width:410px;max-height:85dvh;overflow:auto;box-sizing:border-box;border-radius:24px;padding:18px;background:var(--uwu-reaction-glass);color:var(--uwu-reaction-text);border:1px solid var(--uwu-reaction-edge);box-shadow:0 12px 50px #0003;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);}
.uwu-reaction-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;}
.uwu-reaction-heading h3 {font-size:17px;margin:0;}
.uwu-reaction-panel button {cursor:pointer;border:1px solid var(--uwu-reaction-edge);color:var(--uwu-reaction-text);background:var(--uwu-reaction-button);border-radius:12px;padding:9px;}
.uwu-reaction-heading button {width:34px;height:34px;font-size:22px;line-height:1;}
.uwu-reaction-preview {font-size:13px;line-height:1.5;opacity:.7;max-height:40px;overflow:hidden;overflow-wrap:anywhere;}
.uwu-reaction-grid {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;}
.uwu-reaction-grid button {font-size:25px;min-height:43px;padding:6px 2px;}
.uwu-reaction-grid .is-selected {outline:2px solid #8ba9cd;outline-offset:-2px;}
.uwu-reaction-custom {display:flex;gap:8px;margin-top:14px;}
.uwu-reaction-custom input {flex:1;min-width:0;background:var(--uwu-reaction-button);color:var(--uwu-reaction-text);border:1px solid var(--uwu-reaction-edge);border-radius:12px;padding:10px;font-size:16px;}
.uwu-reaction-custom input::placeholder {color:var(--uwu-reaction-text);opacity:.6;}
.uwu-reaction-status,.uwu-reaction-existing {font-size:12px;line-height:1.5;margin:8px 0;overflow-wrap:anywhere;}
.uwu-reaction-remove {width:100%;margin-top:6px;}
.uwu-reaction-remove[hidden] {display:none;}
@media(prefers-reduced-motion:reduce){.uwu-reactions{animation:none!important;}}
/* IG: compact oval stickers under the message, with a real transparent gap. */
.uwu-reaction-style-ig {--uwu-reaction-glass:rgba(239,240,243,.96);gap:3px;max-width:min(220px,70vw);}
.uwu-reaction-style-ig .uwu-reaction-chip {flex:0 0 auto;width:auto;min-width:28px;height:24px;padding:0 5px;box-sizing:border-box;font-size:16px;border-radius:999px;}
.uwu-reaction-style-ig .uwu-reaction-chip::before {border-radius:999px;-webkit-mask:none;mask:none;transform:none;backdrop-filter:none;-webkit-backdrop-filter:none;}
.uwu-reaction-style-ig .uwu-reaction-chip::after {display:none;}
.uwu-reaction-style-ig .uwu-reaction-label {position:relative;inset:auto;width:auto;height:100%;min-width:18px;}
@media(prefers-color-scheme:dark){.uwu-reaction-style-ig {--uwu-reaction-glass:rgba(38,40,45,.98);}}
body.night-mode-active .uwu-reaction-style-ig {--uwu-reaction-glass:rgba(38,40,45,.98);}
