:root {
  color: #241a35;
  background: #f6f4fa;
  font: 15px/1.65 "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  --muted: #665b75;
  --line: #e8e1ef;
  --purple: #69429a;
  --light: #f3edf9;
  --paper: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #8255bc; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.site-header { background: #fcfafd; border-bottom: 1px solid #eee8f3; }
.topbar { min-height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 11px; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand strong { font-size: 16px; letter-spacing: .09em; }
.brand small { margin-top: 4px; font-size: 9px; letter-spacing: .24em; color: var(--muted); }
.brand-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: #332147; color: #e9d4ff; font-size: 24px; line-height: 1; }
.local { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; color: #534464; background: #f0eaf6; border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.local span { width: 6px; height: 6px; border-radius: 50%; background: #8060ad; }
.hero { margin-top: 32px; border-radius: 24px; position: relative; isolation: isolate; overflow: hidden; min-height: 248px; color: #f9f0ff; background: radial-gradient(ellipse at 77% 60%, #3e285c, transparent 58%), linear-gradient(115deg,#251633,#312047 70%,#2c1b44); box-shadow: 0 14px 32px #2d164426; }
.hero-content { position: relative; z-index: 1; padding: 28px 42px 31px; }
.eyebrow { color: #d5bdee; font-size: 12px; font-weight: 650; letter-spacing: .2em; }
.eyebrow span { font-size: 16px; vertical-align: middle; margin-right: 3px; }
h1, h2, p { margin: 0; }
.hero h1 { font-family: "Noto Serif CJK SC", "Songti SC", "SimSun", serif; font-size: clamp(34px,5vw,53px); letter-spacing: .05em; line-height: 1.17; margin: 9px 0 12px; font-weight: 700; }
.hero p { color: #e5d7f3; font-size: 14px; letter-spacing: .035em; }
.hero-art { position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: min(54%,550px); height: auto; }
.search-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; margin: 22px 0 28px; padding: 15px 18px 13px; box-shadow: 0 5px 15px #30204008; }
.search-row { display: flex; align-items: center; gap: 12px; padding: 6px 7px 6px 13px; background: #fbf8fd; border: 1px solid #e6dced; border-radius: 13px; }
.search-row:focus-within { border-color: #ad8cce; }
.search-row input { flex: 1; min-width: 0; padding: 5px 0; border: 0; background: transparent; color: inherit; outline: 0; }
.search-row input::placeholder { color: #786e82; }
.search-icon, .selection-icon { display: grid; place-items: center; color: var(--purple); }
.search-icon svg, .selection-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.primary { border: 1px solid transparent; border-radius: 10px; background: var(--purple); color: #fff; font-weight: 650; padding: 8px 14px; white-space: nowrap; }
.primary:hover:not(:disabled) { background: #57347f; }
.primary:disabled { background: #eae3f0; color: #64576f; }
.primary span { margin-left: 6px; }
.search-options { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 11px; color: var(--muted); font-size: 12px; }
.examples, .dataset { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.examples button { padding: 2px 10px; border: 1px solid #e9e0f2; background: #f7f1fb; color: #5b3b78; border-radius: 999px; }
.examples button:hover { background: #ede1f7; }
select { color: #514160; background: #fff; border: 1px solid var(--line); padding: 4px 7px; border-radius: 8px; max-width: 100%; }
.desk-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(245px, 305px); gap: 22px; align-items: start; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
h2 { line-height: 1.28; font-size: 19px; letter-spacing: .035em; }
.results-heading p, .selection-heading p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.source-filter { flex: 0 1 38%; min-width: 0; text-align: right; }
.source-filter select { font-size: 12px; }
.result-count { display: inline-block; margin-left: 4px; vertical-align: middle; background: #ece2f5; color: #5b3b78; font-size: 11px; letter-spacing: 0; border-radius: 30px; padding: 2px 8px; }
.results { display: grid; gap: 11px; }
.result, .selection { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.result { padding: 15px 17px; min-width: 0; box-shadow: 0 2px 6px #30204005; }
.result.is-picked { border-color: #a681c6; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; color: var(--muted); font-size: 12px; }
.rank { font-variant-numeric: tabular-nums; font-weight: 700; color: #765394; }
.tag { background: var(--light); color: #5b3b78; border-radius: 7px; padding: 2px 8px; font-weight: 600; }
.result p.excerpt { margin: 9px 0 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-actions { display: flex; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.match-info { color: var(--muted); font-size: 11px; }
.row-buttons { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.quiet, .pick, .clear-button { border: 1px solid transparent; border-radius: 8px; background: transparent; color: #634585; font-size: 12px; padding: 4px 8px; }
.quiet:hover, .clear-button:hover { background: var(--light); }
.pick { border-color: #e5d8ef; background: #faf6fd; }
.pick:hover, .pick[aria-pressed="true"] { background: #ede1f7; border-color: #b89bd2; }
.selection { position: sticky; top: 15px; padding: 16px; box-shadow: 0 6px 15px #30204008; }
.selection-heading { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #eee8f3; }
.selection-icon { width: 37px; height: 37px; flex: none; border-radius: 11px; background: var(--light); }
.selection-count { margin: 10px 0 7px; color: var(--muted); font-size: 12px; }
.copy-button { width: 100%; font-size: 13px; }
.clear-button { display: block; margin: 5px auto 0; }
.copy-status { color: #604280; font-size: 12px; margin-top: 4px; }
.copy-status:empty { display: none; }
.placeholder { border: 1px dashed #dcd0e7; border-radius: 10px; padding: 13px; text-align: center; color: var(--muted); background: #fbf9fd; font-size: 13px; }
.selection .placeholder, .picked { margin-top: 10px; }
.picked { position: relative; border-radius: 9px; padding: 8px 30px 8px 10px; background: #f7f2fa; border: 1px solid #ebe1f1; }
.picked h3 { font-size: 12px; color: #5b3b78; margin: 0; }
.picked p { font-size: 12px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.picked button { position: absolute; top: 4px; right: 5px; }
.error { color: #852d50; }
footer { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: #6f627c; font-size: 11px; letter-spacing: .13em; padding: 27px 0 30px; }
footer > span:first-child { color: var(--purple); font-size: 15px; }
.footer-divider { height: 1px; width: 21px; background: #d2c3df; }
dialog { width: min(680px,calc(100% - 28px)); max-height: min(78vh,800px); padding: 0; border: 1px solid #e0d3eb; border-radius: 18px; color: inherit; box-shadow: 0 20px 55px #21143160; }
dialog::backdrop { background: #26183ba1; }
.dialog-header { display: flex; justify-content: space-between; gap: 10px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: #faf6fc; }
.dialog-header p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.dialog-close { border: 1px solid var(--line); background: #fff; color: var(--purple); border-radius: 8px; font-size: 24px; width: 33px; height: 33px; line-height: 1; }
.original-text { padding: 17px 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.drawing-notes { margin: 0 0 14px; }
.drawing-notes h3 { font-size: 13px; color: #5b3b78; margin-bottom: 7px; }
.drawing-note-list { display: grid; gap: 8px; }
.drawing-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 12px 15px; border: 1px solid #e5d8ef; border-radius: 14px; background: #faf6fd; }
.drawing-note h4 { font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.drawing-note p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.drawing-body { padding: 14px 20px 20px; }
.drawing-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.drawing-references { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fbf9fd; }
.drawing-references summary { color: #5b3b78; font-weight: 600; cursor: pointer; }
.drawing-reference-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.drawing-reference-list button { max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.drawing-preview { margin: 10px 0 0; }
.drawing-preview img { display: block; max-width: 100%; max-height: min(42vh, 420px); margin-inline: auto; border-radius: 8px; }
.drawing-preview figcaption { display: flex; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: 12px; }
.drawing-preview a { color: #634585; }
.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; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .hero { margin-top: 18px; min-height: 218px; border-radius: 19px; }
  .hero-content { padding: 24px 24px 26px; }
  .hero-art { right: -48px; width: 400px; opacity: .54; }
  .search-panel { margin: 15px 0 20px; padding: 11px; }
  .desk-grid { grid-template-columns: 1fr; gap: 16px; }
  .selection { position: static; grid-row: 1; }
}
@media (max-width: 430px) {
  .hero p { max-width: 240px; }
  .hero-art { right: -94px; width: 345px; opacity: .42; }
  .search-row { gap: 7px; padding-left: 8px; }
  .search-button { padding-inline: 8px; font-size: 12px; }
  .search-button span { display: none; }
  .search-row input { font-size: 16px; }
  .result-actions { justify-content: flex-start; }
}
