:root { color-scheme: light; --ink: #203b36; --muted: #61736e; --paper: #f3f4ee; --border: #d5ddd4; --accent: #126a58; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: system-ui, -apple-system, sans-serif; line-height: 1.5; }
.masthead { padding: 24px 4vw; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { font-size: 20px; font-weight: 700; }
.tag { font-size: 13px; color: var(--muted); }
main { margin: 0 auto; padding: 36px 4vw 60px; max-width: 1600px; }
h2 { font-size: 22px; letter-spacing: -.025em; margin: 5px 0 8px; }
p { margin: 8px 0; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.upload-panel, .download-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.panel p, #file-info { color: var(--muted); font-size: 14px; }
form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
input, select, button { font: inherit; }
input:not([type="checkbox"]), select { padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: white; color: var(--ink); }
input[type="file"] { max-width: 285px; font-size: 13px; padding: 7px; }
.file-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
button { background: var(--accent); border: 1px solid var(--accent); color: white; border-radius: 6px; padding: 11px 16px; font-size: 14px; font-weight: 650; cursor: pointer; }
button:hover { filter: brightness(.94); }
button.secondary { background: transparent; color: var(--ink); border-color: var(--border); }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #d59930; outline-offset: 2px; }
.status { min-height: 26px; margin: 14px 0; color: var(--accent); }
.status.error { color: #a3342b; background: #fff0e9; padding: 12px 16px; border-radius: 6px; }
.editor-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 25px; }
.count { font-variant-numeric: tabular-nums; font-size: 14px; padding: 7px 12px; background: #e3ebe0; border-radius: 30px; white-space: nowrap; }
.firmware-details { margin-top: 18px; padding: 18px 24px; }
.startup-panel { margin-top: 14px; padding: 18px 24px; }
.tone-panel { margin-top: 14px; padding: 18px 24px; }
.tone-panel h3 { margin: 0 0 8px; font-size: 16px; }
.tone-panel p { margin: 0 0 12px; }
.tone-pairs { display: grid; grid-template-columns: repeat(4, minmax(185px, 1fr)); gap: 12px; }
.tone-pair { display: flex; align-items: center; gap: 7px; }
.tone-pair strong { min-width: 24px; }
.tone-pair input { width: 82px; }
@media (max-width: 850px) { .tone-pairs { grid-template-columns: repeat(2, minmax(185px, 1fr)); } }
.startup-panel h3 { margin: 0 0 8px; font-size: 16px; }
.startup-panel label { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); }
#startup-message { width: 12ch; max-width: 100%; font-family: monospace; font-size: 18px; letter-spacing: .1em; }
.firmware-details h3 { margin: 0 0 14px; font-size: 16px; }
#firmware-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 28px; margin: 0; }
#firmware-info dt { font-size: 12px; color: var(--muted); }
#firmware-info dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
#firmware-info .hash { grid-column: 1 / -1; }
#firmware-info .hash dd { font-family: monospace; font-size: 12px; }
#programming-history { margin-top: 16px; font-size: 13px; }
#programming-history summary { cursor: pointer; }
#history-list { padding-left: 24px; font-variant-numeric: tabular-nums; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.fact { padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.fact strong { margin-left: 8px; }
.fact-invalid { color: #8b241c; background: #fff0ed; border-color: #d95d50; }
.fact-invalid strong { color: #8b241c; }
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 24px 0 12px; }
.toolbar label { font-size: 12px; color: var(--muted); }
.toolbar input { display: block; width: 240px; margin-top: 4px; }
.table-scroll { overflow-x: auto; max-height: 65vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: white; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { position: sticky; top: 0; background: #e8eee4; padding: 13px 10px; text-align: left; white-space: nowrap; z-index: 1; }
td { padding: 7px 10px; border-top: 1px solid #e8ece5; }
tbody tr:nth-child(even) { background: #fafbf7; }
tbody tr:hover { background: #eff5ec; }
td input[type="number"] { width: 115px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
td:first-child input { width: 83px; }
.tx-frequency-cell { white-space: nowrap; }
.tx-frequency-cell input[type="number"] { width: 92px; }
td select { padding: 6px 8px; min-width: 76px; }
td input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.copy-frequency { display: inline-block; margin-left: 4px; padding: 5px 6px; font-size: 11px; line-height: 1.25; vertical-align: middle; white-space: nowrap; }
td input:disabled { color: #86918b; background: #f1f3ee; }
.remove { background: transparent; color: #9b4a3f; border-color: #e1cfc6; padding: 5px 9px; }
.table-note { font-size: 12px; color: var(--muted); margin: 14px 0; max-width: 1000px; }
.download-panel { margin-top: 28px; }
.download-panel p { max-width: 640px; }
.download-result { color: var(--accent); font-size: 14px; overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--border); padding: 22px 4vw; color: var(--muted); font-size: 12px; }
@media (max-width: 850px) { .upload-panel, .download-panel { align-items: start; flex-direction: column; } .masthead .tag { display: none; } main { padding-top: 24px; } }
