@charset "UTF-8";

/* Keep the workspace compact when optional introduction and status UI is hidden. */
body main.main { padding-top: 24px; }

.emoji-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.emoji-control label { color: var(--text); font-size: 12px; }
.emoji-control .select { min-width: 134px; font-size: 18px; }
.replacement-preview { display: block; flex: 1; min-width: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--paper); font-size: 15px; overflow-wrap: anywhere; }
.mapping-tag { display: inline-flex; align-items: center; padding: 2px 5px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 4px; font-size: 10px; white-space: nowrap; }
.mapped-emoji { font-size: 24px; line-height: 1.5; }
.emoji-quick-picks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.emoji-quick-picks > button:not(.text-btn) { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 22px; }
.emoji-quick-picks > button:hover { background: var(--accent-soft); }
.emoji-quick-picks .text-btn { margin-left: auto; }
.mapping-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 16px; border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 13px; cursor: pointer; }
.mapping-toggle input { margin-top: 4px; accent-color: var(--accent); }
.mapping-toggle small { display: block; margin-top: 4px; color: var(--text); font-size: 12px; line-height: 1.7; }
.mapping-live-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; min-height: 72px; padding: 16px; margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mapping-live-preview > span { font-size: 15px; overflow-wrap: anywhere; }
.mapping-live-preview > strong { font-size: 26px; font-weight: 500; }
.replacement-row > .replacement-preview { white-space: normal; overflow-wrap: anywhere; font-size: 15px; }
.match-row .match-top { align-items: flex-start; }
.match-row .match-top > div { flex-wrap: wrap; }
.match-row .word-chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.match-row .match-top .category { max-width: 38%; white-space: normal; overflow-wrap: anywhere; }

:root {
  color-scheme: light;
  --paper: #f7f8fa;
  --surface: #fff;
  --ink: #272a2e;
  --text: #4c5158;
  --muted: #92979f;
  --line: #e9ebef;
  --accent: #dc6545;
  --accent-dark: #c95132;
  --accent-soft: #fcf0eb;
  --green: #3f8a6a;
  --green-soft: #eef7f2;
  --amber: #ac7a29;
  --amber-soft: #fff5df;
  --sidebar: 216px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { outline: none; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, a, input, select, textarea { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease; }
button:focus-visible, a:focus-visible { outline: 3px solid #dc65454d; outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: #df947e; box-shadow: 0 0 0 3px #dc654515; }
a { color: inherit; text-decoration: none; }
svg { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
button { border: 0; background: none; }
[hidden] { display: none !important; }
::selection { background: #f9dfad; color: #333; }

/* The classic bootstrap reveals this only inside the Windows WebView. */
#startup-screen {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  background: #f7f8fa;
  pointer-events: auto;
  user-select: none;
  animation: startup-fail-open 4.8s step-end forwards;
}
#startup-surface {
  position: fixed;
  z-index: 0;
  width: 96px;
  height: 96px;
  border-radius: 22.08px;
  background: #e67352;
  border: 1px solid #e8ebef;
  pointer-events: none;
}
#startup-logo { position: relative; z-index: 1; width: 96px; height: 96px; transform-origin: center; }
#startup-logo > svg { display: block; width: 100%; height: 100%; overflow: visible; }
#startup-logo .startup-tile, #startup-logo .startup-replacement { transform-box: fill-box; transform-origin: center; }
html[data-startup-phase="aggregating"] .startup-tile { animation: startup-tile-in 400ms cubic-bezier(.2,.7,.2,1) both; }
html[data-startup-phase="aggregating"] .startup-corner { animation: startup-mark-in 400ms cubic-bezier(.2,.7,.2,1) both; }
.startup-corner-tl { --startup-x: -6px; --startup-y: -6px; }
.startup-corner-tr { --startup-x: 6px; --startup-y: -6px; }
.startup-corner-bl { --startup-x: -6px; --startup-y: 6px; }
.startup-corner-br { --startup-x: 6px; --startup-y: 6px; }
html[data-startup-phase="aggregating"] .startup-line { --startup-x: -7px; --startup-y: 0px; animation: startup-mark-in 400ms cubic-bezier(.2,.7,.2,1) both; }
html[data-startup-phase="aggregating"] .startup-replacement { animation: startup-replacement-in 400ms cubic-bezier(.2,.7,.2,1) both; }
html[data-startup-morph="true"][data-startup-phase="flying"] .main { animation: startup-workspace-in 700ms ease-out both; }
html[data-startup-morph="true"][data-startup-phase="flying"] .sidebar { animation: startup-chrome-in 700ms ease-out both; }
html[data-startup-morph="true"][data-startup-phase="flying"] .brand-mark { animation: startup-brand-arrive 700ms linear both; }
@keyframes startup-tile-in { from { opacity: .82; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes startup-mark-in { from { opacity: .15; transform: translate(var(--startup-x), var(--startup-y)); } to { opacity: 1; transform: translate(0, 0); } }
@keyframes startup-replacement-in { from { opacity: .15; transform: scale(.65); } to { opacity: 1; transform: scale(1); } }
@keyframes startup-workspace-in { from, 45% { opacity: 0; } to { opacity: 1; } }
@keyframes startup-chrome-in { from, 35% { opacity: 0; } to { opacity: 1; } }
@keyframes startup-brand-arrive { from, 78% { opacity: 0; } to { opacity: 1; } }
/* A failed bootstrap must never leave an interactive page behind a screen. */
@keyframes startup-fail-open { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) {
  #startup-logo *, html[data-startup-native="true"][data-startup-phase="flying"] .main,
  html[data-startup-native="true"][data-startup-phase="flying"] .sidebar { animation: none !important; }
  html[data-startup-native="true"][data-startup-phase="flying"] .brand-mark { animation: none; }
}

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar); padding: 32px 18px 20px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 1px 12px; }
.brand-mark { display: block; width: 36px; height: 36px; border-radius: 23%; box-shadow: 0 3px 6px #dc654518; }
.brand-name { color: #2e3035; font-size: 23px; font-weight: 700; line-height: 1.1; letter-spacing: 2px; }
.brand-en, .brand small { display: block; margin-top: 4px; color: #969ba3; font-size: 8px; font-weight: 600; line-height: 1.2; letter-spacing: 2px; }
.beta-tag { display: inline-flex; align-items: center; padding: 1px 5px; border: 1px solid #eadfd4; border-radius: 4px; color: #a58b6e; background: #fbf7f1; font-size: 9px; line-height: 1.4; letter-spacing: .4px; }
.nav, .sidebar nav { display: flex; flex-direction: column; gap: 7px; margin-top: 46px; }
.nav-item, .sidebar nav > button, .sidebar nav > a { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 10px 15px; border-radius: 8px; color: #747a84; font-size: 13px; text-align: left; font-weight: 500; }
.nav-item svg, .sidebar nav > button svg, .sidebar nav > a svg { width: 18px; height: 18px; color: #8b919b; }
.nav-item:hover, .sidebar nav > button:hover, .sidebar nav > a:hover { background: #f7f8fa; color: #343940; }
.nav-item.active, .sidebar nav > button.active, .sidebar nav > a.active { background: var(--accent-soft); color: #cc5f42; font-weight: 600; }
.nav-item.active svg, .sidebar nav > button.active svg, .sidebar nav > a.active svg { color: var(--accent); }
.nav-divider { height: 1px; margin: 18px 15px; background: var(--line); }
.nav-section-label { padding: 0 15px; color: #b0b4bb; font-size: 10px; letter-spacing: 1px; }
.sidebar-bottom { margin-top: auto; padding: 28px 11px 0; }
.privacy-card, .shared-card { padding: 13px 12px; background: #f8f9fa; border: 1px solid #eef0f2; border-radius: 9px; }
.privacy-card > svg, .shared-card > svg { width: 16px; height: 16px; color: #939ca4; }
.privacy-card h4, .shared-card h4 { margin: 7px 0 4px; font-size: 11px; font-weight: 500; color: #656e78; }
.privacy-card p, .shared-card p { color: #a1a7ae; font-size: 10px; line-height: 1.9; }
.sidebar-version { padding-top: 20px; color: #b7bbc2; font-size: 10px; text-align: center; letter-spacing: .4px; }
.shared-dot { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: #62a27d; vertical-align: 2px; box-shadow: 0 0 0 3px #62a27d0d; }
.mobile-brand { display: none; }

main, .main { margin-left: var(--sidebar); padding: 0 42px 36px; min-height: 100vh; }
.main-inner, .page-content, .content-container { max-width: 1260px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 80px; max-width: 1260px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #9ba0a8; font-size: 11px; }
.breadcrumb svg { width: 13px; height: 13px; color: #b8bdc5; }
.breadcrumb strong, .breadcrumb .current { font-weight: 400; color: #616975; }
.breadcrumb .separator { color: #c5c9cf; }
.topbar-actions, .user-menu { display: flex; align-items: center; gap: 17px; }
.topbar-divider { height: 19px; width: 1px; background: #e2e5e9; }
.avatar, .user-avatar { display: grid; place-items: center; width: 31px; height: 31px; border: 3px solid #fff; border-radius: 50%; background: #e9e9df; color: #838a73; font-size: 11px; font-weight: 600; box-shadow: 0 0 0 1px #e9ebed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; padding: 0; color: #9198a2; border: 1px solid transparent; border-radius: 7px; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: #4a515b; background: #eef0f3; }
.icon-btn.bordered { background: #fff; border-color: var(--line); }
.view { max-width: 1260px; margin: 0 auto; animation: view-in .22s ease both; }
.hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 152px; padding: 13px 0 25px; }
.hero-copy { max-width: 700px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; color: #a2a5ab; font-size: 9px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 17px; height: 1px; background: #c6a48e; }
.hero h1 { color: #2a2d32; font-size: 34px; font-weight: 650; line-height: 1.45; letter-spacing: -1.2px; }
.hero h1 span { color: var(--accent); }
.hero p { margin-top: 10px; color: #8c929c; font-size: 12px; line-height: 1.9; }
.hero-art { width: 180px; height: 135px; margin-right: 35px; }
.hero-art svg { width: 180px; height: 135px; stroke-width: 1.1; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 22px; }
.platform-bar { display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 14px; }
.platform-caption { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.platform-options {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  padding: 3px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #d9dde3 transparent;
}
.supported-platform {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 62px;
  min-height: 66px;
  padding: 8px 9px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}
.supported-platform svg { width: 28px; height: 28px; stroke: none; }
.platform-icon { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1; }
.platform-icon svg { width: 14px; height: 14px; }
.platform-icon.red, .platform-icon.xiaohongshu { color: #ed5768; }
.platform-icon.green, .platform-icon.wechat { color: #6b9b77; }
.platform-icon.blue, .platform-icon.douyin { color: #5c697b; }
.toolbar-note { display: flex; align-items: center; gap: 5px; color: #a2a8b0; font-size: 10px; white-space: nowrap; }
.toolbar-note svg { width: 13px; height: 13px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.panel { min-width: 0; background: #fff; border: 1px solid #e8ebef; border-radius: 12px; box-shadow: 0 3px 9px #25314b02; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 61px; padding: 19px 22px 17px; border-bottom: 1px solid #f0f1f4; }
.panel-title { display: flex; align-items: center; gap: 9px; }
.panel-head h2 { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; letter-spacing: .2px; }
.panel-head h2 > svg { color: #8a939f; width: 17px; height: 17px; }
.panel-head small, .panel-head .panel-note { color: #a1a7b0; font-size: 10px; }
.count-badge, .panel-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 18px; padding: 0 5px; border-radius: 4px; color: #a0a6af; background: #f3f5f7; font-size: 10px; font-weight: 400; }
.editor-panel { display: flex; flex-direction: column; }
.editor-wrap { position: relative; min-height: 335px; flex: 1; overflow: hidden; }
.editor-wrap textarea, .highlight-layer { margin: 0; padding: 21px 23px; border: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 2.05; letter-spacing: .3px; word-break: break-word; overflow-wrap: break-word; white-space: pre-wrap; tab-size: 4; }
.editor-wrap textarea { display: block; position: relative; z-index: 1; width: 100%; min-height: 335px; height: 100%; color: #515965; background: transparent; resize: none; caret-color: var(--accent); }
.editor-wrap textarea::placeholder { color: #b2b8c1; font-size: 12px; letter-spacing: .2px; }
.editor-wrap textarea:focus-visible { box-shadow: none; }
.highlight-layer { position: absolute; inset: 0; color: transparent; pointer-events: none; overflow: hidden; }
.highlight-layer mark { background: #ffeac2; color: transparent; border-bottom: 1px solid #e9bc6f; border-radius: 2px; padding: 1px 0; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; min-height: 43px; margin: 0 22px; padding: 10px 0; border-top: 1px solid #f0f2f5; color: #a7adb7; font-size: 10px; }
.editor-counter strong { color: #7c8591; font-weight: 500; }
.editor-footer .text-actions { display: flex; align-items: center; gap: 15px; }
.actions { display: flex; align-items: center; gap: 10px; padding: 15px 22px 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 8px 17px; border: 1px solid transparent; border-radius: 6px; color: #6c737d; background: #f7f8fa; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 3px 6px #dc654515; }
.btn.primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 4px 9px #dc65452b; }
.btn.primary:active:not(:disabled) { transform: translateY(1px); }
#scan[aria-busy="true"] { cursor: wait; opacity: 1; }
.scan-spinner { width: 15px; height: 15px; flex: 0 0 15px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: scan-spin .8s linear infinite; }
@keyframes scan-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .scan-spinner { animation: none; } }
.btn.secondary { border-color: #e4e7eb; background: #fff; color: #7f8792; }
.btn.secondary:hover:not(:disabled) { background: #f8f9fb; border-color: #d0d5dc; color: #515b68; }
.btn.ghost { background: transparent; color: #8b939e; }
.btn.ghost:hover:not(:disabled) { background: #f0f2f5; color: #59616d; }
.btn.danger { background: #fff1ee; border-color: #f3d9d3; color: #cf6956; }
.btn.danger:hover:not(:disabled) { background: #ffe6df; }
.btn.small { min-height: 29px; padding: 5px 10px; font-size: 10px; border-radius: 5px; }
.btn.small svg { width: 12px; height: 12px; }
.text-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0; color: #a0a6af; font-size: 10px; }
.text-btn svg { width: 12px; height: 12px; }
.text-btn:hover { color: var(--accent); }
.actions .text-btn { margin-left: auto; }
.result-panel { display: flex; flex-direction: column; }
.result-summary { display: flex; align-items: center; gap: 25px; margin: 0 22px; padding: 17px 0; border-bottom: 1px solid #f0f1f4; }
.summary-stat { display: flex; align-items: baseline; gap: 5px; color: #9ca2ac; font-size: 10px; }
.summary-stat strong { color: #606a76; font-size: 22px; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.summary-stat:first-child strong { color: #d0864a; }
.summary-stat .stat-label { color: #959da7; font-size: 10px; }
.status-label { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 3px 8px; border-radius: 4px; background: var(--amber-soft); color: #bd914d; font-size: 10px; white-space: nowrap; }
.status-label svg { width: 12px; height: 12px; }
.status-label.success, .status-label.safe { color: #5c9a79; background: #eff7f2; }
.result-list { flex: 1; min-height: 247px; max-height: 330px; overflow: auto; padding: 1px 22px 0; scrollbar-width: thin; scrollbar-color: #e5e8ec transparent; }
.match-row { padding: 15px 0 14px; border-bottom: 1px solid #f0f1f4; }
.match-row:last-child { border-bottom: 0; }
.match-header, .match-line { display: flex; align-items: center; gap: 8px; }
.word-chip { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 3px; background: #fff3dc; color: #bd914b; font-size: 12px; line-height: 1.8; font-weight: 500; }
.category { color: #b1a17e; background: #faf7f0; border: 1px solid #f0eadd; padding: 1px 5px; border-radius: 3px; font-size: 9px; line-height: 1.5; }
.match-count { margin-left: auto; color: #a7aeb8; font-size: 9px; }
.match-context { margin-top: 8px; font-size: 11px; color: #9aa1ac; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replacement-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.replacement-row > span, .replacement-row > label { color: #a4abb5; font-size: 9px; white-space: nowrap; }
.replacement-row input { min-width: 0; width: 100%; height: 26px; padding: 3px 8px; border: 1px solid #e9ebef; border-radius: 4px; color: #7d8793; background: #fcfcfd; font-size: 10px; }
.replacement-row .text-btn { margin-left: auto; flex-shrink: 0; color: #b48e78; }
.result-empty { display: flex; min-height: 320px; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; text-align: center; color: #b0b6bf; }
.result-empty > svg, .result-empty .empty-icon { width: 55px; height: 55px; margin-bottom: 17px; color: #ced5dc; stroke-width: 1; }
.result-empty h3 { color: #9099a6; font-weight: 500; font-size: 12px; }
.result-empty p { margin-top: 6px; color: #b0b7c0; font-size: 10px; }
.result-footer { display: flex; align-items: center; gap: 5px; min-height: 51px; margin: 0 22px; padding: 12px 0; border-top: 1px solid #f0f1f4; color: #b0b6bf; font-size: 9px; line-height: 1.8; }
.result-footer svg { width: 12px; height: 12px; color: #bdc3cb; }
.result-footer .text-btn { margin-left: auto; }
.guide-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 25px; padding: 22px 5px; border-top: 1px solid #e7e9ed; }
.guide-item { display: flex; align-items: flex-start; gap: 11px; }
.guide-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; color: #a9a395; background: #f0efe9; border-radius: 7px; }
.guide-icon svg { width: 15px; height: 15px; stroke-width: 1.5; }
.guide-item h3 { margin: 1px 0 4px; color: #7f8792; font-size: 11px; font-weight: 500; }
.guide-item p { color: #acb2bb; font-size: 10px; line-height: 1.9; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 15px; color: #adb3bc; font-size: 9px; }
.privacy-note svg { width: 11px; height: 11px; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 29px 0 26px; }
.section-title h1 { color: #30343a; font-size: 28px; font-weight: 600; letter-spacing: -.5px; }
.section-title p { color: #939ba6; font-size: 12px; margin-top: 7px; }
.button-group, .header-actions { display: flex; align-items: center; gap: 9px; }
.library-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { position: relative; display: flex; align-items: center; gap: 15px; min-height: 102px; padding: 21px 25px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.stat-card > svg, .stat-card .stat-icon { display: grid; place-items: center; width: 37px; height: 37px; padding: 9px; background: #f6f5f2; border-radius: 9px; color: #aa9f8e; }
.stat-card:nth-child(2) > svg { color: #8ba28d; background: #f1f6f0; }
.stat-card:nth-child(3) > svg { color: #c39479; background: #fcf1eb; }
.stat-number { color: #4a525e; font-size: 25px; font-weight: 500; line-height: 1.4; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat-card p, .stat-card .stat-title, .stat-card .stat-label { color: #a0a7b2; font-size: 10px; }
.stat-card small { position: absolute; right: 20px; top: 20px; color: #a5b3a5; font-size: 9px; }
.library-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px 22px; }
.search-field { display: flex; align-items: center; gap: 8px; width: 265px; max-width: 100%; height: 34px; padding: 0 11px; border: 1px solid #e6e9ee; border-radius: 6px; background: #fff; color: #a7adb7; }
.search-field svg { width: 14px; height: 14px; }
.search-field input { min-width: 0; width: 100%; padding: 0; border: none; background: transparent; color: #5f6a77; font-size: 11px; box-shadow: none; }
.search-field input::placeholder { color: #b1b7c0; }
.search-field:focus-within { border-color: #e5ad9b; box-shadow: 0 0 0 3px #dc65450b; }
.search-field input:focus-visible { box-shadow: none; }
.select { height: 34px; min-width: 113px; padding: 0 28px 0 11px; border: 1px solid #e6e9ee; border-radius: 6px; background-color: #fff; color: #8c95a1; font-size: 11px; }
.library-tools .tools-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.filter-tabs { display: flex; align-items: center; gap: 20px; min-height: 43px; padding: 0 23px; border-bottom: 1px solid var(--line); }
.filter-tabs button { position: relative; height: 43px; padding: 9px 0; color: #a3abb6; font-size: 11px; }
.filter-tabs button.active { color: #c87055; font-weight: 500; }
.filter-tabs button.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); border-radius: 2px; }
.filter-tabs button span { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 15px; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: #f1f3f6; color: #a5adb9; font-size: 9px; }
.filter-tabs button.active span { color: #c78b76; background: #fcf1ed; }
.table-wrap { width: 100%; overflow-x: auto; }
.term-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.term-table th { height: 44px; padding: 11px 20px; border-bottom: 1px solid #edf0f3; background: #fafbfc; color: #9ca5b2; font-size: 10px; font-weight: 400; }
.term-table td { height: 60px; padding: 15px 20px; border-bottom: 1px solid #f0f2f5; color: #919ba8; font-size: 11px; }
.term-table th:first-child, .term-table td:first-child { padding-left: 24px; }
.term-table th:last-child, .term-table td:last-child { padding-right: 24px; text-align: right; }
.term-table tbody tr:hover { background: #fdfcfa; }
.term-table tr:last-child td { border-bottom: 0; }
.term-label { color: #616d7c; font-size: 12px; font-weight: 500; }
.term-label + small { display: block; color: #b2bac4; font-size: 9px; margin-top: 2px; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 2px 6px; border: 1px solid #e9edf2; border-radius: 4px; background: #f7f8fa; color: #9ca6b4; font-size: 9px; line-height: 1.5; font-weight: 400; }
.badge.success { background: #f0f7f2; border-color: #e1efe5; color: #79a38a; }
.badge.warning { background: #fffaee; border-color: #f6ecd3; color: #bf9b60; }
.badge.danger { background: #fdf1ed; border-color: #f4dfd8; color: #cf8d79; }
.badge.neutral { background: #f4f6f9; border-color: #e8ecf1; color: #95a0b0; }
.row-actions { display: flex; justify-content: flex-end; gap: 12px; }
.row-actions button { color: #a2abba; padding: 2px; }
.row-actions button:hover { color: var(--accent); }
.row-actions svg { width: 14px; height: 14px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 22px; border-top: 1px solid #eef0f3; color: #abb3be; font-size: 10px; }
.pagination-buttons { display: flex; gap: 5px; align-items: center; }
.pagination button { display: grid; place-items: center; min-width: 26px; height: 26px; border: 1px solid #e9edf2; border-radius: 4px; color: #a3adba; font-size: 10px; background: #fff; }
.pagination button.active { color: #c87c64; background: #fcf2ee; border-color: #efd7ce; }
.pagination button svg { width: 12px; height: 12px; }
.empty-table { padding: 65px 20px; text-align: center; color: #a7b0bd; font-size: 12px; }
.empty-table svg { width: 37px; height: 37px; display: block; margin: 0 auto 15px; color: #ccd3dc; }
.admin-note { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; padding: 15px 18px; background: #f0f2f4; border: 1px solid #e7ebef; border-radius: 8px; color: #909ba9; font-size: 11px; line-height: 1.9; }
.admin-note > svg { width: 15px; height: 15px; margin-top: 3px; color: #9da9b7; }
.admin-note strong { color: #737f8e; font-weight: 500; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.activity-list { padding: 4px 23px 7px; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 17px 0; border-bottom: 1px solid #f0f2f5; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; background: #f6f8fa; border-radius: 7px; color: #aab4c0; }
.activity-icon svg { width: 13px; height: 13px; }
.activity-item p { color: #8b97a6; font-size: 11px; }
.activity-item small { display: block; margin-top: 4px; color: #b4bcc7; font-size: 9px; }
.activity-time { margin-left: auto; color: #b1bac7; font-size: 9px; white-space: nowrap; }
.howto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.help-card { padding: 28px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.help-card > svg { width: 26px; height: 26px; margin-bottom: 22px; color: #c3967b; stroke-width: 1.3; }
.help-card h2, .help-card h3 { color: #647181; font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.help-card p { color: #a1adbb; font-size: 11px; line-height: 2; }
.help-card ol, .help-card ul { margin: 10px 0 0; padding-left: 18px; color: #a1adbb; font-size: 11px; line-height: 2.2; }
.help-note { margin-top: 22px; padding: 23px; border-radius: 10px; background: #f0f2f4; color: #98a4b3; font-size: 11px; line-height: 2; }
.toggle { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }

.modal { width: 600px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid #e7e9ed; border-radius: 13px; background: #fff; color: var(--ink); box-shadow: 0 25px 90px #202d4926; overflow-y: auto; }
.modal::backdrop { background: #27304466; backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .2s ease both; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 27px 20px; border-bottom: 1px solid #eef0f3; }
.modal-header h2 { color: #414954; font-size: 18px; font-weight: 600; }
.modal-header p { margin-top: 5px; color: #a4adb9; font-size: 11px; }
.modal-header .icon-btn { margin: -3px -7px 0 0; }
.modal-header .icon-btn[data-close] { flex: 0 0 44px; width: 44px; height: 44px; margin: -8px -8px -8px 0; }
.modal-body { padding: 23px 27px; }
.rightbao-login-fields { display: grid; gap: 16px; }
.login-method-tabs { margin: 0; padding: 16px 27px 0; }
.rightbao-login-error { margin: 0; color: var(--accent, #dc6545); font-size: 13px; line-height: 1.6; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 17px 27px; border-top: 1px solid #eef0f3; background: #fcfcfd; }
.modal-footer > span, .modal-footer > p { margin-right: auto; color: #abb4c0; font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 19px 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full, .full { grid-column: 1 / -1; }
.field label, .login-field label { display: block; color: #8591a0; font-size: 11px; }
.field label .required { color: var(--accent); }
.field input, .field select, .field textarea, .login-field input { width: 100%; height: 38px; padding: 8px 11px; border: 1px solid #e3e8ee; border-radius: 6px; background: #fff; color: #677586; font-size: 12px; }
.field textarea { height: 76px; min-height: 76px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .login-field input::placeholder { color: #b5bdc8; }
.field small, .field-hint { color: #afb8c5; font-size: 10px; line-height: 1.8; }
.field .checkbox-label { display: flex; align-items: center; gap: 8px; }
.field .checkbox-label input { width: 14px; height: 14px; accent-color: var(--accent); }
.tabs { display: flex; gap: 23px; border-bottom: 1px solid #edf0f3; margin-bottom: 21px; }
.tab { position: relative; padding: 0 1px 12px; color: #a8b1be; font-size: 12px; }
.tab.active { color: #c8795f; font-weight: 500; }
.tab.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.dropzone { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 195px; padding: 23px; border: 1px dashed #dbe2e9; border-radius: 8px; background: #fcfdfd; color: #91a0b1; cursor: pointer; text-align: center; transition: border-color .18s ease, background-color .18s ease; }
.dropzone:hover, .dropzone.dragging { border-color: #dc9e88; background: #fff8f4; }
.dropzone > svg { width: 33px; height: 33px; margin-bottom: 16px; color: #b7c0cb; stroke-width: 1.3; }
.dropzone strong { color: #7e8e9f; font-size: 12px; font-weight: 500; }
.dropzone strong span { color: #cc876e; }
.dropzone p { margin-top: 7px; font-size: 10px; color: #b2bdca; }
.file-meta { display: flex; align-items: center; gap: 9px; margin-top: 15px; padding: 11px 13px; border: 1px solid #e7edf2; border-radius: 6px; background: #f9fbfc; color: #8a9aac; font-size: 11px; }
.file-meta .text-btn { margin-left: auto; }
.file-meta svg { width: 16px; height: 16px; }
.paste-input { display: block; width: 100%; min-height: 180px; padding: 13px; border: 1px solid #e4e9ef; border-radius: 7px; color: #7f8fa1; background: #fcfdfd; font-size: 11px; line-height: 1.9; resize: vertical; }
.paste-input::placeholder { color: #b2bdca; }
.import-hint { margin-top: 13px; color: #a9b4c2; font-size: 10px; line-height: 1.9; }
.import-hint a { color: #c78f75; }
.import-report { margin-top: 19px; padding: 16px; border: 1px solid #e7ecef; border-radius: 7px; background: #fafcfc; }
.import-report h3 { color: #8c9cae; font-size: 12px; font-weight: 500; margin-bottom: 13px; }
.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.report-grid > div { padding: 12px 6px; border-radius: 5px; background: #f1f5f7; text-align: center; }
.report-grid strong { display: block; color: #8599ac; font-size: 21px; font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; }
.report-grid span, .report-grid small { display: block; color: #a5b1bf; font-size: 9px; margin-top: 3px; }
.report-grid .success strong { color: #85a88f; }
.report-grid .warning strong { color: #c3a574; }
.report-grid .danger strong { color: #cc9482; }
.report-detail { max-height: 130px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8edf0; overflow: auto; color: #9cabbc; font-size: 10px; line-height: 1.9; }
.login-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 17px; }
.login-note { color: #a9b6c5; font-size: 10px; line-height: 1.9; }
.login-lock { display: grid; place-items: center; width: 50px; height: 50px; margin: 3px auto 18px; background: #faf2ec; color: #c99a7a; border-radius: 13px; }
.login-lock svg { width: 23px; height: 23px; }
.error-text { margin-top: 8px; color: #d0826d; font-size: 11px; }
.toast-region { position: fixed; right: 28px; bottom: 26px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast-region[popover] { inset: auto 28px 26px auto; margin: 0; padding: 0; border: 0; width: auto; height: auto; max-width: none; max-height: none; background: transparent; color: inherit; overflow: visible; }
.toast-region[popover]:not(:popover-open) { display: none; }
.toast-region::backdrop { background: transparent; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 400px; padding: 13px 18px; border: 1px solid #e4e9ed; border-radius: 8px; background: #fff; color: #7c8c9e; font-size: 12px; box-shadow: 0 6px 28px #25314b15; animation: toast-in .25s ease both; pointer-events: auto; }
.toast svg { width: 16px; height: 16px; }
.toast.success svg { color: #85aa92; }
.toast.error svg { color: #d6917b; }
.toast.success { border-color: #e0ece3; }
.toast.error { border-color: #efdbd4; }
.muted { color: #a4afbd; }
.danger-text { color: #cc8b79; }
.mono { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.brand > span:last-child > strong { display: flex; align-items: center; gap: 7px; font-size: 23px; font-weight: 650; line-height: 1.25; letter-spacing: 1.4px; }
.brand .beta-tag { align-self: flex-start; margin-top: 1px; font-size: 7px; font-weight: 400; letter-spacing: .2px; padding: 1px 3px; }
.nav-label { margin: 37px 15px 12px; color: #b1b6be; font-size: 9px; letter-spacing: 1.1px; }
.sidebar .nav-label + nav { margin-top: 0; }
.nav-arrow { margin-left: auto; color: #d29881; font-size: 14px; font-weight: 400; }
.nav-count { display: grid; place-items: center; margin-left: auto; min-width: 21px; height: 17px; padding: 0 4px; border: 1px solid #e8ebef; border-radius: 4px; color: #a7aeb7; background: #fafbfc; font-size: 9px; }
.shared-card > strong { color: #859082; font-size: 10px; font-weight: 500; }
.shared-card p { margin-top: 7px; }
.shared-card .text-btn { gap: 17px; margin-top: 12px; color: #9b9c8b; font-size: 9px; }
.version { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 19px; color: #b5bbc3; font-size: 8px; }
.version > span { font-size: 7px; }
.sync-state { color: #9da6b0; font-size: 10px; }
.editor-footer > div { display: flex; align-items: center; gap: 11px; }
.editor-footer b { font-weight: 400; color: #8b95a2; }
.divider { color: #e0e4e9; font-size: 10px; }
label.toggle { display: inline-flex; align-items: center; gap: 5px; width: auto; height: auto; color: #a1aab7; font-size: 9px; white-space: nowrap; }
label.toggle input { width: 11px; height: 11px; margin: 0; accent-color: var(--accent); }
.editor-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 9px; padding: 14px 22px 20px; }
.editor-actions #scan { grid-column: 1 / -1; width: 100%; max-width: none; }
.editor-actions #copy-content, .editor-actions #paste-content { min-width: 0; }
.editor-actions > .icon-btn { width: 35px; height: 35px; border: 1px solid #e5e9ee; }
.key-hint { margin-left: 12px; color: #ffdfd4; font-size: 9px; opacity: .85; }
.result-summary > div { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.result-summary > div strong { color: #747e8c; font-size: 27px; font-weight: 500; line-height: 1.25; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.result-summary > div:first-child strong { color: #cf925d; }
.result-summary > div span { color: #a4acb7; font-size: 9px; }
#scan-time { margin-left: auto; color: #b3bbc6; font-size: 8px; }
.replace-controls { margin: 0 22px; padding-top: 13px; border-top: 1px solid #f0f2f5; }
.replace-mode { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.replace-mode label { color: #a7b0bd; font-size: 10px; }
.replace-mode .select { height: 28px; min-width: 134px; font-size: 10px; }
.replace-controls .actions { padding: 13px 0 15px; }
.replace-controls .primary { flex: 1; }
.guide-number { display: inline-block; flex: 0 0 auto; color: #c4b5a1; font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-style: italic; font-weight: 400; line-height: 1.6; letter-spacing: -1px; }
.guide-item strong { display: block; color: #858e9b; font-size: 10px; font-weight: 500; margin: 2px 0 3px; }
.section-title > .actions, .library-tools > .actions, .modal-footer > .actions { padding: 0; margin: 0; }
.library-tools > .actions { margin-left: auto; }
.stat-card { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; padding: 20px 23px; }
.stat-card > span { align-self: center; color: #9aa6b5; font-size: 10px; }
.stat-card > .stat-number { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 29px; color: #798594; }
.stat-card small { position: static; color: #b3bcc7; font-size: 8px; }
.term-table td:last-child, .term-table th:last-child { text-align: left; }
.pagination > div { display: flex; align-items: center; gap: 13px; }
.pagination .icon-btn { width: 26px; min-width: 26px; }
.admin-gate-content { display: flex; flex-direction: column; align-items: center; padding: 70px 25px; text-align: center; }
.admin-gate-content .large-icon { display: grid; place-items: center; width: 63px; height: 63px; margin-bottom: 21px; border-radius: 16px; background: #f7f2ec; color: #c3ac90; }
.large-icon svg { width: 29px; height: 29px; stroke-width: 1.4; }
.admin-gate-content h2 { font-size: 17px; font-weight: 500; color: #7c8999; }
.admin-gate-content p { margin: 9px 0 25px; color: #adb7c4; font-size: 11px; }
.activity-title { color: #8895a5; font-size: 12px; font-weight: 500; margin: 25px 0 12px; }
.howto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-card .guide-number { display: block; margin-bottom: 12px; }
.help-card p + p { margin-top: 11px; }
.help-card .text-btn { margin-top: 16px; }
.page-footer { max-width: 1260px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 25px auto 0; padding-top: 19px; border-top: 1px solid #e8ebee; color: #b6bec8; font-size: 8px; }
.modal.compact { width: 460px; }
.modal-description { margin-bottom: 20px; color: #a1adbc; font-size: 11px; line-height: 1.9; }
.modal .field + .tabs { margin-top: 23px; }
.dropzone > span { display: block; margin-top: 8px; color: #b7c1cc; font-size: 10px; }
#file-meta:empty { display: none; }
#import-template { margin-top: 12px; color: #c4957c; }
.modal-footer > span > svg { width: 12px; height: 12px; margin-right: 4px; }
#signin-dialog .modal-body > p { color: #9caaba; font-size: 12px; line-height: 2; }
.platform-icon.all { color: #b68d77; background: #f9f0e9; }
.platform-icon.general { color: #8fa39a; background: #eff5f1; }
.platform-icon.xiaohongshu { color: #e07883; font-size: 9px; }
.platform-icon.wechat { color: #86a58c; }
.platform-icon.taobao { color: #cf956f; }
.platform-icon.kuaishou { color: #da9656; }
.platform-icon.shipinhao { color: #d0a45d; }
.platform-cell { display: inline-flex; align-items: center; gap: 6px; }
.platform-cell .platform-icon { width: 15px; height: 15px; font-size: 9px; }
.shared-dot.offline { background: #c7ad86; box-shadow: none; }
.match-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.match-top > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match-index { color: #c0c7d0; font-family: Georgia, "Times New Roman", serif; font-size: 10px; font-style: italic; }
.match-top .match-count { margin-left: 0; font-size: 8px; }
.match-top .category { border: 0; background: #f7f7f4; color: #afa994; font-size: 8px; }
.replacement-row > svg { width: 11px; height: 11px; color: #c6cdd6; }
.replacement-row input { height: 27px; font-size: 10px; }
.result-empty .large-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 17px; border: 1px solid #f0f2f4; border-radius: 16px; background: #fafbfc; }
.result-empty .large-icon svg { width: 28px; height: 28px; color: #c4cdd7; stroke-width: 1.2; }
.term-replacement { display: block; margin-top: 3px; color: #b4bfcb; font-size: 9px; }
.term-table .review-reason { white-space: normal; min-width: 130px; max-width: 260px; font-size: 10px; }
.row-actions .text-btn { font-size: 10px; }
.row-actions .text-btn.danger { color: #c99b8c; }
.activity-item > svg { margin-top: 3px; color: #b8c3cf; width: 14px; height: 14px; }
.activity-item > div > strong { color: #8f9eaf; font-size: 11px; font-weight: 500; }
.activity-item > time { margin-left: auto; color: #b4c0cd; font-size: 9px; white-space: nowrap; }
.account-balance { display: flex; align-items: center; justify-content: space-between; padding: 20px; margin: 20px 0 13px; border: 1px solid #ece7de; border-radius: 8px; background: #faf7f1; color: #b0a38c; font-size: 12px; }
.account-balance strong { color: #b88e64; font-size: 28px; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; }
#account-status { color: #8795a6; font-size: 12px; }
#account-note { color: #a8b4c3; font-size: 11px; line-height: 1.9; }
.toast:not(.error) > svg { color: #91ae9b; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1650px) {
  main, .main { padding-left: 60px; padding-right: 60px; }
  .hero { min-height: 176px; }
  .editor-wrap, .editor-wrap textarea { min-height: 390px; }
  .result-list { max-height: 385px; }
}
@media (max-width: 1200px) {
  :root { --sidebar: 196px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  main, .main { padding-left: 28px; padding-right: 28px; }
  .hero-art { margin-right: 0; }
  .workspace { gap: 16px; }
  .panel-head { padding-left: 18px; padding-right: 18px; }
  .result-summary { gap: 15px; margin-left: 18px; margin-right: 18px; }
  .result-list { padding-left: 18px; padding-right: 18px; }
  .result-footer { margin-left: 18px; margin-right: 18px; }
  .summary-stat { gap: 4px; }
  .guide-strip { gap: 16px; }
  .guide-item { gap: 9px; }
}
@media (max-width: 1050px) {
  .hero-art { display: none; }
  .workspace { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .toolbar { align-items: flex-start; }
  .toolbar-note { padding-top: 8px; }
  .hero h1 { font-size: 31px; }
  .result-summary { gap: 12px; flex-wrap: wrap; }
  .summary-stat strong { font-size: 20px; }
  .result-summary .status-label { padding-left: 6px; padding-right: 6px; font-size: 9px; }
  .guide-item p { font-size: 9px; }
  .guide-icon { width: 27px; height: 27px; flex-basis: 27px; }
  .library-summary { gap: 11px; }
  .stat-card { padding: 18px; gap: 11px; }
  .stat-card small { display: none; }
  .howto-grid { gap: 12px; }
  .help-card { padding: 23px; }
}
@media (max-width: 800px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; min-height: 63px; padding: 11px 20px; border-right: 0; border-bottom: 1px solid #e8ebef; flex-direction: row; align-items: center; gap: 28px; }
  .brand { gap: 8px; padding: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 20px; }
  .brand-en, .brand small { font-size: 6px; letter-spacing: 1.4px; }
  .sidebar nav, .nav { flex-direction: row; gap: 4px; margin: 0; margin-left: auto; }
  .nav-item, .sidebar nav > button, .sidebar nav > a { width: auto; min-height: 34px; padding: 8px 11px; gap: 6px; font-size: 11px; }
  .nav-item svg, .sidebar nav > button svg, .sidebar nav > a svg { width: 15px; height: 15px; }
  .sidebar-bottom, .nav-divider, .nav-section-label { display: none; }
  main, .main { margin-left: 0; padding: 0 23px 25px; min-height: calc(100vh - 63px); }
  .topbar { height: 63px; }
  .topbar-actions { gap: 12px; }
  .hero { min-height: 144px; padding-top: 9px; }
  .hero h1 { font-size: 31px; }
  .workspace { gap: 16px; }
  .editor-wrap textarea, .highlight-layer { padding-left: 18px; padding-right: 18px; font-size: 12px; }
  .editor-footer { margin-left: 18px; margin-right: 18px; }
  .actions { padding-left: 18px; padding-right: 18px; gap: 8px; }
  .actions .btn { padding-left: 12px; padding-right: 12px; font-size: 11px; }
  .actions .text-btn { font-size: 9px; }
  .section-title { padding-top: 20px; }
  .section-title h1 { font-size: 25px; }
  .admin-grid { grid-template-columns: 1fr; }
  .brand > span:last-child > strong { font-size: 20px; gap: 4px; }
  .nav-label { display: none; }
  .sidebar .nav-label + nav { margin-top: 0; margin-left: auto; }
  .sidebar nav .nav-arrow, .sidebar nav .nav-count { display: none; }
  .sync-state { font-size: 9px; }
  .editor-actions { padding-left: 18px; padding-right: 18px; gap: 7px; }
  .editor-actions .btn { padding-left: 11px; padding-right: 11px; font-size: 11px; }
  .key-hint { display: none; }
  #scan-time { font-size: 7px; }
  .result-summary > div strong { font-size: 23px; }
  .result-summary > div span { font-size: 8px; }
  .stat-card { padding: 18px; }
}
@media (max-width: 600px) {
  body { font-size: 13px; }
  .sidebar { padding: 10px 16px; gap: 8px; min-height: 60px; }
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 18px; letter-spacing: 1px; }
  .brand-en, .brand small { display: none; }
  .sidebar .beta-tag { display: none; }
  .sidebar nav, .nav { gap: 1px; }
  .nav-item, .sidebar nav > button, .sidebar nav > a { flex-direction: column; justify-content: center; gap: 2px; min-width: 43px; min-height: 39px; padding: 5px 7px; border-radius: 6px; font-size: 9px; line-height: 1.3; }
  .nav-item svg, .sidebar nav > button svg, .sidebar nav > a svg { width: 15px; height: 15px; }
  main, .main { padding-left: 18px; padding-right: 18px; }
  .topbar { height: 56px; }
  .breadcrumb { font-size: 10px; gap: 7px; }
  .topbar-actions, .user-menu { gap: 9px; }
  .topbar-actions > .icon-btn { width: 25px; }
  .topbar-divider { display: none; }
  .avatar, .user-avatar { width: 27px; height: 27px; font-size: 9px; }
  .hero { min-height: 144px; padding: 5px 0 22px; }
  .eyebrow { margin-bottom: 9px; font-size: 8px; letter-spacing: 1.8px; }
  .hero h1 { font-size: 28px; letter-spacing: -.7px; }
  .hero p { font-size: 10px; line-height: 1.9; margin-top: 9px; max-width: 320px; }
  .toolbar { flex-direction: column; padding: 0 0 17px; gap: 9px; }
  .platform-icon { width: 14px; height: 14px; font-size: 10px; }
  .platform-icon svg { width: 12px; height: 12px; }
  .toolbar-note { padding-top: 0; font-size: 9px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .panel { border-radius: 10px; }
  .panel-head { min-height: 54px; padding: 15px 17px; }
  .panel-head h2 { font-size: 12px; }
  .panel-head small, .panel-head .panel-note { font-size: 9px; }
  .editor-wrap, .editor-wrap textarea { min-height: 300px; }
  .editor-wrap textarea, .highlight-layer { font-size: 12px; line-height: 2.1; padding: 19px 18px; }
  .editor-footer { min-height: 38px; font-size: 9px; margin: 0 17px; }
  .editor-footer .text-actions { gap: 12px; }
  .actions { padding: 13px 17px 17px; }
  .actions .btn { min-height: 35px; font-size: 11px; }
  .actions .text-btn { font-size: 9px; }
  .result-summary { padding: 16px 0; gap: 23px; margin-left: 18px; margin-right: 18px; flex-wrap: nowrap; }
  .summary-stat strong { font-size: 23px; }
  .result-summary .status-label { font-size: 9px; }
  .result-list { min-height: 180px; max-height: 340px; }
  .result-empty { min-height: 235px; }
  .result-footer { min-height: 45px; font-size: 8px; }
  .guide-strip { grid-template-columns: 1fr; margin-top: 21px; padding: 22px 0 9px; gap: 18px; }
  .guide-item { gap: 11px; }
  .guide-item h3 { margin-bottom: 3px; font-size: 11px; }
  .guide-item p { font-size: 10px; }
  .guide-icon { width: 29px; height: 29px; flex-basis: 29px; }
  .privacy-note { font-size: 8px; margin-top: 16px; text-align: center; }
  .section-title { align-items: flex-start; flex-direction: column; gap: 17px; padding: 15px 0 22px; }
  .section-title h1 { font-size: 25px; }
  .section-title p { font-size: 10px; }
  .button-group, .header-actions { flex-wrap: wrap; width: 100%; gap: 7px; }
  .button-group .btn, .header-actions .btn { font-size: 10px; padding: 7px 11px; min-height: 33px; }
  .library-summary { gap: 8px; margin-bottom: 16px; }
  .stat-card { min-height: 102px; padding: 14px 10px; gap: 7px; flex-direction: column; align-items: flex-start; }
  .stat-card > svg, .stat-card .stat-icon { width: 25px; height: 25px; padding: 5px; border-radius: 5px; }
  .stat-card p, .stat-card .stat-title, .stat-card .stat-label { font-size: 8px; }
  .stat-number { font-size: 21px; line-height: 1.3; }
  .library-tools { gap: 9px; padding: 15px; }
  .search-field { flex: 1 1 100%; width: 100%; }
  .select { font-size: 10px; flex: 1; min-width: 0; }
  .library-tools .tools-end { margin: 0; width: 100%; }
  .filter-tabs { gap: 18px; padding: 0 16px; overflow-x: auto; white-space: nowrap; }
  .filter-tabs button { flex-shrink: 0; font-size: 10px; }
  .term-table { min-width: 620px; }
  .term-table th { font-size: 9px; }
  .term-table td { font-size: 10px; height: 55px; }
  .term-table th:first-child, .term-table td:first-child { padding-left: 18px; }
  .pagination { padding: 14px 15px; font-size: 9px; }
  .pagination-buttons { gap: 4px; }
  .pagination button { min-width: 23px; height: 23px; }
  .admin-note { padding: 13px 14px; font-size: 10px; margin-bottom: 16px; }
  .activity-list { padding-left: 17px; padding-right: 17px; }
  .activity-item { gap: 9px; }
  .activity-item p { font-size: 10px; }
  .activity-time { font-size: 8px; }
  .howto-grid { grid-template-columns: 1fr; gap: 13px; }
  .help-card { padding: 23px; }
  .help-card > svg { margin-bottom: 15px; }
  .help-card h2, .help-card h3 { font-size: 13px; }
  .help-card p { font-size: 10px; }
  .help-note { padding: 18px; font-size: 10px; margin-top: 17px; }
  .modal { max-width: calc(100vw - 28px); max-height: calc(100dvh - 30px); border-radius: 11px; }
  .modal-header { padding: 20px 20px 17px; gap: 12px; }
  .modal-header h2 { font-size: 17px; }
  .modal-header p { font-size: 10px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 15px 20px; gap: 8px; }
  .modal-footer .btn { min-height: 35px; padding: 8px 13px; font-size: 11px; }
  .modal-footer > span, .modal-footer > p { font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .dropzone { min-height: 175px; padding: 20px; }
  .dropzone strong { font-size: 11px; }
  .dropzone p { font-size: 9px; }
  .report-grid { gap: 6px; }
  .report-grid > div { padding: 10px 2px; }
  .report-grid strong { font-size: 18px; }
  .report-grid span, .report-grid small { font-size: 8px; }
  .toast-region { left: 18px; right: 18px; bottom: 18px; align-items: center; }
  .toast-region[popover] { inset: auto 18px 18px; }
  .toast { min-width: 0; width: 100%; max-width: 400px; padding: 12px 15px; font-size: 11px; }
  .brand > span:last-child > strong { font-size: 18px; letter-spacing: 1px; }
  .sync-state { font-size: 8px; }
  .editor-actions { padding: 13px 17px 17px; }
  .editor-actions .primary { max-width: none; }
  .editor-actions .btn { min-height: 35px; padding: 8px 11px; font-size: 10px; }
  .editor-actions > .icon-btn { width: 33px; }
  .result-summary { gap: 20px; }
  .result-summary > div strong { font-size: 25px; }
  .replace-controls { margin-left: 18px; margin-right: 18px; }
  .section-title > .actions { width: 100%; flex-wrap: wrap; gap: 8px; }
  .section-title > .actions .btn { min-height: 33px; font-size: 10px; padding: 7px 12px; }
  .library-tools > .actions { padding: 0; gap: 7px; width: 100%; flex-wrap: wrap; }
  .library-tools > .actions .btn { min-height: 32px; font-size: 9px; padding: 6px 8px; }
  .library-tools > .actions .select { min-width: 100px; }
  .stat-card { display: flex; align-items: flex-start; flex-direction: column; min-height: 102px; padding: 15px 11px; gap: 6px; }
  .stat-card > .stat-number { align-self: flex-start; font-size: 24px; line-height: 1.3; }
  .stat-card > span { align-self: flex-start; font-size: 9px; }
  .stat-card small { display: none; }
  .howto-grid { grid-template-columns: 1fr; }
  .page-footer { margin-top: 20px; padding-top: 15px; font-size: 7px; }
  .modal-footer > .actions { padding: 0; gap: 7px; }
  .modal-footer > span { font-size: 8px; }
  .activity-item > time { font-size: 8px; }
  .account-balance { padding: 17px; }
}
@media (max-width: 360px) {
  main, .main { padding-left: 13px; padding-right: 13px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand-name { display: none; }
  .sidebar nav > button, .sidebar nav > a, .nav-item { min-width: 46px; }
  .hero h1 { font-size: 26px; }
  .result-summary { gap: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Reading and touch targets stay comfortable at every viewport. */
body { font-size: 14px; }
.editor-wrap textarea, .highlight-layer { padding: 21px 23px; font-size: 14px; line-height: 1.9; letter-spacing: .3px; }
.editor-wrap textarea { color: #424c59; }
.editor-wrap textarea::placeholder { font-size: 14px; color: #858d98; }
.btn, .editor-actions .btn { font-size: 13px; min-height: 39px; }
.icon-btn { width: 36px; height: 36px; }
.text-btn { min-height: 29px; font-size: 12px; color: #737d8b; }
.panel-head h2 { font-size: 14px; }
.panel-head small, .panel-head .panel-note, .panel-head .text-btn { font-size: 12px; }
.hero p { color: #747e8b; font-size: 13px; }
.eyebrow { color: #858b93; font-size: 10px; }
.breadcrumb { color: #7d8590; font-size: 12px; }
.sync-state { color: #7e8895; font-size: 11px; }
.platform-icon, .platform-icon.xiaohongshu { font-size: 11px; }
.editor-footer, .editor-footer b, label.toggle { color: #7c8796; font-size: 11px; }
.editor-footer .text-btn { font-size: 11px; }
.status-label, .result-summary .status-label { font-size: 11px; color: #9c722a; }
.status-label.success { color: #48815d; }
.result-summary > div span { color: #7e8998; font-size: 11px; }
#scan-time { color: #8a95a5; font-size: 10px; }
.word-chip { color: #997127; font-size: 13px; }
.match-index { color: #8e99a9; font-size: 11px; }
.match-top .match-count { color: #8995a6; font-size: 10px; }
.match-top .category { color: #8c8064; font-size: 10px; }
.replacement-row > span, .replacement-row > label { color: #8995a6; font-size: 11px; }
.replacement-row input { color: #68778a; font-size: 12px; height: 31px; }
.replace-mode label { color: #8290a2; font-size: 12px; }
.replace-mode .select { font-size: 12px; height: 33px; }
.result-footer { color: #8794a6; font-size: 11px; }
.guide-item strong { color: #6f7d8f; font-size: 12px; }
.guide-item p { color: #8996a7; font-size: 11px; }
.privacy-note { color: #8a96a7; font-size: 10px; }
.result-empty h3 { color: #738197; font-size: 14px; }
.result-empty p { color: #8c9aad; font-size: 12px; }
.section-title p { color: #7d8b9e; font-size: 13px; }
.stat-card > span { color: #78899f; font-size: 12px; }
.stat-card small { color: #8e9db0; font-size: 10px; }
.search-field { height: 38px; }
.search-field input, .select { color: #718197; font-size: 12px; }
.search-field input::placeholder { color: #8b9aaf; }
.select { height: 38px; }
.term-table th { color: #8191a5; font-size: 12px; }
.term-table td { color: #7c8ea6; font-size: 12px; }
.term-label { color: #536b87; font-size: 13px; }
.badge { font-size: 11px; }
.badge.neutral { color: #7589a2; }
.badge.success { color: #628a71; }
.badge.warning { color: #aa8549; }
.badge.danger { color: #b87863; }
.pagination { color: #8294ad; font-size: 11px; }
.admin-note { color: #7b8fa9; font-size: 12px; }
.admin-gate-content p { color: #8499b4; font-size: 12px; }
.activity-item > div > strong { color: #758ca9; font-size: 12px; }
.activity-item p, .activity-item > time { color: #879db9; font-size: 11px; }
.help-card p, .help-card ol, .help-card ul { color: #7b91ad; font-size: 13px; }
.help-card h2, .help-card h3 { color: #627f9f; font-size: 15px; }
.modal-description, .field label, .login-field label { color: #7b91ad; font-size: 12px; }
.field small, .field-hint, .modal-footer > span, .modal-footer > p { color: #8a9fbb; font-size: 11px; }
.field input, .field select, .field textarea, .login-field input, .paste-input { font-size: 13px; color: #6d86a7; }
.dropzone strong { font-size: 13px; color: #7b92b0; }
.dropzone > span, .file-meta, .report-detail, .import-hint { font-size: 11px; color: #8ba0bc; }
#account-status, #account-note, #signin-dialog .modal-body > p { color: #7e96b4; font-size: 13px; }
.account-balance { font-size: 13px; }
.page-footer { color: #96a6bb; font-size: 10px; }
.hero p, .breadcrumb, .sync-state,
.editor-footer, .editor-footer b, label.toggle,
.result-summary > div span, #scan-time,
.replacement-row > span, .replacement-row > label,
.replace-mode label, .result-footer, .result-empty p,
.guide-item p, .privacy-note, .section-title p,
.stat-card > span, .stat-card small,
.search-field input, .search-field input::placeholder, .select,
.term-table th, .term-table td, .pagination,
.admin-note, .admin-gate-content p,
.activity-item p, .activity-item > time,
.help-card p, .help-card ol, .help-card ul,
.modal-description, .field label, .login-field label,
.field small, .field-hint, .modal-footer > span, .modal-footer > p,
.dropzone > span, .file-meta, .report-detail, .import-hint,
#account-status, #account-note, #signin-dialog .modal-body > p,
.page-footer { color: #707780; }
.term-label, .guide-item strong, .help-card h2, .help-card h3 { color: #525e6b; }
.field input, .field select, .field textarea, .login-field input, .paste-input,
.replacement-row input { color: #515c6b; }
.stat-card > .stat-number { color: #56616e; }

@media (max-width: 800px) {
  .nav-item, .sidebar nav > button, .sidebar nav > a { font-size: 12px; }
  .nav-label { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .sidebar { padding: 8px 12px; min-height: 64px; }
  .sidebar nav > button, .sidebar nav > a, .nav-item { min-height: 46px; min-width: 47px; padding: 5px 6px; gap: 4px; font-size: 11px; }
  .sidebar nav > .account-nav-button { min-width: 40px; }
  .sidebar nav > button svg, .sidebar nav > a svg, .nav-item svg { width: 17px; height: 17px; }
  .brand > span:last-child > strong { font-size: 18px; }
  .topbar { height: 59px; }
  .breadcrumb { font-size: 11px; }
  .sync-state { font-size: 10px; }
  .topbar-actions { gap: 8px; }
  .avatar, .user-avatar { width: 32px; height: 32px; font-size: 12px; }
  .hero { min-height: 153px; }
  .hero h1 { font-size: 28px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.4px; }
  .hero p { font-size: 12px; line-height: 1.9; }
  .platform-icon, .platform-icon.xiaohongshu { font-size: 11px; }
  .panel-head { min-height: 60px; padding: 15px 17px; }
  .panel-head h2 { font-size: 14px; }
  .panel-head .text-btn { font-size: 11px; }
  .editor-wrap, .editor-wrap textarea { min-height: 300px; }
  .editor-wrap textarea, .highlight-layer { padding: 19px 18px; font-size: 16px; line-height: 1.9; letter-spacing: .3px; }
  .editor-wrap textarea::placeholder { font-size: 16px; }
  .editor-footer { min-height: 46px; font-size: 11px; }
  .editor-footer b, label.toggle { font-size: 11px; }
  label.toggle input { width: 13px; height: 13px; }
  .editor-footer > div { gap: 8px; }
  .btn, .editor-actions .btn, .actions .btn, .section-title > .actions .btn, .library-tools > .actions .btn, .modal-footer .btn { min-height: 42px; font-size: 14px; padding: 9px 13px; }
  .btn.small { min-height: 38px; font-size: 12px; }
  .btn svg { width: 16px; height: 16px; }
  .icon-btn, .editor-actions > .icon-btn { width: 40px; height: 42px; }
  .icon-btn svg { width: 18px; height: 18px; }
  .text-btn, .editor-footer .text-btn, .panel-head .text-btn { min-height: 32px; font-size: 11px; }
  .editor-actions { padding: 12px 17px 17px; gap: 7px; }
  .editor-actions .btn { padding-left: 11px; padding-right: 11px; }
  .status-label, .result-summary .status-label { font-size: 11px; }
  .result-summary { gap: 17px; align-items: flex-start; flex-wrap: wrap; padding: 16px 0 13px; }
  .result-summary > div strong { font-size: 28px; }
  .result-summary > div span { font-size: 11px; }
  #scan-time { margin-left: 0; width: 100%; font-size: 11px; }
  .match-row { padding-top: 17px; padding-bottom: 17px; }
  .word-chip { min-height: 31px; font-size: 14px; }
  .match-top .category, .match-top .match-count, .match-index { font-size: 11px; }
  .replacement-row > span, .replacement-row > label { font-size: 11px; }
  .replacement-row { margin-top: 12px; gap: 7px; }
  .replacement-row input { height: 37px; font-size: 16px; }
  .replace-mode label { font-size: 12px; }
  .replace-mode .select { min-height: 40px; font-size: 16px; width: 160px; }
  .result-footer { font-size: 11px; line-height: 1.9; padding-top: 12px; padding-bottom: 12px; }
  .result-empty h3 { font-size: 14px; }
  .result-empty p { font-size: 12px; }
  .guide-item strong { font-size: 13px; }
  .guide-item p { font-size: 12px; line-height: 1.8; }
  .guide-strip { gap: 18px; }
  .privacy-note { font-size: 11px; line-height: 1.9; align-items: flex-start; }
  .privacy-note svg { width: 13px; height: 13px; margin-top: 4px; }
  .section-title p { font-size: 12px; }
  .section-title > .actions { gap: 8px; }
  .stat-card > span { font-size: 11px; }
  .stat-card > .stat-number { font-size: 25px; }
  .library-tools { padding: 15px; }
  .search-field { height: 44px; }
  .search-field input, .select, .field input, .field select, .field textarea, .login-field input, .paste-input { font-size: 16px; }
  .select { height: 43px; }
  .library-tools > .actions { gap: 8px; }
  .library-tools > .actions .select { flex: 1 1 100%; }
  .library-tools > .actions .btn { flex: 1; }
  .term-table th { font-size: 12px; }
  .term-table td, .term-label { font-size: 13px; }
  .term-table { min-width: 700px; }
  .badge, .platform-cell .platform-icon { font-size: 11px; }
  .pagination { font-size: 11px; padding: 13px 15px; }
  .pagination .icon-btn { min-width: 35px; width: 35px; height: 35px; font-size: 16px; }
  .admin-note { font-size: 12px; }
  .admin-gate-content { padding: 55px 23px; }
  .admin-gate-content p { font-size: 13px; }
  .activity-title { font-size: 14px; }
  .activity-item > div > strong { font-size: 13px; }
  .activity-item p, .activity-item > time { font-size: 11px; }
  .help-card p, .help-card ol, .help-card ul { font-size: 14px; line-height: 1.9; }
  .help-card h2, .help-card h3 { font-size: 16px; }
  .help-card { padding: 23px; }
  .modal-description, .field label, .login-field label { font-size: 13px; }
  .field input, .field select, .login-field input { height: 44px; }
  .field small, .field-hint, .modal-footer > span, .modal-footer > p { font-size: 11px; }
  .modal-footer { flex-wrap: wrap; gap: 10px; }
  .modal-footer > span { width: 100%; }
  .modal-footer > .actions { width: 100%; justify-content: flex-end; }
  .dropzone strong { font-size: 14px; }
  .dropzone > span, .file-meta, .report-detail, .import-hint { font-size: 12px; }
  .tabs .tab { font-size: 14px; min-height: 40px; }
  .report-grid span, .report-grid small { font-size: 11px; }
  #account-status, #account-note, #signin-dialog .modal-body > p, .account-balance { font-size: 14px; }
  .toast { font-size: 13px; }
  .page-footer { font-size: 10px; }
}

/* Keep the full tool name legible in the desktop sidebar and narrow H5 header. */
.brand { flex-shrink: 0; }
.brand-mark { flex-shrink: 0; }
.brand > span:last-child > strong { font-size: 18px; letter-spacing: 0; white-space: nowrap; }
@media (max-width: 600px) {
  .brand > span:last-child > strong { font-size: 16px; }
}

.toast.is-leaving { animation: toast-out .2s ease-in both; pointer-events: none; }
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-18px); }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation: none; }
}

.upload-word-button { color: var(--accent); background: var(--accent-soft, #fbefea); }

.desktop-window {
  --sidebar: 0px;
  --desktop-header-height: 48px;
}
.desktop-window .sidebar {
  position: sticky;
  inset: 0 0 auto;
  width: 100%;
  min-height: var(--desktop-header-height);
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 12px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}
.desktop-window .main { min-height: calc(100vh - var(--desktop-header-height)); }
.desktop-window .brand { padding: 0; gap: 6px; }
.desktop-window .brand-mark { width: 28px; height: 28px; }
.desktop-window .brand > span:last-child > strong { font-size: 16px; }
.desktop-window .desktop-window-drag {
  flex: 1;
  align-self: stretch;
  min-width: 14px;
  -webkit-app-region: drag;
  app-region: drag;
}
.desktop-window .sidebar .brand,
.desktop-window .sidebar button {
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.desktop-window .sidebar nav { flex: none; flex-direction: row; gap: 2px; margin: 0; }
.desktop-window .sidebar nav > button {
  flex-direction: row;
  justify-content: center;
  width: auto;
  min-width: 28px;
  min-height: 32px;
  gap: 5px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}
.desktop-window .nav-label, .desktop-window .sidebar-bottom { display: none; }
.desktop-window-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 1px;
  padding-left: 5px;
  border-left: 1px solid var(--line);
}
.window-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  color: var(--text);
}
.window-button svg { width: 17px; height: 17px; }
.window-button:hover { background: var(--paper); color: var(--ink); }
.window-button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-dark); }
#window-close:hover { background: #c43343; color: #fff; }
#window-update[aria-busy="true"] svg { animation: update-pulse 1.2s ease-in-out infinite; }
@keyframes update-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
#desktop-update-status:not([hidden]) { position: fixed; top: calc(var(--desktop-header-height) + 8px); right: 12px; z-index: 100; max-width: calc(100vw - 24px); padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); box-shadow: 0 5px 18px #27354512; font-size: 12px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #window-update[aria-busy="true"] svg { animation: none; } }

@media (max-width: 540px) {
  .desktop-window .sidebar { gap: 3px; padding-inline: 8px 5px; }
  .desktop-window .brand { gap: 5px; }
  .desktop-window .brand-mark { width: 26px; height: 26px; }
  .desktop-window .brand > span:last-child > strong { font-size: 15px; }
  .desktop-window .sidebar nav > button { min-width: 27px; padding: 0; }
  .desktop-window .sidebar nav > button > span { display: none; }
  .window-button { width: 26px; }
}
@media (max-width: 360px) {
  .desktop-window .sidebar { gap: 2px; padding-inline: 6px 5px; }
  .desktop-window .sidebar nav { gap: 1px; }
  .desktop-window .sidebar nav > button { min-width: 24px; }
  .desktop-window .desktop-window-drag { min-width: 0; }
  .desktop-window-controls { padding-left: 3px; }
  .window-button { width: 24px; }
}
@media (max-width: 440px) {
  .desktop-window .brand > span { display: none; }
}

.contribution-modal .modal-body { display: grid; gap: 18px; }
.contribution-reward { display: flex; gap: 11px; align-items: flex-start; padding: 15px; border: 1px solid #f1ddcf; border-radius: 10px; background: #fff7ef; }
.contribution-reward > svg { width: 20px; height: 20px; margin-top: 1px; color: #d8794e; }
.contribution-reward strong { font-size: 14px; font-weight: 600; color: #8d5d43; }
.contribution-reward p { margin-top: 4px; font-size: 12px; color: #967b69; line-height: 1.7; }
.contribution-context { display: grid; gap: 4px; font-size: 12px; color: #7d8690; }
.contribution-context strong { margin-left: 7px; font-weight: 500; color: #536271; }
.contribution-context small { font-size: 11px; color: #8b939c; }
.contribution-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; font-size: 12px; color: #85909b; }
.contribution-account strong { margin-left: 5px; color: var(--accent); font-size: 16px; font-weight: 600; white-space: nowrap; }
.contribution-test-note { font-size: 11px; line-height: 1.8; }
.contribution-result { padding: 12px 14px; border: 1px solid #dfece4; border-radius: 8px; background: #f4faf6; color: #65816f; font-size: 12px; line-height: 1.8; }
.contribution-modal .error-text:empty { display: none; }
@media (max-width: 600px) {
  .contribution-modal .modal-body { gap: 16px; }
  .contribution-reward { padding: 13px; }
  .contribution-reward strong { font-size: 13px; }
  .contribution-account { align-items: flex-start; flex-wrap: wrap; }
}

.replacement-row input.replacement-preview { flex: 1; width: 0; height: 36px; padding: 6px 10px; font-size: 14px; color: var(--ink); background: #fff; }
.replacement-row input.replacement-preview:focus { border-color: var(--accent); }
.replacement-row input.replacement-preview.is-edited { border-color: #eab39f; background: #fffaf7; }
.replacement-row .reset-replacement { min-height: 36px; padding: 4px 2px; font-size: 11px; }
@media (max-width: 600px) { .replacement-row input.replacement-preview { height: 40px; font-size: 16px; } }

.editor-panel .panel-head { gap: 8px; }
.editor-panel .panel-head h2 { gap: 6px; white-space: nowrap; }
.editor-header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; color: #7c8796; font-size: 11px; white-space: nowrap; }
.editor-char-count b { font-weight: 400; }
.editor-header-tools .text-btn { padding: 0 2px; }
#paste-manual-panel { margin-top: 16px; }
#paste-manual-input { min-height: 160px; margin-top: 10px; }
@media (max-width: 600px) {
  .editor-panel .panel-head h2 { font-size: 13px; }
  .editor-header-tools { gap: 8px; font-size: 10px; }
  .editor-header-tools .text-btn { font-size: 11px; }
  .editor-char-count .count-unit { display: none; }
  .editor-actions #copy-content, .editor-actions #paste-content { min-width: 0; padding-left: 7px; padding-right: 7px; gap: 5px; font-size: 13px; }
}

.result-total { display: flex; align-items: baseline; gap: 5px; margin-left: auto; color: #7e8998; font-size: 11px; white-space: nowrap; }
.result-total strong { color: #cf925d; font-size: 24px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.match-row .match-edit-line { flex-wrap: nowrap; margin-top: 8px; }
.match-row .match-edit-line .word-chip { display: block; flex: 0 1 auto; min-width: 0; max-width: 35%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-edit-line > svg { flex-shrink: 0; }
.match-edit-line input.replacement-preview { min-width: 0; flex: 1 1 0; }

.contribution-modal .modal-body { display: block; padding-top: 14px; }
.contribution-tabs { display: flex; gap: 24px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.contribution-tabs > button { position: relative; padding: 10px 0 13px; color: #8a939f; font-size: 14px; }
.contribution-tabs > button.active { color: var(--accent); font-weight: 600; }
.contribution-tabs > button.active::after { position: absolute; content: ''; height: 2px; bottom: -1px; left: 0; right: 0; background: var(--accent); }
.contribution-reward-dot { position: absolute; top: 7px; right: -9px; width: 6px; height: 6px; border-radius: 50%; background: #df644b; }
#contribution-upload-panel { display: grid; gap: 17px; }
.contribution-modes { display: flex; gap: 4px; width: fit-content; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f7f8fa; }
.contribution-modes button { min-height: 36px; padding: 6px 14px; border: 1px solid transparent; border-radius: 6px; color: #677586; background: transparent; font-size: 13px; }
.contribution-modes button[aria-pressed="true"] { border-color: var(--line); background: #fff; color: var(--accent-dark); font-weight: 500; }
.contribution-upload-fields { display: grid; gap: 14px; }
.contribution-bulk-note { margin: 0; color: #687687; font-size: 12px; line-height: 1.7; }
.contribution-upload-fields textarea { min-height: 110px; }
.contribution-file-row { display: flex; align-items: center; gap: 8px; }
.contribution-file-row input { min-width: 0; height: auto; }
.contribution-file-row button { flex-shrink: 0; }
.template-format { display: inline; padding: 2px 0; color: var(--accent-dark); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.template-format:hover { color: var(--accent); }
.template-format:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.downloads-modal .modal-header { align-items: center; }
.downloads-header-actions { display: flex; align-items: center; flex-shrink: 0; gap: 2px; margin: -8px -8px -8px 0; }
.downloads-modal .modal-header .downloads-header-actions .icon-btn { flex: 0 0 44px; width: 44px; height: 44px; margin: 0; }
#downloads-refresh[aria-busy="true"] svg { animation: scan-spin .8s linear infinite; }
.downloads-message { margin-bottom: 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
@media (prefers-reduced-motion: reduce) { #downloads-refresh[aria-busy="true"] svg { animation: none; } }
.downloads-failure .error-text { font-size: 12px; line-height: 1.7; }
.downloads-failure .btn { margin: 8px 0 14px; }
.downloads-list { display: grid; gap: 10px; max-height: 430px; overflow: auto; }
.download-record { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.download-record-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.download-record-name { min-width: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.download-record-state { flex-shrink: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.download-record-state.completed { color: #70957d; }
.download-record-state.interrupted, .download-record-state.cancelled { color: #bd7b68; }
.download-record-meta { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.download-record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.download-record-actions .btn, .download-record-actions .text-btn { min-height: 34px; padding: 6px 10px; font-size: 12px; }
@media (max-width: 600px) {
  .sidebar nav > .downloads-nav-button { min-width: 40px; }
  .sidebar nav > .downloads-nav-button > span { display: none; }
}
@media (max-width: 540px) { .desktop-window .desktop-window-drag { min-width: 0; } }
@media (max-width: 360px) {
  .desktop-window .sidebar nav > button { min-width: 22px; }
  .desktop-window .window-button { width: 22px; }
}
.contribution-modal .contribution-context { margin-top: -6px; font-size: 12px; }
.contribution-modal .contribution-result { padding: 9px 11px; margin: 0; }
.contribution-balance { font-size: 12px; color: #85909b; white-space: nowrap; }
.contribution-balance strong { margin-left: 5px; color: var(--accent); font-weight: 500; }
.contribution-history-tools { display: flex; align-items: center; justify-content: space-between; color: #8b949e; font-size: 12px; margin-bottom: 9px; }
.contribution-history-actions { display: flex; align-items: center; gap: 12px; }
.contribution-history-actions .btn { min-height: 34px; font-size: 12px; padding: 6px 10px; }
#contribution-claim-error { margin-bottom: 10px; font-size: 12px; }
.contribution-history-message { padding: 24px 0; text-align: center; color: #8b949e; font-size: 13px; }
.contribution-history-list { display: grid; gap: 10px; max-height: 350px; overflow: auto; }
.contribution-record { display: block; width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; }
button.contribution-record:hover { border-color: #e5bba9; background: #fffcfa; }
.contribution-record-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.contribution-record-main > strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; }
.contribution-record-status { flex-shrink: 0; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.contribution-record-status.pending { background: #fff6e7; color: #aa8650; }
.contribution-record-status.approved { background: #edf6ef; color: #70957d; }
.contribution-record-status.rejected { background: #fff0ed; color: #bd7b68; }
.contribution-record-replacement { display: flex; gap: 8px; align-items: flex-start; margin-top: 7px; color: #84909c; font-size: 12px; }
.contribution-record-replacement svg { flex-shrink: 0; width: 13px; height: 16px; }
.contribution-record-replacement span { min-width: 0; overflow-wrap: anywhere; }
.contribution-record-meta { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 10px; color: #a0a7b0; font-size: 10px; }
.contribution-record-meta .contribution-claim { min-height: 34px; padding: 5px 10px; color: var(--accent-dark); font-size: 12px; white-space: nowrap; }
.contribution-record-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.contribution-record-actions .text-btn { font-size: 11px; }
.contribution-record-meta > span:last-child:not(:first-child) { flex-shrink: 0; color: #bc8974; }
.contribution-history-failure { padding: 16px 0; text-align: center; }
.contribution-history-failure .btn { margin-top: 12px; }
.contribution-history-more { display: block; width: 100%; padding: 12px; margin-top: 6px; }
.contribution-reason-text { margin-top: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: #7c8792; line-height: 1.8; }

/* The result panel owns its scrolling list and replacement actions. */
#view-detect { animation: none; transform: none; padding-bottom: 0; }
.workspace { align-items: stretch; }
.result-panel { display: flex; flex-direction: column; min-height: 0; max-height: none; }
.result-panel .panel-head { position: relative; z-index: 2; flex-shrink: 0; flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.result-panel .panel-head h2 { white-space: nowrap; }
.result-head-controls { display: flex; align-items: center; justify-content: flex-end; gap: 14px; max-width: 100%; margin-left: auto; }
.result-head-controls .result-total { margin-left: 0; }
.manual-share-switch { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; color: var(--text); font-size: 11px; white-space: nowrap; cursor: pointer; }
.manual-share-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.manual-share-track { flex: 0 0 30px; width: 30px; height: 18px; padding: 2px; border: 1px solid #dfe3e9; border-radius: 20px; background: #e8ebf0; pointer-events: none; transition: background-color 160ms, border-color 160ms; }
.manual-share-track::after { content: ''; display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #27354526; transition: transform 160ms; }
.manual-share-switch input:checked + .manual-share-track { border-color: var(--accent); background: var(--accent); }
.manual-share-switch input:checked + .manual-share-track::after { transform: translateX(12px); }
.manual-share-switch input:focus-visible + .manual-share-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.manual-share-tooltip { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; width: 246px; max-width: calc(100vw - 76px); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); box-shadow: 0 3px 8px #2735450b, 0 8px 24px #27354512; font-size: 12px; line-height: 1.7; white-space: normal; text-align: left; visibility: hidden; opacity: 0; transform: translateY(-3px); transition: opacity 140ms, transform 140ms, visibility 140ms; pointer-events: none; }
.manual-share-switch:hover .manual-share-tooltip, .manual-share-switch:focus-within .manual-share-tooltip { visibility: visible; opacity: 1; transform: translateY(0); }
.add-manual-rule { min-height: 40px; padding-inline: 4px; color: var(--accent-dark); white-space: nowrap; margin-left: 5px; }
.add-manual-rule svg { width: 14px; height: 14px; }
.result-panel .result-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
.result-actions { display: flex; flex-shrink: 0; gap: 8px; margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.result-actions #replace-all { flex: 1; min-width: 0; }
.result-actions #undo { flex: 0 0 78px; }
.result-actions .btn { min-height: 42px; font-size: 13px; }
.manual-rule .match-top { align-items: center; }
.manual-rule-label { font-size: 11px; color: var(--muted); }
.delete-manual { width: 28px; height: 28px; color: var(--muted); }
.delete-manual svg { width: 14px; height: 14px; }
.delete-manual:hover { color: var(--accent-dark); background: var(--accent-soft); }
.manual-edit-line { display: flex; flex-wrap: nowrap; gap: 7px; }
.manual-edit-line .manual-word, .manual-edit-line .replacement-preview { min-width: 0; width: 0; flex: 1 1 0; height: 38px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 13px; }
.manual-edit-line input:focus { border-color: var(--accent); }
@media (max-width: 600px) {
  .result-panel { height: 480px; max-height: 70vh; }
  .result-panel .panel-head { padding: 14px 16px; }
  .result-panel .panel-head h2 { font-size: 13px; }
  .result-panel .result-total strong { font-size: 21px; }
  .result-panel .result-total { font-size: 10px; }
  .result-panel .result-empty { min-height: 170px; }
  .result-actions { padding: 12px 16px; }
  .manual-edit-line .manual-word, .manual-edit-line .replacement-preview { font-size: 16px; }
}
.contribution-heading { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; row-gap: 4px; }
.contribution-title-reward { color: var(--accent-dark); font-size: 11px; font-weight: 400; white-space: nowrap; }
.detection-access-error { margin: 0 0 14px; color: #b8664e; font-size: 12px; line-height: 1.5; }
.account-access { margin-top: 12px; color: var(--text); font-size: 13px; line-height: 1.8; }
.account-access + .account-balance { margin-top: 12px; }
.account-balances { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.account-balances .account-balance { flex: 1 1 150px; min-width: 0; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; padding: 14px; }
.account-balances .account-balance strong { font-size: 22px; white-space: nowrap; }
.account-daily-note { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
@media (max-width: 600px) {
  .editor-wrap { min-height: 280px; }
  .contribution-modal .modal-header { align-items: flex-start; }
}
.account-binding { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.8; }
.account-binding > .btn { margin-top: 12px; }
.binding-preview:not([hidden]) { display: grid; gap: 12px; }
.binding-membership { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 13px; line-height: 1.7; }
.binding-membership b { font-weight: 400; overflow-wrap: anywhere; }
.binding-membership strong { font-weight: 500; white-space: nowrap; }
.binding-expiry { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 12px; }
.binding-expiry strong { color: var(--accent-dark); font-size: 15px; font-weight: 500; }

.login-platform-field { margin: 16px 27px 0; }
.login-platform-field .modal-description { font-size: 11px; }

a, img, .brand { -webkit-user-drag: none; }
.brand { user-select: none; }
#signin-dialog { width: 420px; }
#signin-dialog .modal-header { align-items: center; padding: 20px 24px 16px; }
#signin-dialog .modal-header h2 { font-size: 17px; }
#signin-dialog .login-method-tabs { gap: 0; margin: 0 24px; padding: 0; }
#signin-dialog .login-method-tabs .tab { flex: 1; min-width: 0; padding: 14px 8px; text-align: center; }
#signin-dialog .login-method-tabs .tab.active::after { left: 12px; right: 12px; }
#signin-dialog .rightbao-login-fields { gap: 16px; padding: 20px 24px 24px; }
#signin-dialog .rightbao-login-fields .modal-description { margin: 0; }
#signin-dialog .rightbao-login-error { color: var(--accent-dark); }
#signin-dialog .modal-footer { padding: 16px 24px; }
#signin-dialog .modal-footer .btn { min-width: 96px; }
@media (max-width: 480px) {
  #signin-dialog { max-width: calc(100vw - 24px); }
  #signin-dialog .modal-header { padding: 20px 20px 16px; }
  #signin-dialog .login-method-tabs { margin: 0 20px; }
  #signin-dialog .rightbao-login-fields { padding: 20px; }
  #signin-dialog .modal-footer { padding: 16px 20px; }
  #signin-dialog .modal-footer .btn { flex: 1; min-height: 44px; min-width: 0; }
  #signin-dialog .modal-footer .btn.primary { flex: 1.6; }
}

/* Let both panels use the workspace while lists scroll above their own actions. */
.workspace .editor-wrap textarea { position: absolute; inset: 0; min-height: 0; height: 100%; overflow: auto; }
.workspace .result-list { position: relative; }
.workspace .panel-head, .workspace .editor-actions { flex-shrink: 0; }
@media (min-width: 601px) {
  body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  body main.main, .desktop-window .main { display: flex; flex: 1 1 0; flex-direction: column; min-height: auto; padding-bottom: 0; }
  .main > .view { width: 100%; }
  #view-detect { display: flex; flex: 1 1 0; flex-direction: column; min-height: auto; }
  .workspace { flex: 1 1 0; grid-template-rows: minmax(0, 1fr); min-height: 280px; }
  .workspace .editor-panel, .workspace .result-panel { min-height: 0; }
  .workspace .editor-wrap { min-height: 0; }
  .workspace .result-list { flex: 1 1 0; min-height: 0; max-height: none; overflow: auto; }
  .workspace .result-empty { min-height: 100%; }
}
@media (max-width: 600px) {
  .workspace .editor-wrap { flex: none; height: clamp(180px, 40vh, 420px); height: clamp(180px, 40dvh, 420px); min-height: 0; }
  .workspace .result-list { min-height: 0; max-height: none; overflow: auto; }
}

/* Keep transient reminders clear of the result panel actions. */
.toast-region, .toast-region[popover] { top: calc(var(--desktop-header-height, 64px) + 12px); bottom: auto; }

.manual-share-feedback { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fdfaf8; }
#manual-share-reward-description { font-size: 14px; line-height: 1.8; }
#manual-share-reward-description p + p { margin-top: 12px; }
.manual-share-messages { flex: 1 1 160px; min-width: 0; max-height: 140px; overflow-y: auto; color: var(--text); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#manual-share-note { color: var(--muted); }
.manual-share-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.manual-share-buttons .btn, .manual-share-buttons .text-btn { min-height: 40px; padding: 7px 10px; font-size: 12px; }
@media (max-width: 600px) {
  .result-head-controls { flex: 1 1 100%; justify-content: space-between; gap: 10px; }
  .manual-share-switch { min-height: 44px; font-size: 12px; }
  .result-panel .add-manual-rule { min-height: 44px; }
  .manual-share-feedback { padding: 10px 16px; }
  .manual-share-buttons .btn, .manual-share-buttons .text-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .manual-share-track, .manual-share-track::after, .manual-share-tooltip { transition: none; }
}
.editor-actions > .cloud-detection-note { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; color: #929ba6; font-size: 10px; line-height: 1.6; }
.cloud-detection-badge { padding: 0 5px; border: 1px solid #f2d9ce; border-radius: 3px; color: #bd7557; background: #fff7f2; font-size: 9px; white-space: nowrap; }
.cloud-detection-message { flex-shrink: 0; margin: 12px 18px 0; padding: 9px 11px; border: 1px solid #f1dfc0; border-radius: 6px; color: #ab7f46; background: #fff9ed; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.editor-char-count .over-limit { color: #c9533a; }
.match-risk-tools { display: flex; align-items: center; gap: 6px; }
.match-row .match-top > .match-risk-tools { flex-wrap: nowrap; flex-shrink: 0; max-width: 50%; }
.match-row .match-top .match-risk-tools .category { min-width: 0; max-width: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.risk-info-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 6px; background: transparent; color: #929ba6; cursor: pointer; }
.risk-info-button svg { width: 15px; height: 15px; pointer-events: none; }
.risk-info-button:hover, .risk-info-button[aria-expanded="true"] { background: #fff2ec; color: #d46747; }
.risk-info-button:focus-visible { outline: 2px solid #df7658; outline-offset: 2px; }
.cloud-risk-summary { display: flex; align-items: center; gap: 6px; margin: 12px 18px 0; }
.cloud-risk-summary > .cloud-detection-message { flex: 1; min-width: 0; margin: 0; }
.risk-info-popover { position: fixed; inset: auto; z-index: 2147483647; box-sizing: border-box; width: min(320px, calc(100vw - 24px)); max-height: min(400px, calc(100vh - 24px)); margin: 0; padding: 14px; overflow: auto; overscroll-behavior: contain; border: 1px solid #e5e8ee; border-radius: 12px; background: #fff; color: #657185; box-shadow: 0 8px 30px #35405226; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.risk-info-popover[hidden], .cloud-risk-summary[hidden], .risk-info-button[hidden] { display: none !important; }
.risk-info-popover::backdrop { background: transparent; }
.risk-info-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.risk-info-header h3 { min-width: 0; margin: 0; color: #526075; font-size: 13px; font-weight: 500; }
.risk-info-scope, .risk-info-empty { margin: 7px 0 10px; color: #969eaa; font-size: 11px; }
.risk-info-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.risk-info-list li { padding: 9px 10px; border: 1px solid #f0e6dd; border-radius: 7px; background: #fffbf6; }
.risk-info-list li > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.risk-info-list strong { color: #ba8052; font-size: 12px; font-weight: 500; }
.risk-info-list span { color: #a89986; font-size: 10px; }
.risk-info-list p { margin: 3px 0 0; color: #929ba6; font-size: 11px; }
.risk-info-list b { margin-left: 3px; color: #d06b4a; font-size: 15px; font-weight: 500; }
.risk-info-list small { display: block; margin-top: 3px; color: #929ba6; font-size: 10px; }
.risk-fragment-row { border-left: 2px solid #efd8bd; padding-left: 12px; }
.risk-fragment-text { margin: 9px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; color: #7e8795; }
.risk-fragment-expanded { margin-bottom: 10px; font-size: 11px; color: #b18a61; }
.risk-fragment-expanded > summary { cursor: pointer; }

/* Feedback shares the existing dialog and toolbar scale. */
.feedback-modal .modal-body { display: grid; gap: 18px; }
.feedback-modal .field { min-width: 0; }
.feedback-modal textarea { min-height: 140px; max-height: 40vh; resize: vertical; line-height: 1.7; }
.feedback-count { align-self: flex-end; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.feedback-count.over-limit { color: var(--accent); }
.feedback-modal .modal-footer { justify-content: flex-end; gap: 10px; }
.feedback-modal .error-text { margin: 0; }
#cloud-detection-note { display: none !important; }
#scan .cloud-detection-badge { margin-left: 5px; padding: 1px 5px; border-color: #ffffff73; border-radius: 4px; color: #fff; background: #ffffff17; font-size: 9px; font-weight: 400; line-height: 1.5; }
#scan .scan-button-label { min-width: 0; }
@media (max-width: 600px) {
  .sidebar nav > .feedback-nav-button { min-width: 36px; padding-inline: 7px; }
  .sidebar nav > .feedback-nav-button > span { display: none; }
}
