:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e5e7eb;
  --accent: #1f6feb; --accent-2: #0f9d58; --warn: #d97706; --bad: #dc2626;
  --a: #2563eb; --b: #e11d48;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
header { background: #111827; color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
header a { color: #fff; text-decoration: none; font-weight: 600; }
header .sp { flex: 1; }
header button { background: transparent; color: #cbd5e1; border: 1px solid #374151; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0 0 12px; } h2 { font-size: 18px; margin: 0 0 12px; } h3 { font-size: 15px; margin: 12px 0 8px; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input, select, button, textarea { font: inherit; }
input[type=text], input[type=password], select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
button { padding: 9px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button.ghost { background: #fff; color: var(--accent); }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; } .row > * { flex: 1 1 220px; }
.bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.err { color: var(--bad); margin-top: 8px; } .ok { color: var(--accent-2); }
.note { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.list .item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .item .grow { flex: 1; min-width: 0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #eef2ff; color: #3730a3; }
.tag.done { background: #dcfce7; color: #166534; } .tag.error { background: #fee2e2; color: #991b1b; }
.tag.calibrate { background: #fef3c7; color: #92400e; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi .v { font-size: 24px; font-weight: 700; } .kpi .l { color: var(--muted); font-size: 13px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 180px; }
.grid3 div { height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-weight: 600; font-size: 14px; }
.half { display: inline-block; margin: 0 18px 12px 0; vertical-align: top; }
.half .net { width: 180px; border-top: 3px dashed #9ca3af; margin-bottom: 4px; text-align: center; font-size: 11px; color: var(--muted); }
.half .me { width: 180px; text-align: center; font-size: 11px; color: var(--muted); margin-top: 4px; }
.pA { color: var(--a); font-weight: 700; } .pB { color: var(--b); font-weight: 700; }
.canvas-wrap { position: relative; width: 100%; user-select: none; }
.canvas-wrap img { width: 100%; display: block; border-radius: 8px; }
.canvas-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.steps { counter-reset: s; padding-left: 0; list-style: none; }
.steps li { margin: 4px 0; } .steps li.cur { font-weight: 700; } .steps li.done { color: var(--muted); text-decoration: line-through; }
video { width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
.rally-row.low { background: #fffbeb; } .rally-row.fixed { background: #f0fdf4; }
.rally-row select { width: auto; padding: 4px 6px; font-size: 13px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { background: #fff; color: var(--text); border-color: var(--line); }
.tabs button.on { background: var(--text); color: #fff; border-color: var(--text); }
.scroll { overflow-x: auto; }
@media (max-width: 640px) { main { padding: 10px; } .card { padding: 12px; } .grid3, .half .net, .half .me { width: 150px; } }
.rally-row button { white-space: nowrap; padding: 4px 8px; }
.langs { display: inline-flex; gap: 4px; }
.langs .lang { padding: 3px 8px; background: transparent; color: #9ca3af; border: 1px solid #374151; }
.langs .lang.on { color: #fff; border-color: #9ca3af; }
main .langs .lang { color: var(--muted); border-color: var(--line); }
main .langs .lang.on { color: var(--text); border-color: var(--text); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 92px; padding: 12px; border: 2px dashed #cbd5e1; border-radius: 10px; background: #fff;
  color: var(--accent); cursor: pointer; font-weight: 400; margin: 0; text-align: center; transition: .15s; }
.drop:hover, .drop:focus, .drop.over { border-color: var(--accent); background: #eff6ff; outline: none; }
.drop.has { border-style: solid; border-color: var(--accent-2); color: var(--accent-2); }
.drop-icon { width: 34px; height: 34px; }
.drop #fname { color: var(--text); word-break: break-all; }
.insight { border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.insight.good { border-left-color: var(--accent-2); } .insight.bad { border-left-color: var(--warn); } .insight.info { border-left-color: var(--accent); }
.insight .small { margin-top: 6px; } .insight button { padding: 2px 8px; margin: 2px 0; }
.logo { font-size: 20px; font-weight: 700; }
h1.hero { font-size: 24px; line-height: 1.25; margin: 14px 0 6px; }
.slogan { margin: 0 0 10px; font-size: 16px; color: #374151; }
a.logo { color: inherit; text-decoration: none; }
body.landing header a { color: #fff; text-decoration: none; }
.hero-block { display: flex; gap: 28px; align-items: center; margin: 12px 0 24px; flex-wrap: wrap; }
.hero-text { flex: 1 1 380px; } .hero-text h1.hero { font-size: 32px; margin-top: 0; }
.hero-text p { font-size: 16px; } .hero-img { flex: 0 1 300px; max-width: 300px; width: 100%; height: auto; border-radius: 12px; margin: 0 auto; }
@media (max-width: 640px) { .hero-img { max-width: 200px; } }
.cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.cta button { padding: 12px 22px; font-size: 16px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.features .card { margin: 0; } .features h2 { font-size: 17px; }
.how li { margin: 8px 0; } footer { margin: 24px 0; text-align: center; }
section.card { margin-top: 16px; }

tr.excluded td { opacity: .55; }
tr.excluded td:last-child, tr.excluded td:nth-child(2) { opacity: 1; }
td.nowrap { white-space: nowrap; }

.player-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.player-bar button.on { background: var(--accent, #2563eb); color: #fff; }
