* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; background: #0f1014; color: #d6d8e0; padding: 24px; }
main { max-width: 780px; margin: 0 auto; }
h1 { font-size: 22px; margin-bottom: 8px; color: #fff; }
.lead { color: #8a8d9a; margin-bottom: 24px; }
section { background: #1a1c24; border: 1px solid #2a2d38; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.info > div, .state-grid > div, .preview > div { display: flex; gap: 12px; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed #2a2d38; align-items: baseline; }
.info > div:last-child, .state-grid > div:last-child, .preview > div:last-child { border-bottom: none; }
.info span, .state-grid span, .preview span { color: #8a8d9a; min-width: 180px; flex-shrink: 0; }
.info code, .preview code { color: #d6d8e0; word-break: break-all; font-family: inherit; font-weight: normal; user-select: all; }
.state-grid strong { color: #6ad58a; word-break: break-all; font-weight: normal; }
section.form label { display: block; color: #8a8d9a; margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
section.form input { width: 100%; padding: 10px 12px; background: #0f1014; border: 1px solid #2a2d38; border-radius: 6px; color: #d6d8e0; font-family: inherit; font-size: 14px; }
section.form input:focus { outline: none; border-color: #6a83d5; }
button { padding: 10px 16px; background: #2a2d38; border: 1px solid #3a3d48; color: #d6d8e0; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 13px; }
button:hover:not(:disabled) { background: #3a3d48; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
#connectBtn { background: #4a5d95; border-color: #5a6da5; margin-bottom: 12px; }
#burnBtn { background: #6a4a4a; border-color: #7a5a5a; }
.preview { background: #0f1014; border-radius: 6px; padding: 12px; margin-top: 12px; font-size: 12px; }
.preview strong { color: #6ad58a; display: block; margin-bottom: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.actions { margin-top: 16px; display: flex; gap: 8px; }
.notice { margin-top: 12px; padding: 10px 12px; border-radius: 6px; font-size: 13px; min-height: 18px; white-space: pre-wrap; word-break: break-all; }
.notice.ok    { background: #1f3a2a; color: #6ad58a; }
.notice.error { background: #3a1f1f; color: #d56a6a; }
.notice.warn  { background: #3a341f; color: #d5b86a; }
.foot { color: #5a5d6a; font-size: 11px; margin-top: 24px; text-align: center; }
section.direction { display: flex; gap: 8px; padding: 12px; }
section.direction .radio { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #0f1014; border: 1px solid #2a2d38; border-radius: 6px; cursor: pointer; font-size: 13px; color: #d6d8e0; }
section.direction .radio:has(input:checked) { border-color: #6a83d5; background: #1f2540; color: #fff; }
section.direction .radio input { accent-color: #6a83d5; }
section.direction .radio span { color: #8a8d9a; font-size: 12px; }

section.tracker { padding: 16px; }
section.tracker > strong { display: block; margin-bottom: 8px; color: #6ad58a; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }
.log { background: #0f1014; border: 1px solid #2a2d38; border-radius: 6px; padding: 12px; font-size: 12px; max-height: 320px; overflow-y: auto; }
.log .line { padding: 4px 0; border-bottom: 1px dashed #2a2d38; line-height: 1.6; word-break: break-all; }
.log .line:last-child { border-bottom: none; }
.log .line .ts { color: #5a5d6a; margin-right: 8px; }
.log .line code { color: #d6d8e0; font-family: inherit; }
.log .line.ok { color: #6ad58a; }
.log .line.warn { color: #d5b86a; }
.log .line.error { color: #d56a6a; }
.manual { margin-top: 12px; padding: 10px 12px; background: #3a341f; color: #d5b86a; border-radius: 6px; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.manual a { color: #6a83d5; text-decoration: underline; word-break: break-all; }
