:root { --bg:#f4f6f8; --card:#fff; --ink:#1c2630; --mute:#64707d; --line:#d5dbe1; --accent:#0b5cad; --warn:#fff4d6; --warnline:#e2b93b; --err:#b3261e; --ok:#1b7f3b; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; background:var(--bg); color:var(--ink); }
header { background:#14304f; color:#fff; padding:12px 20px; display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
h1 { font-size:18px; margin:0; font-weight:600; }
nav { display:flex; gap:4px; }
.tab { background:transparent; color:#cfe0f2; border:0; padding:6px 14px; border-radius:6px; cursor:pointer; font-size:15px; }
.tab.active { background:#fff; color:#14304f; font-weight:600; }
main { max-width:760px; margin:20px auto; padding:0 14px 60px; }
#view-log { max-width:none; }
body.wide main { max-width:1200px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:18px; margin-bottom:16px; }
.row { margin-bottom:14px; }
label, .previewLabel { display:block; font-weight:600; margin-bottom:4px; }
.hint { font-weight:400; color:var(--mute); font-size:13px; }
input[type=text], input[type=number], input[type=search], select { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:6px; font-size:15px; background:#fff; }
input.short { width:90px; }
input:focus, select:focus { outline:2px solid #9cc4ee; border-color:var(--accent); }
.inline { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.inline.spread { justify-content:space-between; }
.grow { flex:1; min-width:200px; }
.note { color:var(--mute); font-size:13px; margin-top:4px; }
.note.warn { color:#7a5b00; background:var(--warn); border:1px solid var(--warnline); padding:6px 8px; border-radius:6px; }
.pedigree { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; background:#eef3f8; border:1px solid var(--line); border-radius:8px; padding:10px; margin-bottom:14px; }
@media (min-width:640px) { .pedigree { grid-template-columns:repeat(6,1fr); } }
.pedigree span { display:block; font-size:12px; color:var(--mute); text-transform:uppercase; letter-spacing:.04em; }
.pedigree b { font-family:ui-monospace,Consolas,monospace; font-size:15px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.chip { background:#e6eef7; border:1px solid #b9cfe6; color:#10406f; border-radius:999px; padding:3px 11px; cursor:pointer; font-size:13px; font-family:ui-monospace,Consolas,monospace; }
.chip:hover { background:#d3e4f6; }
.chip small { color:var(--mute); margin-left:4px; }
.preview { font-family:ui-monospace,Consolas,monospace; background:#f7f8fa; border:1px dashed var(--line); border-radius:6px; padding:9px 10px; word-break:break-all; color:#44505c; }
.primary, .btn { background:var(--accent); color:#fff; border:0; border-radius:6px; padding:10px 18px; font-size:15px; font-weight:600; cursor:pointer; text-decoration:none; display:inline-block; }
.primary:disabled { background:#9db4cc; cursor:not-allowed; }
.btn.secondary, .secondary { background:#fff; color:var(--accent); border:1px solid var(--accent); }
.link { background:none; border:0; color:var(--accent); cursor:pointer; text-decoration:underline; font-size:13px; padding:0; }
.hidden { display:none !important; }
.error { background:#fdecea; border:1px solid #f0b3ae; color:var(--err); padding:8px 10px; border-radius:6px; margin-bottom:12px; }
.confirm { background:var(--warn); border:1px solid var(--warnline); padding:12px; border-radius:8px; margin-bottom:12px; }
.confirm .actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.confirm button { padding:7px 12px; font-size:14px; border-radius:6px; cursor:pointer; border:1px solid var(--accent); background:#fff; color:var(--accent); font-weight:600; }
.confirm button.go { background:var(--accent); color:#fff; }
.result { border-color:#8fc9a1; background:#f3fbf5; }
#result { width:100%; resize:none; padding:9px 10px; border:1px solid var(--line); border-radius:6px; font-family:ui-monospace,Consolas,monospace; font-size:15px; margin-bottom:10px; background:#fff; word-break:break-all; }
.ok { color:var(--ok); font-weight:600; }
.tableWrap { overflow-x:auto; margin-top:10px; }
table { border-collapse:collapse; width:100%; font-size:13px; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
td.fn { font-family:ui-monospace,Consolas,monospace; user-select:all; }
th { background:#eef3f8; position:sticky; top:0; }
