.editor-emotion-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;height:30px;min-width:30px;padding:5px;border:0;background:transparent;color:var(--sub);font:12px var(--sans);cursor:pointer}
.editor-emotion-button svg{width:18px;height:18px;flex-shrink:0}
.editor-emotion-button:hover,.editor-emotion-button[aria-expanded=true]{color:var(--ink);background:var(--soft,#f4f4f2)}
.field-head .editor-emotion-button,.fsedit-head .editor-emotion-button{margin-left:auto;margin-right:4px}
.field-head .editor-emotion-button~.editor-image-button,.fsedit-head .editor-emotion-button~.editor-image-button{margin-left:0}
.emotion-tools{display:flex;align-items:center;margin-top:4px;min-height:30px;flex:none}
body .app-field>.emotion-source{display:none!important}
body .app-field>.emotion-editor{height:140px;min-height:112px;max-height:min(420px,50dvh);padding-top:28px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;resize:vertical;overscroll-behavior:contain;cursor:text;user-select:text;-webkit-user-select:text}
body .app-field>.emotion-editor[data-empty=true]:not(:focus)~.app-field-label{top:17px;font-size:15px;color:var(--sub)}
body .app-field>.emotion-editor[aria-disabled=true]{background:var(--soft);color:var(--sub);cursor:not-allowed}
.emotion-editor .emotion-inline{display:inline-block;width:38px;height:38px;max-width:38px;object-fit:contain;vertical-align:middle;margin:1px 2px;user-select:all;-webkit-user-drag:none}
.emotion-picker[hidden],.emotion-picker-slot[hidden]{display:none!important}
.emotion-picker-slot{min-width:0;max-width:100%;width:100%;flex:none;margin-top:6px;overflow-anchor:none}
.emotion-picker{box-sizing:border-box;position:relative;width:100%;height:var(--emotion-picker-height,260px);padding:10px;border:1px solid var(--line);border-radius:5px;background:var(--surface,var(--bg));color:var(--text);font:13px/1.5 var(--sans);display:flex;flex-direction:column;gap:8px;overflow:hidden;overscroll-behavior:contain}
.emotion-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;min-height:20px}
.emotion-picker-head strong{font-size:12px;font-weight:500;letter-spacing:.05em}
.emotion-picker-close,.emotion-retry{border:0;background:transparent;color:var(--sub);font:12px var(--sans);padding:2px 0;cursor:pointer;flex:none}
.emotion-picker-close:hover,.emotion-retry:hover{color:var(--ink)}
.emotion-pack-strip{position:relative;display:flex;gap:5px;flex:none;min-width:0;overflow-x:auto;overflow-y:hidden;padding:2px 1px 5px;touch-action:pan-x;overscroll-behavior-x:contain;user-select:none;cursor:grab}
.emotion-pack-strip.is-dragging,.emotion-pack-strip.is-dragging *{cursor:grabbing}
.emotion-pack-tab{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;padding:3px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--text);font:13px var(--sans);cursor:pointer}
.emotion-pack-tab[aria-selected=true]{background:var(--soft);border-color:var(--border-strong,var(--line))}
.emotion-pack-tab:hover{background:var(--hover,var(--soft))}
.emotion-pack-tab img{display:block;width:30px;height:30px;object-fit:contain;user-select:none;-webkit-user-drag:none}
.emotion-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));grid-auto-rows:56px;align-content:start;gap:5px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:1px 3px 1px 0}
.emotion-choice{display:grid;place-items:center;height:56px;border:1px solid transparent;border-radius:4px;background:transparent;padding:3px;min-width:0;cursor:pointer;transition:background-color .15s}
.emotion-choice:hover{background:var(--soft,#f4f4f2);border-color:var(--line)}
.emotion-choice img{display:block;width:100%;height:100%;max-width:48px;max-height:48px;object-fit:contain;user-select:none;-webkit-user-drag:none}
html .emotion-picker button:focus-visible,html .editor-emotion-button:focus-visible{outline:1px solid var(--ink)!important;outline-offset:1px}
.emotion-picker-note{color:var(--sub);font-size:11px;height:17px;line-height:17px;flex:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.emotion-picker-status{color:var(--sub);display:grid;place-items:center;flex:1;grid-column:1/-1;min-height:0;text-align:center}
.fsedit-mask>.emotion-picker-slot{width:auto;margin:0 12px 12px}
.fsedit-mask>.app-field>.emotion-editor{flex:1;min-height:0;max-height:none;height:auto;resize:none}
.fsedit-mask:has(>.emotion-picker-slot:not([hidden])){height:min(100dvh,var(--emotion-viewport-height,100dvh));bottom:auto;overflow-y:auto}
.fsedit-mask:has(>.emotion-picker-slot:not([hidden]))>.app-field{min-height:86px}
.fsedit-mask:has(>.emotion-picker-slot:not([hidden]))>.app-field>.emotion-editor{min-height:86px}
@media(max-width:480px){.emotion-picker{padding:8px;gap:6px}.emotion-pack-tab{width:36px;height:36px;flex-basis:36px}.emotion-picker-grid{grid-template-columns:repeat(auto-fill,minmax(44px,1fr));grid-auto-rows:52px}.emotion-choice{height:52px}}
@media(prefers-reduced-motion:reduce){.emotion-choice{transition:none}}
