/* AnyTUS 应用字典 — standalone design for the online search page.
   No remote fonts, images or frameworks; colors are tokens with light/dark sets. */

:root {
  color-scheme: light;
  --bg: #fafaf9;
  --bg-elev: #ffffff;
  --bg-sunken: #f5f5f3;
  --bg-hover: #f2f2ef;
  --track: #ebebe7;
  --line: #e7e6e2;
  --line-strong: #d6d5d0;
  --ink: #17171a;
  --ink-2: #4a4a52;
  --ink-3: #6b6b74;
  --accent: #2f5bff;
  --accent-ink: #2149e0;
  --accent-soft: #eef2ff;
  --accent-line: #c9d5ff;
  --ok: #157a3b;
  --ok-soft: #eaf6ee;
  --ok-line: #bfe3cb;
  --cand: #8f5200;
  --cand-soft: #fdf5e6;
  --cand-line: #f0d7a6;
  --bad: #b42318;
  --bad-soft: #fdeeec;
  --bad-line: #f4c7c1;
  --muted-soft: #f1f1ee;
  --btn-primary: #17171a;
  --btn-primary-hover: #2c2c33;
  --btn-primary-ink: #ffffff;
  --logo-fg: #ffffff;
  --logo-dot: #5b7cff;
  --shadow-1: 0 1px 2px rgba(20, 20, 26, .05);
  --shadow-2: 0 1px 2px rgba(20, 20, 26, .04), 0 10px 30px -12px rgba(20, 20, 26, .14);
  --shadow-pop: 0 12px 32px -8px rgba(20, 20, 26, .28);
  --focus: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--accent);
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Noto Sans CJK SC", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f11;
    --bg-elev: #17171a;
    --bg-sunken: #131316;
    --bg-hover: #1d1d21;
    --track: #232328;
    --line: #27272c;
    --line-strong: #36363d;
    --ink: #ededf0;
    --ink-2: #b9b9c1;
    --ink-3: #91919b;
    --accent: #7c98ff;
    --accent-ink: #9bb0ff;
    --accent-soft: rgba(124, 152, 255, .13);
    --accent-line: rgba(124, 152, 255, .35);
    --ok: #63d08e;
    --ok-soft: rgba(99, 208, 142, .11);
    --ok-line: rgba(99, 208, 142, .32);
    --cand: #f1b860;
    --cand-soft: rgba(241, 184, 96, .11);
    --cand-line: rgba(241, 184, 96, .32);
    --bad: #ff8577;
    --bad-soft: rgba(255, 133, 119, .11);
    --bad-line: rgba(255, 133, 119, .32);
    --muted-soft: #1d1d21;
    --btn-primary: #ededf0;
    --btn-primary-hover: #ffffff;
    --btn-primary-ink: #111114;
    --logo-fg: #111114;
    --logo-dot: #7c98ff;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px -14px rgba(0, 0, 0, .6);
    --shadow-pop: 0 14px 34px -10px rgba(0, 0, 0, .7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f11;
  --bg-elev: #17171a;
  --bg-sunken: #131316;
  --bg-hover: #1d1d21;
  --track: #232328;
  --line: #27272c;
  --line-strong: #36363d;
  --ink: #ededf0;
  --ink-2: #b9b9c1;
  --ink-3: #91919b;
  --accent: #7c98ff;
  --accent-ink: #9bb0ff;
  --accent-soft: rgba(124, 152, 255, .13);
  --accent-line: rgba(124, 152, 255, .35);
  --ok: #63d08e;
  --ok-soft: rgba(99, 208, 142, .11);
  --ok-line: rgba(99, 208, 142, .32);
  --cand: #f1b860;
  --cand-soft: rgba(241, 184, 96, .11);
  --cand-line: rgba(241, 184, 96, .32);
  --bad: #ff8577;
  --bad-soft: rgba(255, 133, 119, .11);
  --bad-line: rgba(255, 133, 119, .32);
  --muted-soft: #1d1d21;
  --btn-primary: #ededf0;
  --btn-primary-hover: #ffffff;
  --btn-primary-ink: #111114;
  --logo-fg: #111114;
  --logo-dot: #7c98ff;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px -14px rgba(0, 0, 0, .6);
  --shadow-pop: 0 14px 34px -10px rgba(0, 0, 0, .7);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 var(--font);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
code, kbd, .mono { font-family: var(--mono); font-size: .94em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: var(--accent-soft); }

[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 12px; border-radius: var(--radius-s); background: var(--btn-primary); color: var(--btn-primary-ink); text-decoration: none; transition: top .15s ease; }
.skip-link:focus { top: 12px; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: 100%; max-width: 1008px; margin-inline: auto; padding-inline: var(--gutter); }
.inline { padding: 1px 5px; border-radius: 5px; background: var(--bg-sunken); border: 1px solid var(--line); font-size: 12.5px; overflow-wrap: anywhere; }
.noscript { margin: 24px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 560; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn--primary { background: var(--btn-primary); color: var(--btn-primary-ink); }
.btn--primary:hover:not(:disabled) { background: var(--btn-primary-hover); }
.btn--secondary { background: var(--bg-elev); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.btn--secondary:hover:not(:disabled) { background: var(--bg-hover); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--ink); }
.btn--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.btn--accent:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; gap: 5px; }
.btn--sm .i { width: 14px; height: 14px; }
.btn:disabled { opacity: .55; }
.btn[aria-busy="true"] { opacity: 1; cursor: progress; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--ink); }
.icon-btn--sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn--sm .i { width: 15px; height: 15px; }
.icon-btn.is-done { color: var(--ok); }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); text-decoration: none; font-weight: 520; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link .i { width: 15px; height: 15px; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); margin-right: auto; border-radius: 8px; }
.brand__mark { width: 26px; height: 26px; color: var(--ink); }
.brand__name { font-weight: 680; font-size: 15.5px; letter-spacing: -.01em; }
.brand__product { color: var(--ink-3); font-size: 14px; padding-left: 9px; border-left: 1px solid var(--line-strong); line-height: 1; }
.topnav { display: flex; align-items: center; gap: 2px; }
.topnav a { padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
.topnav a:hover { background: var(--bg-hover); color: var(--ink); }

/* ---------- Hero & composer ---------- */
.hero { padding-top: 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-2); font-size: 12.5px; font-weight: 520; }
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero h1 { margin-top: 14px; font-size: 32px; line-height: 1.18; font-weight: 680; letter-spacing: -.025em; }
.hero__lede { margin-top: 8px; max-width: 760px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }

.composer { margin-top: 24px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-2); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.composer:focus-within { border-color: var(--line-strong); }
.composer__tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 6px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-3); font-size: 13.5px; font-weight: 560; border-radius: 8px 8px 0 0; transition: color .15s ease; }
.tab .i { width: 15px; height: 15px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.tab__meta { padding: 1px 6px; border-radius: 999px; background: var(--bg-sunken); color: var(--ink-3); font-size: 11.5px; font-weight: 520; }
.composer__keys { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.composer__keys .sep { margin: 0 4px; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--bg-elev); color: var(--ink-2); font-size: 11.5px; line-height: 1; }

.searchbox { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 18px; min-height: 66px; }
.searchbox__icon { width: 20px; height: 20px; color: var(--ink-3); }
.searchbox input {
  flex: 1; min-width: 0; height: 44px; padding: 0 4px; border: 0; background: transparent; outline: none;
  font-size: 18px; letter-spacing: -.005em; color: var(--ink);
}
.searchbox input::placeholder { color: var(--ink-3); opacity: .8; }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.searchbox input:focus-visible { box-shadow: none; }
.searchbox input[readonly] { color: var(--ink-2); }
.detect { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 560; white-space: nowrap; }
.detect[data-tone="warn"] { background: var(--cand-soft); color: var(--cand); }
.searchbox__submit { height: 44px; padding: 0 16px 0 18px; border-radius: 11px; font-size: 14.5px; }
.btn__enter { width: 15px; height: 15px; opacity: .65; }

.composer__panel--batch { padding: 12px 12px 0; }
.composer__panel--batch textarea {
  display: block; width: 100%; min-height: 132px; max-height: 360px; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-sunken);
  font-family: var(--mono); font-size: 14px; line-height: 1.65; color: var(--ink); outline: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.composer__panel--batch textarea:focus { border-color: var(--accent); background: var(--bg-elev); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer__panel--batch textarea::placeholder { color: var(--ink-3); opacity: .85; }
.batch-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0 12px; }
.batch-count { color: var(--ink-3); font-size: 12.5px; }
.batch-count b { color: var(--ink); font-weight: 600; }
.batch-count[data-tone="error"] { color: var(--bad); }
.batch-count[data-tone="error"] b { color: var(--bad); }
.batch-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.composer__options { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg-sunken); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--track); }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg__opt span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 8px; color: var(--ink-2); font-size: 13px; font-weight: 540; white-space: nowrap; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.seg__opt input:checked + span { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 .5px var(--line); }
.seg__opt input:focus-visible + span { box-shadow: var(--focus); }
.seg__opt input:disabled + span { opacity: .55; }
.field { position: relative; display: inline-flex; align-items: center; gap: 0; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); transition: border-color .15s ease, opacity .15s ease; }
.field:hover { border-color: var(--line-strong); }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field__label { padding: 0 0 0 11px; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.field select {
  height: 100%; padding: 0 30px 0 8px; border: 0; background: transparent; outline: none; appearance: none; -webkit-appearance: none;
  font-size: 13px; font-weight: 560; color: var(--ink); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px;
}
.field select:disabled { cursor: not-allowed; }
.field.is-disabled { opacity: .5; }
.options__hint { margin-left: auto; color: var(--ink-3); font-size: 12px; }

.composer-msg { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-2); font-size: 13.5px; }
.composer-msg .i { margin-top: 2px; }
.composer-msg[data-tone="error"] { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }
.composer-msg[data-tone="success"] { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }

.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.examples__label { flex: none; color: var(--ink-3); font-size: 12.5px; margin-right: 2px; white-space: nowrap; }
.example { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink); font-size: 12.5px; transition: border-color .15s ease, background-color .15s ease; }
.example code { font-size: 12.5px; }
.example span { color: var(--ink-3); }
.example:hover { border-color: var(--line-strong); background: var(--bg-hover); }

.data-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; color: var(--ink-3); font-size: 12.5px; }
.data-strip__item { display: inline-flex; align-items: center; gap: 6px; }
.data-strip__item b { color: var(--ink-2); font-weight: 560; font-variant-numeric: tabular-nums; }
.data-strip__item .i { width: 14px; height: 14px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
[data-state="loading"] .status-dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
[data-state="ready"] .status-dot { background: var(--ok); }
[data-state="partial"] .status-dot { background: var(--cand); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Results ---------- */
.results { margin-top: 36px; scroll-margin-top: 72px; }
.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.results-head__title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.results-head__title .i { width: 18px; height: 18px; color: var(--ink-3); }
.results-head__sub { margin-top: 4px; color: var(--ink-3); font-size: 13px; }
.results-head__sub b { color: var(--ink-2); font-weight: 560; font-variant-numeric: tabular-nums; }
.results-head__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--track); }
.filter button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 12.5px; font-weight: 540; white-space: nowrap; }
.filter button .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.filter button[aria-pressed="true"] { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 .5px var(--line); }
.filter button:disabled { opacity: .45; }

.summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-2); font-size: 13px; font-weight: 540; white-space: nowrap; }
.chip .i { width: 15px; height: 15px; }
.chip b { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.chip--ok .i { color: var(--ok); }
.chip--cand .i { color: var(--cand); }
.chip--miss .i { color: var(--ink-3); }
.chip--bad .i { color: var(--bad); }
.chip--saved .i { color: var(--accent); }
.chip:disabled { opacity: .5; }
.missing-line { margin-top: 10px; color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.missing-line b { color: var(--ink-2); font-weight: 560; }

.callouts { display: grid; gap: 8px; margin-top: 16px; }
.callout { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-2); font-size: 13.5px; }
.callout > .i { width: 16px; height: 16px; margin-top: 2px; }
.callout__title { color: var(--ink); font-weight: 600; }
.callout ul { margin-top: 2px; display: grid; gap: 1px; }
.callout li { overflow-wrap: anywhere; }
.callout li::before { content: "·"; margin-right: 6px; color: var(--ink-3); }
.callout__foot { margin-top: 4px; color: var(--ink-3); font-size: 12.5px; }
.callout--warn { border-color: var(--cand-line); background: var(--cand-soft); }
.callout--warn > .i { color: var(--cand); }
.callout--bad { border-color: var(--bad-line); background: var(--bad-soft); }
.callout--bad > .i { color: var(--bad); }
.callout--ok { border-color: var(--ok-line); background: var(--ok-soft); }
.callout--ok > .i { color: var(--ok); }
.callout--info > .i { color: var(--accent); }
.callout__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.group { margin-top: 24px; }
.group__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px; }
.group__query { font-size: 15px; font-weight: 640; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.group__query::before { content: "“"; color: var(--ink-3); }
.group__query::after { content: "”"; color: var(--ink-3); }
.group__status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; }
.group__status .i { width: 15px; height: 15px; }
.group__status--ok { color: var(--ok); }
.group__status--cand { color: var(--cand); }
.group__status--bad { color: var(--bad); }
.group__errors { flex-basis: 100%; display: grid; gap: 2px; color: var(--bad); font-size: 12.5px; }
.group__errors span { display: inline-flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.group__errors .i { width: 14px; height: 14px; margin-top: 2px; }
.subhead { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; color: var(--ink-3); font-size: 12.5px; }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-sunken); color: var(--ink-2); font-size: 12px; font-weight: 540; line-height: 1; white-space: nowrap; vertical-align: middle; }
.tag .i { width: 13px; height: 13px; }
.tag--accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.tag--ok { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.tag--cand { border-color: var(--cand-line); background: var(--cand-soft); color: var(--cand); }
.tag--bad { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }
.tag--muted { color: var(--ink-3); }
.tag--dashed { border-style: dashed; background: transparent; color: var(--ink-3); }

.hits { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); overflow: hidden; }
.hit { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 16px; border-top: 1px solid var(--line); transition: background-color .15s ease; }
.hit:first-child { border-top: 0; }
.hit:hover { background: color-mix(in srgb, var(--bg-hover) 55%, transparent); }
.hit.is-open { background: color-mix(in srgb, var(--bg-sunken) 70%, transparent); }
.hit.is-flash { animation: flash 1.6s ease; }
@keyframes flash { 0% { background: var(--ok-soft); } 100% { background: transparent; } }
.hit__icon { position: relative; width: 44px; height: 44px; border-radius: 11px; overflow: hidden; flex: none; }
.hit__icon img { width: 100%; height: 100%; object-fit: cover; }
.hit__icon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); pointer-events: none; }
.monogram { display: grid; place-items: center; width: 100%; height: 100%; font-size: 17px; font-weight: 650; background: hsl(var(--h, 230) 60% 93%); color: hsl(var(--h, 230) 50% 30%); }
:root[data-theme="dark"] .monogram { background: hsl(var(--h, 230) 28% 22%); color: hsl(var(--h, 230) 70% 82%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .monogram { background: hsl(var(--h, 230) 28% 22%); color: hsl(var(--h, 230) 70% 82%); } }
.monogram--unknown { background: var(--bg-sunken); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.hit__body { min-width: 0; }
.hit__title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.hit__name { font-size: 15.5px; font-weight: 620; line-height: 1.35; letter-spacing: -.005em; overflow-wrap: anywhere; min-width: 0; }
.hit__name--missing { color: var(--ink-3); font-weight: 520; font-style: normal; }
.hit__ids { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.idchip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-height: 30px; padding: 2px 2px 2px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-sunken); }
.idchip__label { flex: none; margin-right: 6px; color: var(--ink-3); font-size: 11.5px; font-weight: 540; white-space: nowrap; }
.idchip code { min-width: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; line-height: 1.35; padding: 3px 0; }
.idchip--missing { padding-right: 9px; border-style: dashed; background: transparent; }
.idchip--missing .idchip__label { margin-right: 0; }
.idchip .icon-btn { margin-left: 2px; }
.hit__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin-top: 8px; color: var(--ink-3); font-size: 12.5px; }
.hit__meta > * { display: inline-flex; align-items: center; gap: 4px; }
.hit__meta > *:not(:last-child)::after { content: "·"; margin: 0 7px; color: var(--ink-3); opacity: .55; }
.hit__meta a { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.hit__meta a:hover { color: var(--accent-ink); border-bottom-color: var(--accent-line); }
.hit__meta .i { width: 12px; height: 12px; }
.hit__meta .warn { color: var(--cand); }
.hit__note { display: flex; gap: 6px; margin-top: 8px; color: var(--cand); font-size: 12.5px; }
.hit__note .i { width: 14px; height: 14px; margin-top: 2px; }
.hit__aside { display: flex; align-items: center; align-self: start; gap: 6px; min-height: 30px; }
.hit__aside-row { display: flex; align-items: center; gap: 6px; }
.record { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 580; white-space: nowrap; border: 1px solid var(--line); color: var(--ink-2); background: var(--bg-elev); }
.record .i { width: 14px; height: 14px; }
.record--saved { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-soft); }
.record--baseline { color: var(--ink-2); }
.record--manual { color: var(--cand); border-color: var(--cand-line); background: var(--cand-soft); }
.record--unsaved { color: var(--ink-3); border-style: dashed; background: transparent; }
.hit__expand .i { transition: transform .18s ease; }
.hit__expand[aria-expanded="true"] .i { transform: rotate(180deg); }

.confirm { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--ink-2); font-size: 13px; }
.confirm__title { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 620; }
.confirm__title .i { color: var(--accent-ink); }
.confirm p { margin-top: 4px; overflow-wrap: anywhere; }
.confirm code { color: var(--ink); }
.confirm__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.save-state { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); font-size: 13px; }
.save-state .i { width: 16px; height: 16px; margin-top: 1px; }
.save-state--busy { border: 1px solid var(--line); background: var(--bg-sunken); color: var(--ink-2); }
.save-state--bad { border: 1px solid var(--bad-line); background: var(--bad-soft); color: var(--bad); }
.save-state--ok { border: 1px solid var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.save-state__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.save-state .btn { margin-top: 8px; }

.details { grid-column: 2 / -1; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.details dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px; }
.details dt { color: var(--ink-3); font-size: 12px; }
.details dd { margin-top: 2px; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.details dd.mono { font-family: var(--mono); font-size: 13px; }
.details dd a { color: var(--accent-ink); text-decoration: none; }
.details dd a:hover { text-decoration: underline; text-underline-offset: 3px; }
.details .wide { grid-column: 1 / -1; }
.details__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.miss { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px; background: var(--bg-elev); border: 1px dashed var(--line-strong); border-radius: var(--radius-l); }
.miss__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--bg-sunken); color: var(--ink-3); }
.miss__icon .i { width: 20px; height: 20px; }
.miss__title { font-weight: 620; color: var(--ink); overflow-wrap: anywhere; }
.miss p { margin-top: 3px; color: var(--ink-2); font-size: 13.5px; }
.miss__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.miss--bad { border-color: var(--bad-line); }
.miss--bad .miss__icon { background: var(--bad-soft); color: var(--bad); }

.more-row { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--line); }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; color: var(--ink-3); font-size: 12.5px; }
.toggle-others { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 540; }
.toggle-others:hover { background: var(--bg-hover); color: var(--ink); }
.toggle-others .i { transition: transform .18s ease; }
.toggle-others[aria-expanded="true"] .i { transform: rotate(180deg); }
.results-head ~ .empty, .results-head ~ .filtered-empty, .results-head ~ .callout, .loading-head ~ .callout { margin-top: 16px; }
.filtered-empty { padding: 14px 16px; color: var(--ink-3); font-size: 13px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Loading */
.loading-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.loading-head__title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 620; }
.loading-head__title .i { width: 18px; height: 18px; color: var(--accent); }
.loading-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; color: var(--ink-3); font-size: 13px; }
.loading-steps span { display: inline-flex; align-items: center; gap: 6px; }
.loading-steps span + span::before { content: "→"; color: var(--line-strong); margin-right: 2px; }
.elapsed { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; }
.skeleton { margin-top: 20px; }
.skeleton .hit { pointer-events: none; }
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--bg-sunken), var(--bg-hover), var(--bg-sunken)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.sk--icon { width: 44px; height: 44px; border-radius: 11px; }
.sk--line { height: 12px; margin-top: 8px; }
.sk--title { height: 16px; width: 38%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Initial state */
.intro-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.intro-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius-l); border: 1px solid var(--line); background: var(--bg-elev); box-shadow: var(--shadow-1); }
.intro-card__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-sunken); color: var(--ink-2); margin-bottom: 4px; }
.intro-card__icon .i { width: 18px; height: 18px; }
.intro-card h3 { font-size: 14.5px; font-weight: 640; }
.intro-card .intro-card__stat { font-size: 24px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.intro-card__stat small { margin-left: 4px; font-size: 13px; font-weight: 520; color: var(--ink-3); letter-spacing: 0; }
.intro-card .intro-card__meta { color: var(--ink-3); font-size: 12.5px; }
.intro-card p { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.intro-card .btn { align-self: flex-start; margin-top: auto; }
.intro-card__foot { margin-top: auto; padding-top: 6px; }
.intro-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.intro-head h2 { font-size: 15px; font-weight: 640; }
.intro-head p { color: var(--ink-3); font-size: 13px; }

.empty { padding: 36px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--bg-elev); }
.empty__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg-sunken); color: var(--ink-3); }
.empty__icon .i { width: 20px; height: 20px; }
.empty h3 { margin-top: 12px; font-size: 15.5px; font-weight: 640; overflow-wrap: anywhere; }
.empty p { margin: 6px auto 0; max-width: 460px; color: var(--ink-2); font-size: 13.5px; }
.empty__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Sections ---------- */
.section { margin-top: 72px; scroll-margin-top: 72px; }
.section__head { display: grid; gap: 6px; margin-bottom: 18px; }
.section__head h2 { font-size: 20px; font-weight: 660; letter-spacing: -.015em; }
.section__head p { color: var(--ink-2); font-size: 13.5px; max-width: 680px; }
.dev-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 14px; }
.panel { min-width: 0; padding: 18px; border-radius: var(--radius-l); border: 1px solid var(--line); background: var(--bg-elev); box-shadow: var(--shadow-1); scroll-margin-top: 72px; }
.panel__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel__head h3 { font-size: 14.5px; font-weight: 640; }
.panel__head .i { color: var(--ink-3); }
.panel__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.endpoints { display: grid; gap: 4px; }
.endpoint { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.endpoint:first-child { border-top: 0; padding-top: 0; }
.endpoint__line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.endpoint__line code { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; word-break: break-all; }
.endpoint p { grid-column: 1 / -1; color: var(--ink-3); font-size: 12.5px; }
.snippet { grid-column: 1 / -1; display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-sunken); color: var(--ink-2); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; word-break: break-all; }
.endpoint .icon-btn { grid-row: 1; grid-column: 2; }
.method { flex: none; display: inline-grid; place-items: center; min-width: 40px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--ok-soft); color: var(--ok); font-family: var(--mono); font-size: 11px; font-weight: 650; }
.method--post { background: var(--accent-soft); color: var(--accent-ink); }
.downloads { display: grid; }
.download { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; color: inherit; transition: background-color .15s ease; }
.download:hover { background: var(--bg-hover); }
.download__name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.download__path { justify-self: end; color: var(--ink-3); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.download__desc { grid-column: 1 / -1; color: var(--ink-3); font-size: 12.5px; }
.downloads li + li .download { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.downloads li + li .download:hover { border-top-color: transparent; border-radius: 10px; }

.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; counter-reset: rule; }
.rules li { position: relative; display: grid; align-content: start; gap: 4px; padding: 16px 16px 16px 50px; border-radius: var(--radius-l); border: 1px solid var(--line); background: var(--bg-elev); counter-increment: rule; }
.rules li::before { content: counter(rule); position: absolute; left: 16px; top: 15px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--bg-sunken); color: var(--ink-2); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rules strong { font-size: 14px; font-weight: 620; }
.rules span { color: var(--ink-2); font-size: 13px; line-height: 1.6; }

.footer { display: grid; gap: 4px; margin-top: 64px; padding-bottom: 40px; color: var(--ink-3); font-size: 12.5px; }
.footer::before { content: ""; display: block; height: 1px; margin-bottom: 18px; background: var(--line); }
.footer p:first-child { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.footer__brand { color: var(--ink-2); font-weight: 600; }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; justify-items: center; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 10px 14px; border-radius: 12px; background: var(--btn-primary); color: var(--btn-primary-ink); font-size: 13.5px; font-weight: 520; box-shadow: var(--shadow-pop); overflow-wrap: anywhere; animation: toast-in .18s ease; }
.toast .i { width: 16px; height: 16px; flex: none; }
.toast--bad .i { color: #ff8577; }
.toast code { font-size: 12.5px; opacity: .9; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- In-app purchase dialog ---------- */
.iap-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--accent-line); background: transparent; color: var(--accent-ink); font-size: 12.5px; font-weight: 560; transition: background-color .15s ease, border-color .15s ease; }
.iap-btn .i { width: 14px; height: 14px; }
.iap-btn:hover { background: var(--accent-soft); border-style: solid; }
.sheet { width: min(1000px, calc(100vw - 32px)); height: min(780px, calc(100vh - 48px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-pop); overflow: hidden; }
.sheet[open] { display: block; }
.sheet::backdrop { background: rgba(12, 12, 16, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet__inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 16px 22px; border-bottom: 1px solid var(--line); }
.sheet__titles { min-width: 0; }
.sheet__eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.sheet__eyebrow .i { width: 14px; height: 14px; }
.sheet__title { margin-top: 4px; font-size: 19px; font-weight: 660; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sheet__sub { margin-top: 3px; color: var(--ink-3); font-size: 12.5px; }
.sheet__body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet__body--center { align-items: center; justify-content: center; padding: 24px; overflow: auto; }
.sheet__body--center .callout { max-width: 520px; }
.sheet__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 22px; border-top: 1px solid var(--line); background: var(--bg-sunken); color: var(--ink-3); font-size: 12px; }
.sheet__foot > span { display: inline-flex; align-items: center; gap: 5px; }
.sheet__foot .i { width: 13px; height: 13px; }
.sheet__foot a { color: var(--ink-2); }
.sheet__foot .warn { color: var(--cand); }
.iap-loading { display: grid; justify-items: center; gap: 8px; max-width: 420px; text-align: center; color: var(--ink-2); font-size: 13.5px; }
.iap-loading > .i { width: 26px; height: 26px; color: var(--accent); }
.iap-loading__title { color: var(--ink); font-size: 15.5px; font-weight: 620; }
.iap-loading .btn { margin-top: 6px; }
.iap-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.iap-toolbar__sum { color: var(--ink-3); font-size: 13px; }
.iap-toolbar__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.iap-currency { height: 34px; }
.iap-toolbar__sum b { color: var(--ink); font-weight: 620; font-variant-numeric: tabular-nums; }
.iap-toolbar__sum b.bad { color: var(--bad); }
.iap-toolbar__sum b.warn { color: var(--cand); }
.iap-notices { padding: 12px 22px 0; }
.iap-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.iap-tier-note { display: flex; gap: 6px; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: var(--cand-soft); color: var(--cand); font-size: 12.5px; }
.iap-tier-note .i { width: 14px; height: 14px; margin-top: 2px; flex: none; }
.iap-items { overflow: auto; padding: 10px; border-right: 1px solid var(--line); }
.iap-items li + li { margin-top: 2px; }
.iap-items button { display: grid; gap: 2px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--ink); transition: background-color .15s ease; }
.iap-items button:hover { background: var(--bg-hover); }
.iap-items button[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.iap-items__name { font-size: 13.5px; font-weight: 580; overflow-wrap: anywhere; }
.iap-items__meta { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.iap-main { overflow: auto; padding: 14px 22px 20px; min-width: 0; }
.iap-main__head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.iap-main__title { font-size: 15.5px; font-weight: 640; overflow-wrap: anywhere; min-width: 0; }
.iap-select { display: none; }
.price-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 9px 10px; text-align: left; vertical-align: middle; }
.price-table thead th { position: sticky; top: -14px; z-index: 1; background: var(--bg-elev); color: var(--ink-3); font-size: 12px; font-weight: 560; border-bottom: 1px solid var(--line); }
.price-table tbody tr { border-top: 1px solid var(--line); }
.price-table tbody tr:first-child { border-top: 0; }
.price-table tbody th { font-weight: 560; white-space: nowrap; }
.price-table tbody th a { color: var(--ink); text-decoration: none; }
.price-table tbody th a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.price-table tbody th .tag { margin-left: 4px; height: 20px; font-size: 11px; }
.price-table td.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.price-table .cny { font-weight: 620; }
.price-table tr.is-lowest .cny { color: var(--ok); }
.price-table .bar { display: block; height: 3px; margin-top: 5px; border-radius: 2px; background: var(--bg-sunken); overflow: hidden; max-width: 160px; }
.price-table .bar > span { display: block; height: 100%; border-radius: 2px; background: var(--accent); opacity: .7; }
.price-table tr.is-lowest .bar > span { background: var(--ok); opacity: 1; }
.price-table .col-rel { color: var(--ink-3); white-space: nowrap; }
.price-table td.is-low { color: var(--ok); font-weight: 620; }
.price-table .rel-inline { display: none; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.iap-status { display: grid; gap: 6px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-size: 12.5px; }
.iap-status > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.iap-status dt { color: var(--ink-3); }
.iap-status dd { color: var(--ink-2); overflow-wrap: anywhere; }
.iap-status .is-bad dt, .iap-status .is-bad dd { color: var(--bad); }
.iap-hint { margin-top: 10px; color: var(--ink-3); font-size: 12px; }
.iap-regions-wrap { flex: 1; min-height: 0; overflow: auto; padding: 14px 22px 20px; }
.iap-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.iap-region { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg-elev); min-width: 0; }
.iap-region header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.iap-region header a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 620; text-decoration: none; }
.iap-region header a .i { width: 12px; height: 12px; color: var(--ink-3); }
.iap-region__cur { margin-left: auto; color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.iap-region li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.iap-region li:first-child { border-top: 0; }
.iap-region__name { overflow-wrap: anywhere; }
.iap-region .mono { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.iap-region .cny { min-width: 64px; text-align: right; font-weight: 600; }
.empty--flat { margin: 24px 22px; }
@media (max-width: 760px) {
  .sheet { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .sheet--compact, .sheet--compact .sheet__inner { max-height: 100dvh; height: 100dvh; }
  .dl-body { padding: 14px 16px 24px; }
  .sheet__head { padding: 14px 16px 12px; }
  .sheet__foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .sheet__body { overflow: auto; }
  .iap-toolbar, .iap-notices { padding-left: 16px; padding-right: 16px; }
  .iap-split { display: block; }
  .iap-items { display: none; }
  .iap-main, .iap-regions-wrap { overflow: visible; padding: 12px 16px 20px; }
  .iap-select { display: flex; flex: 1 1 100%; width: 100%; height: 42px; }
  .iap-toolbar .filter, .iap-main__head .filter { flex: 1 1 100%; width: 100%; }
  .iap-toolbar__tools { flex: 1 1 100%; }
  .iap-currency { flex: 1 1 100%; height: 40px; }
  .iap-currency select { flex: 1; min-width: 0; }
  .iap-select select { flex: 1; min-width: 0; }
  .iap-main__title { display: none; }
  .iap-main__head .filter { width: 100%; }
  .price-table thead th { top: 0; }
  .price-table .col-rel { display: none; }
  .price-table .rel-inline { display: inline; }
  .price-table th, .price-table td { padding: 9px 6px; }
  .price-table tbody th .tag { display: none; }
  .price-table tbody th .tag--cached { display: inline-flex; margin-left: 0; }
  .iap-btn { min-height: 36px; }
}

/* Download commands dialog */
.sheet--compact { width: min(760px, calc(100vw - 32px)); height: fit-content; max-height: min(860px, calc(100vh - 48px)); }
.sheet--compact .sheet__inner { height: auto; max-height: min(860px, calc(100vh - 48px)); }
.dl-body { overflow: auto; padding: 16px 22px 24px; display: grid; gap: 18px; }
.dl-body > .callout { margin: 0; }
.dl-section h3 { font-size: 15px; font-weight: 650; margin-bottom: 8px; }
.dl-section h3 a { color: var(--accent-ink); text-decoration: none; }
.dl-section h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dl-steps { display: grid; gap: 12px; counter-reset: dl; }
.dl-steps > li { position: relative; padding-left: 30px; counter-increment: dl; display: grid; gap: 6px; }
.dl-steps > li::before { content: counter(dl); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--bg-sunken); color: var(--ink-2); font-size: 11.5px; font-weight: 650; }
.dl-step__title { font-size: 13.5px; font-weight: 600; }
.cmd { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-sunken); }
.cmd code { font-size: 12.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 3px; }
.dl-note { color: var(--ink-3); font-size: 12.5px; }
.dl-note a, .dl-links a { color: var(--accent-ink); }
.dl-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.dl-links a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.dl-links .i { width: 12px; height: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .intro-grid { grid-template-columns: minmax(0, 1fr); }
  .dev-grid { grid-template-columns: minmax(0, 1fr); }
  .composer__keys { display: none; }
  .options__hint { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 14px; }
  .topbar__inner { gap: 8px; }
  .topnav__optional, .topnav__long, .brand__product { display: none; }
  .hero { padding-top: 22px; }
  .eyebrow { display: none; }
  .hero h1 { margin-top: 0; }
  .hero h1 { font-size: 27px; }
  .hero__lede { font-size: 14.5px; }
  .composer { margin-top: 20px; border-radius: 14px; }
  .composer__tabs { padding: 0 4px; }
  .tab { height: 46px; padding: 0 10px; }
  .searchbox { flex-wrap: wrap; padding: 8px 8px 8px 14px; gap: 6px; }
  .searchbox input { font-size: 16.5px; height: 44px; }
  .detect { order: 4; margin-left: 28px; }
  .searchbox__submit { order: 5; flex: 1 0 100%; height: 46px; }
  .btn { height: 42px; }
  .btn--sm { height: 36px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn--sm { width: 34px; height: 34px; }
  .composer__options { gap: 8px; }
  .seg { display: flex; width: 100%; }
  .seg__opt { flex: 1; }
  .seg__opt span { justify-content: center; width: 100%; height: 34px; padding: 0 6px; }
  .field { flex: 1 1 calc(50% - 4px); min-width: 0; height: 40px; }
  .field select { flex: 1; min-width: 0; }
  .batch-actions { width: 100%; }
  .batch-actions .btn { flex: 1; }
  .examples { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px; scrollbar-width: none; }
  .examples::-webkit-scrollbar { display: none; }
  .example { flex: none; height: 34px; }
  .results { margin-top: 32px; }
  .results-head__tools { width: 100%; }
  .filter { flex: 1; overflow-x: auto; scrollbar-width: none; }
  .filter button { flex: 1; height: 32px; }
  .hit { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; gap: 4px 12px; }
  .hit__icon { width: 40px; height: 40px; border-radius: 10px; }
  .hit__aside { grid-column: 2 / -1; justify-content: space-between; margin-top: 8px; }
  .hit__aside-row { flex: 1; justify-content: flex-end; }
  .hit__aside .record { height: 36px; }
  .hit__aside .btn--sm { height: 40px; padding: 0 14px; }
  .hit__aside .icon-btn--sm { width: 40px; height: 40px; }
  .details { grid-column: 1 / -1; }
  .details dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .idchip { min-height: 36px; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .section { margin-top: 56px; }
  .chip { height: 36px; }
  .download__path { justify-self: start; text-align: left; grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .details dl { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (forced-colors: active) {
  .tag, .record, .chip, .idchip, .hits, .composer { border: 1px solid CanvasText; }
}

/* 应用宝 official APK link in the download dialog */
.dl-official { display: grid; gap: 6px; }
.dl-official__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dl-official__meta { font-size: 13px; opacity: .75; }
