/* Language Characters bar (web/language-characters.js). Light and dark follow the app theme. */
.language-bar { --lb-bar: #f6f7fb; --lb-key: #fff; --lb-ink: #141a3a; --lb-ink2: #5b6180; --lb-line: rgba(20, 26, 58, .12); --lb-chip: #eef0f7; --lb-on: #7c5cff;
  position: fixed; z-index: 2147483000; box-sizing: border-box; padding: 6px 8px; background: var(--lb-bar); color: var(--lb-ink);
  border: 1px solid var(--lb-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(20, 26, 58, .16); font: 600 13px/1.2 Inter, system-ui, sans-serif; }
.language-bar[data-theme="dark"] { --lb-bar: #151827; --lb-key: #242840; --lb-ink: #f3f4ff; --lb-ink2: #a8adc9; --lb-line: rgba(255, 255, 255, .12); --lb-chip: #1d2135; --lb-on: #9b87ff; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.language-bar.is-docked { border-radius: 0; border-width: 1px 0 0; box-shadow: none; }
.language-bar[hidden] { display: none; }
.language-bar-head { display: flex; align-items: center; gap: 6px; margin: 2px 0 7px; min-width: 0; }
.language-bar-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.language-bar-lang { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 9px; border-radius: 9px; border: 1px solid var(--lb-line); background: var(--lb-chip); color: var(--lb-on) !important; font-size: 12.5px !important; font-weight: 700 !important; }
.language-bar-lang svg { flex: 0 0 auto; }
.language-bar-title { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-weight: 700; }
.language-bar-title svg { color: var(--lb-on); flex: 0 0 auto; }
.language-bar-tabs { display: flex; gap: 5px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: 4px; }
.language-bar-tabs::-webkit-scrollbar, .language-bar-keys::-webkit-scrollbar { display: none; }
.language-bar button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.language-bar-tab { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--lb-line); background: var(--lb-chip); color: var(--lb-ink2) !important; font-size: 12px !important; }
.language-bar-tab[aria-pressed="true"] { background: var(--lb-on); border-color: transparent; color: #fff !important; }
.language-bar-hide { flex: 0 0 auto; width: 34px; height: 40px; font-size: 18px !important; border-radius: 8px; border: 1px solid var(--lb-line); background: var(--lb-chip); color: var(--lb-ink2) !important; }
.language-bar-keys { display: flex; gap: 5px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.language-bar-key { flex: 1 0 38px; max-width: 56px; min-width: 38px; height: 40px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--lb-line); background: var(--lb-key); box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
  font-family: "Noto Sans", "Segoe UI", system-ui, sans-serif !important; font-size: 21px !important; font-weight: 400 !important; }
.language-bar-key:active { background: var(--lb-on); color: #fff !important; }
.language-bar-key.is-mark { font-size: 20px !important; }
.language-bar-shift { flex: 0 0 42px; max-width: none; min-width: 42px; font-size: 13px !important; font-weight: 700 !important; color: var(--lb-on) !important; }
.language-bar-shift[aria-pressed="true"] { background: var(--lb-on); color: #fff !important; }
.language-bar :focus-visible { outline: 2px solid var(--lb-on); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .language-bar:not([hidden]) { animation: language-bar-in .14s ease-out; } }
@keyframes language-bar-in { from { opacity: 0; transform: translateY(4px); } }

/* Profile › Settings › Preferences › Language Characters */
.language-characters-settings { --lc-on: #7c5cff; }
.language-characters-toggle { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(124, 92, 255, .35); cursor: pointer; }
.language-characters-toggle b, .language-characters-row b { display: block; font-size: 14px; }
.language-characters-toggle small, .language-characters-row small { display: block; opacity: .72; font-size: 12px; margin-top: 2px; font-weight: 500; }
.language-characters-toggle input { margin: 0 0 0 auto !important; appearance: none; -webkit-appearance: none; width: 46px !important; height: 28px !important; border: 0 !important; border-radius: 999px !important; background: rgba(124, 92, 255, .25) !important; position: relative; flex: 0 0 auto; cursor: pointer; transition: background .15s; }
.language-characters-toggle input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.language-characters-toggle input:checked { background: var(--lc-on) !important; }
.language-characters-toggle input:checked::after { transform: translateX(18px); }
.language-characters-settings input[type="search"] { width: 100%; box-sizing: border-box; margin-top: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(124, 92, 255, .25); background: transparent; color: inherit; font: inherit; font-size: 14px; }
.language-characters-list { display: grid; gap: 8px; margin-top: 10px; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.language-characters-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 14px; border: 1px solid rgba(124, 92, 255, .18); background: rgba(124, 92, 255, .04); color: inherit; font: inherit; cursor: pointer; }
.language-characters-row[aria-checked="true"] { border-color: var(--lc-on); background: rgba(124, 92, 255, .12); }
.language-characters-tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(124, 92, 255, .4); flex: 0 0 auto; font-size: 13px; color: #fff; }
.language-characters-row[aria-checked="true"] .language-characters-tick { background: var(--lc-on); border-color: var(--lc-on); }
.language-characters-name { min-width: 0; }
.language-characters-sample { margin-left: auto; font-size: 15px; letter-spacing: 2px; white-space: nowrap; font-family: "Noto Sans", system-ui, sans-serif; }
.language-characters-save { margin-top: 12px; width: 100%; padding: 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
