/* 반응 고르기(r22) — web/inputs.js 의 조각. style.css 의 낱말(색·둥글기·글자 4단·굵기 2단)만 쓴다.
   입력칸 왼쪽 아래 '반응' 단추(사진 단추 옆 · 고르기 전에는 아이콘만) → 입력칸 위 메뉴(사진 팝오버와 같은 자리) · 영상 아래 반응 줄(라이다 줄과 같은 꼴)
   고른 것 = 회색 면(--sel-bg) / 누르는 것 = 하늘(--ink · --tint) — r34 규칙 그대로 */
/* button.icon(36×36 · padding 0)보다 앞서게 id 로 */
#reactBtn { flex: none; gap: 6px; width: auto; min-width: 36px; white-space: nowrap; }
#reactBtn .rlbl:empty { display: none; }
#reactBtn.on { height: 32px; padding: 0 12px 0 10px; border-radius: var(--pill); background: var(--tint); color: var(--ink); font-size: var(--f3); }
#reactBtn.on:hover, #reactBtn.on[aria-expanded="true"] { background: var(--tint2); color: var(--ink); }
#reactBtn.on svg { flex: none; width: 16px; height: 16px; }
/* 몸 움직임 동안은 카메라 줄 하나만 — 마우스 터치 줄('영상을 눌러 보세요')은 겹쳐 보이지 않게 */
body.react-cam #touchBar { display: none; }

.composer > .reactmenu { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 41; width: min(320px, 100%); padding: 8px; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); }
.reactmenu .rh { padding: 6px 12px 8px; font-size: var(--fu); font-weight: 600; color: var(--text); }
.reactmenu .rh small { display: block; margin: 2px 0 0; font-weight: 400; color: var(--muted); }
.reactmenu button { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; align-items: center; text-align: left; border: 0; background: none; border-radius: var(--r1); padding: 8px 12px 8px 8px; }
.reactmenu button:hover { background: var(--hover); }
.reactmenu button[aria-checked="true"] { background: var(--sel-bg); }
.reactmenu .rck { grid-row: 1 / span 2; display: inline-flex; color: var(--text); visibility: hidden; }
.reactmenu button[aria-checked="true"] .rck { visibility: visible; }
.reactmenu .rt { font-size: var(--fu); color: var(--text); }
.reactmenu .rd { grid-column: 2; font-size: var(--f3); line-height: 1.4; color: var(--muted); }
.reactmenu button[aria-disabled="true"] { cursor: default; }
.reactmenu button[aria-disabled="true"]:hover { background: none; }
.reactmenu button[aria-disabled="true"] .rt { color: var(--muted); }

/* 빈 대화(결과 없음 · 넓은 화면)는 입력칸이 가운데라 사진 팝오버처럼 아래로 연다 */
@media (min-width: 901px) {
  #main:has(#vers:empty) .right:has(#chatLog:empty) .composer > .reactmenu { bottom: auto; top: calc(100% + 10px); }
}

/* 영상 아래 반응 줄 — .touchbar 와 같은 꼴 */
.reactbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 10px 0 0; font-size: var(--f3); }
.reactbar[hidden] { display: none; }
.reactbar .rb-h { font-weight: 600; }
.reactbar button { font-size: var(--f3); padding: 3px 10px; }
.reactbar .rb-src { display: inline-flex; gap: 4px; }
.reactbar .rb-src[hidden] { display: none; }
.reactbar .rb-src button[aria-pressed="true"] { background: var(--sel-bg); border-color: transparent; }
.reactbar .rb-src button:disabled { color: var(--ph); cursor: default; background: #fff; }
.reactbar .rb-info { min-width: 0; }
.reactbar .rb-info.fname { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reactbar .rb-info:empty { display: none; }
.reactbar .rb-sug { color: var(--ink); background: var(--tint); border-color: transparent; }
.reactbar .rb-sug:hover { background: var(--tint2); }
.reactbar .rb-cam { flex: none; width: 56px; height: 32px; padding: 0; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: var(--hover); }
.reactbar .rb-cam[hidden] { display: none; }
.reactbar .rb-cam video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.reactbar .rb-cam.off video { visibility: hidden; }
.reactbar .rb-meter { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; }
.reactbar .rb-meter[hidden] { display: none; }
.reactbar .rb-meter i { width: 4px; height: 100%; border-radius: 2px; background: var(--accent); transform-origin: 50% 100%; transform: scaleY(.08); }

/* 손·몸 움직임을 고른 동안: 영상 위 손가락이 화면 끌기로 새지 않게(휴대폰·태블릿 여러 손가락) */
body.react-touch .viewer canvas { touch-action: none; }

