:root {
  --brand: #292D39; --navy: #13264D; --bg: #F4F6FA; --header-bg: #F4F5F7;
  --card-border: #DDE2EB; --muted: #5B6577; --text: #1B2333; --drop-border: #B9C1D0;
  --ok: #1E7B4A; --err: #B3261E;
  font-family: "Segoe UI", system-ui, -apple-system, "DejaVu Sans", Arial, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
a { color: var(--brand); }
button, select, input { font: inherit; }

.site-header {
  background: var(--header-bg); border-bottom: 3px solid var(--brand);
  min-height: 74px; padding: 10px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.wordmark { height: 32px; width: auto; display: block; }
.divider { width: 1px; height: 42px; background: #C9CED8; flex: none; }
.titles h1 { margin: 0; font-size: 22.5px; font-weight: 700; color: var(--brand); line-height: 1.15; }
.site-link { font-size: 12px; color: var(--brand); }
.about-link { background: none; border: 0; padding: 4px; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.about-link:hover, .linklike:hover { color: var(--brand); }

main { width: 100%; max-width: 860px; margin: 0 auto; padding: 14px 16px 8px; flex: 1; }
.privacy { margin: 0 0 12px; padding: 9px 14px; background: #E9EEF6; border: 1px solid var(--card-border); border-left: 4px solid var(--navy); color: var(--text); font-size: 13px; }
.lock { display: inline-block; width: 10px; height: 8px; border: 2px solid var(--navy); border-radius: 2px; margin-right: 8px; position: relative; top: 1px; }
.lock::before { content: ""; position: absolute; left: 0; top: -7px; width: 6px; height: 6px; border: 2px solid var(--navy); border-bottom: 0; border-radius: 4px 4px 0 0; }

.card { background: #fff; border: 1px solid var(--card-border); padding: 12px 14px 12px; margin-bottom: 10px; }
.card h2 { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: var(--brand); }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 118px; border: 2px dashed var(--drop-border); background: #F7F8FB; cursor: pointer; text-align: center; padding: 16px;
}
.drop:hover, .drop:focus-visible, body.dragging .drop { border-color: var(--navy); background: #EEF2F8; outline: none; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-title { font-size: 17px; font-weight: 700; color: var(--brand); }
.drop-sub { color: var(--muted); font-size: 12.5px; }
.hint, .muted { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.center { text-align: center; }

.opt-row { display: flex; align-items: center; gap: 16px; }
.opt-row label { width: 114px; }
select { min-width: 230px; padding: 6px 8px; border: 1px solid #B9C1D0; border-radius: 3px; background: #fff; color: var(--text); }

.action-row { display: flex; align-items: center; gap: 14px; margin: 4px 0 6px; flex-wrap: wrap; }
.primary { background: var(--brand); color: #fff; border: 0; padding: 0 30px; height: 36px; font-size: 15px; font-weight: 700; cursor: pointer; }
.primary:hover { background: #1c1f28; }
.primary:disabled { opacity: .6; cursor: progress; }
.progress { width: 230px; height: 22px; background: #E3E7EF; position: relative; overflow: hidden; }
.progress span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--navy); transition: width .15s; }
.status { margin: 0 0 10px 2px; color: var(--muted); font-size: 13px; min-height: 1.3em; }
.status.err { color: var(--err); }

.result { min-height: 120px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.results li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; background: #F7F8FB; border: 1px solid #E6E9F0; }
.results .name { font-weight: 700; word-break: break-all; }
.results .meta { color: var(--muted); font-size: 12px; margin-top: 2px; word-break: break-all; }
.results .ok::before { content: "✓"; margin-right: 8px; color: var(--brand); }
.results .bad .name::before { content: "✕"; margin-right: 8px; color: var(--err); }
.results .bad .meta { color: var(--err); }
.results .busy .name::before { content: "…"; margin-right: 8px; }
.btn, .dl { display: inline-block; background: #fff; color: var(--text); border: 1px solid #9AA3B2; border-radius: 3px; padding: 5px 12px; cursor: pointer; text-decoration: none; font-size: 13px; white-space: nowrap; }
.btn:hover, .dl:hover { border-color: var(--brand); }
.foot { color: var(--muted); font-size: 11.5px; margin: 6px 2px 0; }

.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: 860px; width: 100%; margin: 0 auto; padding: 10px 18px 18px; color: var(--muted); font-size: 12px; }
.site-footer a, .linklike { color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-size: inherit; }

dialog { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 1px solid var(--card-border); padding: 0; color: var(--text); box-shadow: 0 10px 40px rgba(20, 30, 50, .25); }
dialog::backdrop { background: rgba(30, 36, 50, .45); }
.about-head { text-align: center; padding: 18px 24px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wordmark-lg { height: 30px; width: auto; }
.about-head h2 { margin: 4px 0 0; font-size: 21px; color: var(--brand); }
.about-body { padding: 4px 26px; font-size: 13px; line-height: 1.45; }
.about-body h3 { font-size: 13.5px; margin: 12px 0 2px; color: var(--navy); }
.about-body p { margin: 0 0 9px; }
.about-actions { display: flex; justify-content: center; gap: 10px; padding: 10px 0 16px; position: sticky; bottom: 0; background: #fff; border-top: 1px solid #EEF0F4; }
.noscript { text-align: center; color: var(--err); }

@media (max-width: 620px) {
  .site-header { padding: 10px 12px; flex-wrap: wrap; row-gap: 2px; }
  .about-link { margin-left: auto; }
  .titles h1 { white-space: nowrap; }
  .wordmark { height: 22px; }
  .divider { height: 34px; }
  .titles h1 { font-size: 18px; }
  .brand { gap: 10px; }
  .opt-row { flex-direction: column; align-items: stretch; gap: 6px; }
  select { width: 100%; }
  .progress { width: 100%; }
  .primary { width: 100%; }
}
