/* 符號表情工具 */
.em { --tc2: var(--tc, #e67700); }
.em-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.em-tabs button { flex: none; padding: 8px 14px; border: 1px solid var(--line, #ddd); border-radius: 99px; background: var(--card, #fff); color: inherit; font: inherit; font-size: 15px; cursor: pointer; white-space: nowrap; }
.em-tabs button.on { background: var(--tc2); border-color: var(--tc2); color: #fff; font-weight: 700; }
.em-find { margin: 0 0 8px; }
.em-find input { width: 100%; padding: 11px 14px; font-size: 16px; border-radius: 12px; }
.em-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.em-chips button { padding: 5px 12px; border: 1px solid var(--line, #ddd); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.em-chips button.on { background: color-mix(in srgb, var(--tc2) 16%, var(--card, #fff)); border-color: var(--tc2); color: var(--tc2); font-weight: 700; }
.em-tone { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; color: var(--sub, #666); }
.em-tone button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.em-tone button.on { border-color: var(--tc2); }
.em-body { min-height: 180px; padding-bottom: 8px; }

.em-grid { display: grid; gap: 6px; }
.em-grid.e { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
.em-grid.e.w { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.em-grid.s { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.em-grid.k { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.em-grid.p { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.em-c { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 4px; border: 1px solid var(--line, #e4e0d6); border-radius: 10px; background: var(--card, #fff); color: inherit; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif; font-size: 28px; line-height: 1.1; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.em-grid.s .em-c, .em-grid.p .em-c { font-size: 22px; min-height: 44px; font-family: system-ui, "Noto Sans CJK TC", "Segoe UI Symbol", sans-serif; }
.em-grid.k .em-c { min-height: 46px; font-size: 16px; font-family: system-ui, "Noto Sans CJK TC", "Segoe UI Symbol", sans-serif; overflow-wrap: anywhere; text-align: center; }
.em-c:hover { background: color-mix(in srgb, var(--tc2) 12%, var(--card, #fff)); border-color: var(--tc2); }
.em-c:active, .em-c.hit { transform: scale(.94); background: color-mix(in srgb, var(--tc2) 24%, var(--card, #fff)); }

.em-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.em-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--line, #e4e0d6); border-radius: 12px; background: var(--card, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.em-row:hover { border-color: var(--tc2); background: color-mix(in srgb, var(--tc2) 8%, var(--card, #fff)); }
.em-row .v { flex: 1; min-width: 0; font-size: 20px; line-height: 1.4; white-space: pre; overflow-x: auto; text-align: center; font-family: system-ui, "Noto Sans CJK TC", "Segoe UI Symbol", sans-serif; }
.em-row .l { flex: none; width: 5.2em; font-size: 12.5px; color: var(--sub, #666); }
.em-row .b { flex: none; font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--tc2); color: #fff; }
.em-fancy-in { width: 100%; min-height: 70px; margin-bottom: 10px; font-size: 18px; }
.em-empty { padding: 30px 10px; text-align: center; color: var(--sub, #777); }

.em-comp { position: sticky; bottom: 8px; display: flex; gap: 6px; align-items: center; margin-top: 10px; padding: 8px; border: 1px solid var(--line, #ddd); border-radius: 14px; background: var(--card, #fff); box-shadow: 0 4px 18px rgba(0,0,0,.14); z-index: 5; }
.em-comp input { flex: 1; min-width: 0; font-size: 18px; border-radius: 10px; }
.em-toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px); max-width: 86vw; padding: 9px 18px; border-radius: 99px; background: rgba(30,30,30,.92); color: #fff; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .em-toast, .em-c { transition: none; } }

.em-c.fl { flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.25; min-height: 56px; text-align: center; font-family: system-ui, "Noto Sans CJK TC", sans-serif; }
.em-c.fl b { font-weight: 600; overflow-wrap: anywhere; }
.em-c.fl small { color: var(--sub, #777); font-size: 11px; letter-spacing: 1px; }
.tl .em-fancy-in { min-height: 64px; margin-bottom: 12px; padding: 12px 14px; border: 2px solid var(--tc2); border-radius: 12px; background: color-mix(in srgb, var(--tc2) 9%, var(--card, #fff)); font-size: 19px; }
@media (min-width: 720px) { .em-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.em-row .v.w { white-space: normal; overflow-wrap: anywhere; overflow: visible; }
