:root {
  --panel: rgba(23, 34, 59, 0.92);
  --panel-2: rgba(15, 23, 42, 0.88);
  --border: rgba(148, 163, 184, 0.22);
  --text: #eaf1fb;
  --muted: #9fb2cc;
  --accent: #3B82F6;
  --accent-2: #7cb0ff;
  --accent-hov: #2563eb;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 12px;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.10);
  --glass-brd: rgba(255, 255, 255, 0.13);
  --blur: blur(18px) saturate(150%);
  --shadow: 0 12px 40px rgba(2, 6, 23, 0.4);
  --grad-primary: linear-gradient(135deg, #60a5fa 0%, #3B82F6 55%, #2563eb 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; }

.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.14em; }
.ic-accent { color: var(--accent-2); }
.ic-fill { fill: currentColor; stroke: none; }
.db-btn, .seg-btn, .db-head-link, .db-icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); font-size: 15px; line-height: 1.5;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 100% -10%, rgba(59, 130, 246, 0.26), transparent 55%),
    radial-gradient(1000px 700px at -8% 108%, rgba(37, 99, 235, 0.2), transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #0e1730 55%, #0a1020 100%);
  background-attachment: fixed;
}
[hidden] { display: none !important; }
h2 { margin: 0; }

* { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, 0.4) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.38); border-radius: 999px;
  border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

.db-head { border-bottom: 1px solid var(--glass-brd); background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  position: sticky; top: 0; z-index: 20; }
.db-head-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.db-logo { border-radius: 9px; flex: none; box-shadow: 0 3px 12px rgba(37, 99, 235, 0.45); }
.db-title { display: flex; flex-direction: column; line-height: 1.2; }
.db-title strong { font-size: 16px; }
.db-title span { font-size: 12px; color: var(--muted); }
.db-head-link { color: var(--accent-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.db-head-link:hover { text-decoration: underline; }

.db-main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 40px; }
.db-grid { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
@media (max-width: 860px) { .db-grid { grid-template-columns: 1fr; } }

.db-panel {
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 18px; padding: 20px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.db-setup { position: sticky; top: 82px; }
@media (max-width: 860px) { .db-setup { position: static; } }
.db-h2 { font-size: 15px; letter-spacing: .01em; }

.db-label { display: block; font-size: 12px; font-weight: 600; margin: 16px 0 6px; }
.db-label:first-of-type { margin-top: 14px; }
.db-label span { font-weight: 400; color: var(--muted); }
.db-help { float: right; font-size: 11px; font-weight: 600; color: var(--accent-2); text-decoration: none; }
.db-help:hover { text-decoration: underline; }

.db-tools { margin-left: auto; display: flex; align-items: flex-start; gap: 18px; flex: none; }
.db-tool-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.db-tool-cap { font-size: 10.5px; color: var(--muted); white-space: nowrap; line-height: 1; }
@media (max-width: 1020px) { .db-tool-cap { display: none; } .db-tools { align-items: center; gap: 10px; } }
.pop-tool { height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 12px; border: 1px solid var(--glass-brd); border-radius: 7px; background: var(--glass); color: var(--muted);
  cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: color .15s, border-color .15s, background .15s; }
.pop-tool:hover { color: var(--accent-2); border-color: var(--accent); }
.pop-tool .ic { width: 15px; height: 15px; }
.pop-tool.is-on { background: var(--grad-primary); border-color: transparent; color: #fff; }
.pop-tool.is-ok { background: linear-gradient(135deg, #34d399, #22c55e); border-color: transparent; color: #fff; }
.pop-toolseg { display: flex; flex: none; border: 1px solid var(--glass-brd); border-radius: 7px; overflow: hidden; }
.pop-toolseg .pop-tool { border: none; border-radius: 0; }
.pop-toolseg .pop-tool + .pop-tool { border-left: 1px solid var(--glass-brd); }

.pop-inctog { position: relative; width: 44px; height: 24px; flex: none; padding: 0; border: none; background: none; cursor: pointer; margin-top: 3px; }
.pop-inctog-track { position: absolute; inset: 0; border-radius: 999px; background: rgba(148, 163, 184, 0.35);
  border: 1px solid var(--glass-brd); transition: background .2s, border-color .2s; }
.pop-inctog-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(2, 6, 23, 0.5);
  transition: transform .2s; }
.pop-inctog-knob .ic { width: 13px; height: 13px; color: #1f2937; stroke-width: 2.2; }
.pop-inctog.is-on .pop-inctog-track { background: var(--accent); border-color: var(--accent); }
.pop-inctog.is-on .pop-inctog-knob { transform: translateX(20px); }
.pop-inctog.is-disabled { opacity: .5; }
.pop-inctog:focus-visible .pop-inctog-track { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35); }

.pop-saved-wrap { margin-bottom: 4px; }
.pop-saved-row { display: flex; gap: 6px; }
.pop-saved-row .pop-saved-toggle { flex: 1; min-width: 0; }
.pop-saved-new { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 9px 12px;
  border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--glass); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.pop-saved-new:hover { border-color: var(--accent); color: var(--accent-2); }
.pop-saved-new .ic { width: 13px; height: 13px; }
.pop-saved-new.is-ok { background: linear-gradient(135deg, #34d399, #22c55e); border-color: transparent; color: #fff; }

.pop-saved-toggle[hidden] { display: none; }
.pop-saved-toggle[hidden] + .pop-saved-new { flex: 1; justify-content: center; }
.pop-saved-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 11px;
  border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--glass); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.pop-saved-toggle:hover { border-color: var(--accent); }
.pop-saved-toggle .ic { width: 14px; height: 14px; color: var(--accent-2); }
.pop-saved-toggle .pop-saved-caret { margin-left: auto; color: var(--muted); transition: transform .2s; }
.pop-saved-toggle[aria-expanded="true"] .pop-saved-caret { transform: rotate(180deg); }
.pop-saved-menu { margin-top: 6px; max-height: 216px; overflow-y: auto;
  border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--panel); }
.pop-srow { display: flex; align-items: center; gap: 8px; padding: 8px 11px; cursor: pointer; border-bottom: 1px solid var(--glass-brd); }
.pop-srow:last-child { border-bottom: none; }
.pop-srow:hover { background: rgba(255, 255, 255, 0.05); }
.pop-srow-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-chip-fav { width: 16px; height: 16px; border-radius: 3px; flex: none; background: rgba(148, 163, 184, 0.18); }
.pop-srow-globe { flex: none; display: inline-flex; color: var(--muted); }
.pop-srow-globe .ic { width: 16px; height: 16px; }
.pop-chip-count { font-size: 10px; font-weight: 700; color: var(--muted); flex: none;
  background: rgba(148, 163, 184, 0.2); border-radius: 999px; padding: 0 6px; }
.pop-chip-del { flex: none; border: none; background: none; color: var(--muted); font-size: 15px; line-height: 1;
  cursor: pointer; padding: 0 4px; border-radius: 4px; }
.pop-chip-del:hover { color: var(--red); }

.pop-runtab-fav { flex: none; display: inline-flex; color: var(--muted); }
.pop-runtab-fav .ic { width: 16px; height: 16px; }
.runpick-ovl { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(2, 6, 23, 0.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.runpick { width: 100%; max-width: 520px; max-height: 100%; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.55); padding: 16px; }
.runpick-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--text); }
.runpick-opt { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 13px; margin-top: 9px;
  border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--glass); cursor: pointer; }
.runpick-opt:hover { border-color: var(--accent); }
.runpick-opt.is-sel { border-color: rgba(59, 130, 246, 0.6); background: rgba(59, 130, 246, 0.14); }
.runpick-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.runpick-opt-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; background: rgba(148, 163, 184, 0.14); color: var(--muted); }
.runpick-opt-ico .ic { width: 16px; height: 16px; }
.runpick-opt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.runpick-opt-title { font-size: 14px; font-weight: 700; color: var(--text); }
.runpick-opt-desc { font-size: 12px; line-height: 1.4; color: var(--muted); }

.runpick-incog { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--glass-brd); cursor: pointer; }
.runpick-incog-label { flex: none; font-size: 12.5px; font-weight: 600; color: var(--text); }
.runpick-incog-note { flex: 1; min-width: 0; font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runpick-incog .pop-inctog { margin-top: 0; margin-left: auto; }
.runpick-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; padding: 2px 0;
  background: none; border: none; color: var(--accent-2); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; align-self: flex-start; }
.runpick-more:hover { text-decoration: underline; }
.runpick-more .ic { width: 14px; height: 14px; transition: transform .2s; }
.runpick-more[aria-expanded="true"] .ic { transform: rotate(180deg); }
.runpick-tabs { margin-top: 6px; flex: 0 1 auto; min-height: 0; max-height: 230px; overflow-y: auto;
  border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--panel); }
.runpick .pop-srow.is-sel { background: rgba(59, 130, 246, 0.16); }
.runpick .pop-srow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.runpick-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.runpick-cancel { padding: 9px 16px; border: 1px solid var(--glass-brd); border-radius: var(--radius);
  background: var(--glass); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.runpick-cancel:hover { border-color: var(--accent); }

.db-start-note { margin-top: 8px; text-align: center; }

.kw-summary { display: flex; align-items: center; gap: 9px; padding: 8px 9px 8px 11px;
  border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--glass); }
.kw-summary-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.kw-summary-count { flex: none; font-size: 13px; font-weight: 700; color: var(--text); }
.kw-summary-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--muted); }
.kw-edit-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--glass);
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.kw-edit-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.kw-edit-btn .ic { width: 13px; height: 13px; }

textarea, input[type="text"], input[type="number"], select {
  width: 100%; padding: 9px 11px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-brd); border-radius: var(--radius);
  color: var(--text); font: inherit; outline: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .15s, box-shadow .15s;
}
textarea::placeholder, input::placeholder { color: rgba(159, 178, 204, 0.7); }
textarea { resize: vertical; min-height: 120px; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22); }
select { cursor: pointer; }
select option { background: #131f38; color: var(--text); }

.db-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

#start-btn { position: sticky; bottom: 14px; z-index: 6; }

.db-runmode { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.db-runmode-label { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg-mini { flex: 1; max-width: 380px; }
.seg-mini .seg-btn { padding: 7px 6px; font-size: 12px; }

.db-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; font-size: 12.5px;
  color: var(--muted); cursor: pointer; line-height: 1.5; }
.db-check input { width: auto; margin-top: 3px; flex: none; }
.db-check strong { color: var(--text); }
.db-next { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(59,130,246,.05));
  border: 1px solid rgba(59,130,246,.32); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.db-next-msg { margin: 0 0 10px; font-size: 13px; color: var(--text); }
.db-next-msg:empty { display: none; }
.db-next-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.db-next .db-btn-primary { margin-top: 0; width: auto; padding: 11px 18px; }
.db-msg { margin: 12px 0 0; font-size: 13px; padding: 9px 11px; border-radius: var(--radius);
  background: rgba(239, 68, 68, 0.14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.34);
  transition: opacity .35s; }

.db-msg.is-ok { background: rgba(34, 197, 94, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.34); }
.db-msg.is-ok::before { content: '✓ '; font-weight: 700; }
.db-msg.is-hide { opacity: 0; }

.db-btn {
  padding: 10px 16px; border: 1px solid var(--glass-brd); border-radius: var(--radius);
  background: var(--glass); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: border-color .15s, background .15s, transform .05s;
}
.db-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--glass-2); }
.db-btn:active:not(:disabled) { transform: translateY(1px); }
.db-btn:disabled { opacity: .45; cursor: not-allowed; }
.db-btn-primary { width: 100%; margin-top: 18px; background: var(--grad-primary); border-color: transparent; color: #fff;
  padding: 12px; font-size: 15px; box-shadow: 0 8px 22px rgba(59, 130, 246, 0.42); }
.db-btn-primary:hover:not(:disabled) { filter: brightness(1.06); background: var(--grad-primary); border-color: transparent; }
.db-btn-danger { color: #fff; background: linear-gradient(135deg, #f87171, #ef4444); border-color: transparent; }
.db-btn-danger:hover:not(:disabled) { filter: brightness(1.08); }

.seg { display: flex; gap: 8px; }
.seg-btn { flex: 1; padding: 9px 8px; border: 1px solid var(--glass-brd); border-radius: var(--radius);
  background: var(--glass); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: border-color .15s, color .15s, background .15s; }
.seg-btn:hover { border-color: var(--accent); color: var(--text); }
.seg-btn.is-on { background: var(--grad-primary); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4); }
.seg-sm .seg-btn { padding: 8px 10px; font-size: 13px; }

.db-sublabel { font-size: 12px; font-weight: 600; color: var(--muted); }

.db-resume { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(59, 130, 246, 0.4);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.db-resume p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--text); }
.db-resume-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.db-resume .db-btn-primary { margin-top: 0; width: auto; padding: 9px 16px; font-size: 14px; }

.db-icon-btn { flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--glass-brd);
  border-radius: var(--radius); background: var(--glass); color: var(--muted); cursor: pointer; font: inherit;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.db-icon-btn:hover { border-color: var(--red); color: var(--red); }

.db-results-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.db-loc { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-2); }

.db-progress { margin: 16px 0 12px; }
.db-progress-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; }
.db-count { color: var(--muted); font-weight: 500; }
.db-bar { height: 9px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; margin: 8px 0 6px;
  border: 1px solid var(--glass-brd); }
.db-bar-fill { height: 100%; width: 0; background: var(--grad-primary); transition: width .25s ease;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.6); }
.db-current { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.db-tip {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 14px; padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.32);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  animation: tip-in .35s ease;
}
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.db-tip-ico { font-size: 17px; line-height: 1.45; flex: none; color: var(--accent-2); display: inline-flex; }
.db-tip-body { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text); }
.db-tip-label { display: inline-block; margin-right: 6px; font-size: 10px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-2); }
.db-tip-body strong { color: #fff; font-weight: 700; }

.db-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.db-table-wrap { border: 1px solid var(--glass-brd); border-radius: var(--radius); overflow: auto; max-height: 62vh;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.db-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.db-table th, .db-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--glass-brd); vertical-align: top; }
.db-table thead th { position: sticky; top: 0; background: rgba(15, 23, 42, 0.92); font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted); z-index: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.db-table tbody tr:last-child td { border-bottom: none; }
.db-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }

.db-table tr.is-current td { background: rgba(59, 130, 246, 0.14); }
.db-table tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.db-table tr.is-current .kw-cell { color: var(--accent-2); font-weight: 600; }
.db-table .c-num { width: 40px; color: var(--muted); text-align: right; }
.db-table .c-rank { white-space: nowrap; }
.db-empty td { color: var(--muted); text-align: center; padding: 28px 12px; }
.kw-cell { max-width: 320px; word-break: break-word; }
.url-cell { max-width: 360px; }
.url-cell a { color: var(--accent-2); text-decoration: none; word-break: break-all; font-size: 13px; }
.url-cell a:hover { text-decoration: underline; }
.db-muted { color: var(--muted); font-size: 13px; }

.rank-badge { display: inline-block; min-width: 28px; text-align: center; padding: 2px 10px; border-radius: 99px; font-weight: 700; }
.rank-hit { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.rank-miss { color: var(--muted); }
.rank-pending { color: var(--accent-2); }

.db-history { margin-top: 22px; }
.db-history-head .db-h2 { display: inline-flex; align-items: center; gap: 8px; }
.db-history-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.db-history-controls { margin: 14px 0; }
.db-history-row { display: flex; gap: 8px; margin-top: 6px; }
.db-history-row select { flex: 1; min-width: 0; }
.db-history-row .db-icon-btn { flex: none; white-space: nowrap; }
.db-history-table-wrap { max-height: 70vh; }
#hist-compare-note { margin-top: 10px; }

.db-table .c-act { width: 84px; text-align: center; }
.row-retry { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid var(--glass-brd); border-radius: 9px; background: var(--glass); color: var(--muted); cursor: pointer;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: color .15s, border-color .15s; }
.row-retry:hover { color: var(--accent-2); border-color: var(--accent); }
.row-retry .ic { width: 16px; height: 16px; }
.spark { color: var(--accent-2); vertical-align: middle; }
.spark-cell { min-width: 84px; }

.delta { font-weight: 700; font-size: 13px; white-space: nowrap; }
.delta-up { color: #4ade80; }
.delta-down { color: #f87171; }
.delta-new { color: var(--accent-2); }
.delta-lost { color: #fca5a5; }
.delta-same { color: var(--muted); font-weight: 500; }

.db-foot { border-top: 1px solid var(--glass-brd); background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); margin-top: 10px; }
.db-foot-in { max-width: 1180px; margin: 0 auto; padding: 18px 20px 8px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.db-foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.db-foot-links a { color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; }
.db-foot-links a:hover { color: var(--accent-2); }
.db-foot-links .ic-fill { color: #f5b301; }
.db-foot-social { margin-left: auto; display: flex; gap: 10px; }
.db-foot-social a { color: var(--muted); display: inline-flex; width: 36px; height: 36px; align-items: center;
  justify-content: center; border: 1px solid var(--glass-brd); border-radius: 10px; background: var(--glass); }
.db-foot-social a:hover { color: var(--accent-2); border-color: var(--accent); }
.db-foot-social .ic { width: 17px; height: 17px; }
.db-foot-legal { max-width: 1180px; margin: 0 auto; padding: 2px 20px 18px; font-size: 12px; color: var(--muted); }
.db-foot-legal a { color: var(--accent-2); text-decoration: none; }
.db-foot-legal a:hover { text-decoration: underline; }

@media (prefers-color-scheme: light) {
  :root {
    --panel: rgba(255, 255, 255, 0.92);
    --panel-2: rgba(241, 245, 249, 0.9);
    --border: rgba(15, 23, 42, 0.12);
    --text: #0f172a;
    --muted: #5b6b83;
    --accent-2: #2563eb;
    --glass: rgba(255, 255, 255, 0.55);
    --glass-2: rgba(255, 255, 255, 0.8);
    --glass-brd: rgba(15, 23, 42, 0.1);
    --shadow: 0 12px 40px rgba(37, 99, 235, 0.14);
  }
  body {
    background:
      radial-gradient(1200px 700px at 100% -10%, rgba(59, 130, 246, 0.2), transparent 55%),
      radial-gradient(1000px 700px at -8% 108%, rgba(96, 165, 250, 0.18), transparent 55%),
      linear-gradient(160deg, #eef4ff 0%, #f7faff 55%, #eaf1ff 100%);
  }
  textarea, input[type="text"], input[type="number"], select { background: rgba(255, 255, 255, 0.7); }
  .db-bar { background: rgba(15, 23, 42, 0.08); }
  .db-table thead th { background: rgba(255, 255, 255, 0.92); }
  .db-tip-body strong { color: #0b1a3a; }
  select option { background: #ffffff; color: #0f172a; }
}
