:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --text: #1d1d1f;
  --text-dim: #6e6e73;
  --accent: #0a84ff;
  --border: #d2d2d7;
  --error-bg: #ffecec;
  --error-text: #c53030;
  --tab-active-bg: #ffffff;
  --kbd-bg: #e8e8ed;
  --diff-bg: #ffd7a8;
  --attn: #e8590c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e20;
    --panel: #2a2a2d;
    --text: #f5f5f7;
    --text-dim: #98989d;
    --accent: #0a84ff;
    --border: #3d3d41;
    --error-bg: #3a2426;
    --error-text: #ff8a80;
    --tab-active-bg: #2a2a2d;
    --kbd-bg: #3a3a3e;
    --diff-bg: #5c3a12;
    --attn: #ff922b;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); color-scheme: light dark; }
body { margin: 0; min-width: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
.page-shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 92px; }
.hero { text-align: center; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 600; }
.hero h1 { margin: 0; font-size: clamp(34px, 7vw, 52px); line-height: 1.05; letter-spacing: -0.04em; }
.subtitle { margin: 10px 0 0; color: var(--text-dim); font-size: 15px; }
.dropzone { min-height: 230px; padding: 34px 24px 24px; border: 1.5px dashed var(--border); border-radius: 18px; background: color-mix(in srgb, var(--panel) 78%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.dropzone strong { display: block; font-size: 18px; margin-bottom: 5px; }
.dropzone span { color: var(--text-dim); }
.privacy-note { max-width: 520px; margin: 2px 0 0; color: var(--text-dim); font-size: 12px; }
.primary-button { appearance: none; border: 0; border-radius: 9px; padding: 9px 18px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.primary-button:hover { filter: brightness(1.06); }
.primary-button:disabled { opacity: .45; cursor: default; }
.panel { margin-top: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.section-kicker { color: var(--text-dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.version-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 8px; background: var(--kbd-bg); color: var(--text-dim); font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stats-grid > div { padding: 12px; border-radius: 10px; background: var(--kbd-bg); }
.stats-grid span { display: block; color: var(--text-dim); font-size: 11px; }
.stats-grid strong { display: block; margin-top: 3px; font-size: 15px; }
.target-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.target-card { position: relative; min-height: 112px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.target-card:hover:not(:disabled), .target-card.selected { border-color: var(--accent); }
.target-card.selected { box-shadow: inset 0 0 0 1px var(--accent); }
.target-card:disabled { opacity: .38; cursor: default; }
.target-title { display: block; font-size: 15px; font-weight: 650; }
.target-subtitle { display: block; margin-top: 5px; max-width: 85%; color: var(--text-dim); font-size: 12px; }
.route-tag { position: absolute; right: 10px; bottom: 10px; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 650; }
.route-tag.validated { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.route-tag.beta { color: var(--attn); background: color-mix(in srgb, var(--attn) 12%, transparent); }
.compatibility-status { margin: 9px 0 0; }
.compatibility-list, .result-notes { margin: 12px 0 0; padding: 0; list-style: none; }
.compatibility-list li, .result-notes li { padding: 9px 0; border-top: 1px solid var(--border); }
.compatibility-list li strong, .compatibility-list li span { display: block; }
.compatibility-list li span, .compatibility-list li.note, .result-notes li { color: var(--text-dim); font-size: 12px; }
.action-panel { margin-top: 18px; text-align: center; }
.convert-button { width: 100%; appearance: none; padding: 13px 18px; border: 1.5px solid var(--attn); border-radius: 11px; background: transparent; color: var(--attn); font-weight: 650; cursor: pointer; }
.convert-button:hover:not(:disabled) { background: color-mix(in srgb, var(--attn) 8%, transparent); }
.convert-button:disabled { opacity: .45; cursor: default; }
.progress-wrap { margin-top: 12px; text-align: left; color: var(--text-dim); font-size: 12px; }
.progress-track { width: 100%; height: 5px; border-radius: 999px; background: var(--kbd-bg); overflow: hidden; margin-bottom: 6px; }
.progress-bar { width: 0; height: 100%; background: var(--attn); transition: width .15s ease; }
.result-meta { margin: 18px 0 0; }
.result-meta > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); }
.result-meta dt { color: var(--text-dim); }
.result-meta dd { margin: 0; overflow-wrap: anywhere; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.error-box { margin-top: 14px; padding: 13px 15px; border-radius: 11px; background: var(--error-bg); color: var(--error-text); white-space: pre-wrap; font: inherit; }
.footer { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; min-height: 46px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 8px; padding: 8px 18px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); }
.footer-link { border: 0; background: transparent; padding: 5px; color: var(--text-dim); text-decoration: none; cursor: pointer; }
.footer-left { justify-self: start; }
.footer-center { justify-self: center; }
.footer-right { justify-self: end; color: var(--accent); }
.drag-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--bg)); border: 4px solid var(--accent); color: var(--accent); font-size: 24px; font-weight: 700; }
.modal { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(0 0 0 / .38); }
.modal-card { position: relative; width: min(460px, 100%); padding: 25px; border-radius: 16px; background: var(--panel); box-shadow: 0 18px 60px rgb(0 0 0 / .2); }
.modal-card h2 { margin: 0 0 12px; }
.modal-card p { color: var(--text-dim); }
.modal-close { position: absolute; top: 9px; right: 12px; border: 0; background: transparent; color: var(--text-dim); font-size: 24px; cursor: pointer; }
.licenses { font-size: 11px; }
@media (max-width: 720px) {
  .page-shell { width: min(100% - 22px, 760px); padding-top: 38px; }
  .dropzone { min-height: 190px; padding-inline: 18px; }
  .target-grid, .stats-grid { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; align-items: stretch; }
  .version-badge { align-self: flex-start; }
  .result-meta > div { grid-template-columns: 1fr; gap: 3px; }
  .footer { grid-template-columns: 1fr auto; font-size: 11px; }
  .footer-center { display: none; }
  .footer-right { grid-column: 2; }
}
