:root {
  --ink: #1d232f; --muted: #5d6573; --line: #e4e7ec; --bg: #fff; --soft: #f6f7f9;
  --c: #02a7e7; --m: #e70489; --y: #ffea03; --err: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header, main, footer { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.px { display: inline-grid; grid-template-columns: repeat(2, 7px); gap: 2px; }
.px i { width: 7px; height: 7px; display: block; }
.px i:nth-child(1) { background: var(--c); } .px i:nth-child(2) { background: var(--m); } .px i:nth-child(3) { background: var(--y); }
.left { font-size: 14px; color: var(--muted); }
h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.08; letter-spacing: -.03em; margin: 28px 0 12px; }
h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; }
.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.lead b { color: var(--ink); font-weight: 600; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 240px; padding: 24px; text-align: center; border: 2px dashed #c7ccd6; border-radius: 16px; background: var(--soft); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop:focus, .drop.over { border-color: var(--ink); background: #fff; outline: none; }
.drop strong { font-size: 20px; }
.drop span { color: var(--muted); }
.samples { margin: 14px 0 4px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.notice { padding: 14px 16px; border-radius: 12px; background: #fff4f2; color: var(--err); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border: 1px solid var(--ink); border-radius: 10px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.off { background: var(--soft); color: var(--muted); border-color: var(--line); cursor: default; font-weight: 500; }
.card { max-width: 560px; margin: 36px 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.row input { flex: 1 1 200px; min-height: 46px; padding: 0 12px; border: 1px solid #c7ccd6; border-radius: 10px; font: inherit; }
.check { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.msg { min-height: 1.5em; margin: 6px 0; font-size: 14px; color: var(--err); }
.msg.ok { color: var(--muted); }
.status { margin: 16px 0 12px; }
#statustext { display: block; margin-bottom: 8px; font-weight: 600; }
.bar[hidden] { display: none; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c), var(--m)); transition: width .2s; }
.stage { position: relative; width: 100%; height: min(72vh, 680px); border-radius: 14px; overflow: hidden; background: #0f1218; touch-action: none; cursor: crosshair; user-select: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.slow { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--y); background: #fffde8; border-radius: 0 10px 10px 0; font-size: 15px; }
.slow b { font-weight: 600; }
.intro-note { margin: 0 0 24px; }
.btn:disabled { opacity: .6; cursor: default; }
.zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.hint { font-size: 14px; color: var(--muted); }
.hint.first { margin-right: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 48px; padding-top: 16px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
footer a { color: inherit; }
@media (max-width: 600px) { .btn { width: 100%; } }
