:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: #242820;
    background: #f6f5f2;
    font-synthesis: none;
    --muted: #dedfd7;
    --border: #dedfd7;
    --accent: #dedfd7;
    --paper: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, label, input, select { -webkit-tap-highlight-color: transparent; }
button, select, input { border-radius: 6px; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; }
:focus-visible { outline: 2px solid #4c7455; outline-offset: 3px; }
.shell { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; letter-spacing: -.5px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; background: #e3e9df; color: var(--accent); width: 32px; height: 32px; border-radius: 6px; font-size: 17px; font-weight: 700; }
.header-right, .control-tools { display: flex; align-items: center; gap: 14px; }
.version { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.intro { padding: 34px 0 28px; display: flex; align-items: baseline; gap: 18px; }
h1 { font-size: 34px; font-weight: 600; letter-spacing: -1.3px; margin: 0; line-height: 1.2; }
.intro p { margin: 0; color: var(--muted); font-size: 15px; }
.workspace { display: grid; grid-template-columns: 1.06fr 1fr; gap: 20px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 24px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 20px; }
h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.25px; }
h3 { font-weight: 550; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 5px 0; font-size: 12px; }
.text-button:not(:disabled):hover { color: var(--accent); text-decoration: underline; }
.secondary, .primary { border: 1px solid var(--border); padding: 10px 18px; font-size: 13px; font-weight: 550; background: var(--paper); color: #30372d; }
.secondary:not(:disabled):hover { background: #f5f6f2; border-color: #a8b1a2; }
.primary { background: var(--accent); border-color: var(--accent); color: white; padding: 13px 18px; }
.primary:not(:disabled):hover { background: #354f3b; }
.dropzone { border: 1px dashed #c4cabb; background: #fafbf8; padding: 25px 16px; border-radius: 7px; text-align: center; }
.dropzone.dragging { background: #edf2e9; border-color: #354f3b; }
.upload-mark { display: inline-block; font-size: 25px; color: #5e6d56; line-height: 1; margin-bottom: 13px; }
.dropzone h3 { margin: 0 0 8px; font-size: 15px; }
.dropzone p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preset { background: #f6f7f3; border: 1px solid var(--border); padding: 8px 10px; font-size: 12px; color: var(--muted); }
.preset.active { background: #edf2e9; border-color: #92a287; color: #34492b; }
.file-list { list-style: none; padding: 0; margin: 14px 0 0; max-height: 184px; overflow: auto; }
.file-list:empty { display: none; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edefe8; font-size: 12px; }
.file-name { flex: 1; overflow-wrap: anywhere; }
.file-size { color: var(--muted); white-space: nowrap; font-size: 11px; }
.remove { border: 0; background: transparent; color: var(--muted); padding: 2px 6px; font-size: 17px; line-height: 1; }
.status { color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.status:empty { display: none; }
.file-details { font-size: 12px; margin: 10px 0 18px; }
summary { cursor: pointer; color: var(--muted); padding: 5px 0; }
.variable { margin: 6px 0; overflow-wrap: anywhere; }
.data-warning { color: #8a561b; line-height: 1.5; }
.build-form { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
input:not([type=checkbox]), select { width: 100%; min-width: 0; border: 1px solid var(--border); background: #fff; color: #30372d; padding: 9px 10px; height: 38px; }
input:disabled, select:disabled { background: #f7f8f5; }
.filename-field, .build-actions { grid-column: 1 / -1; }
.build-actions { display: flex; align-items: center; gap: 16px; }
.build-actions .primary { flex: 1; display: flex; justify-content: space-between; }
.result { background: #f2f5ee; border: 1px solid #d5ddcc; padding: 16px; border-radius: 7px; margin-top: 18px; }
.result-heading { display: flex; align-items: center; gap: 9px; }
.result h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.success-dot { width: 7px; height: 7px; background: #567345; border-radius: 50%; flex-shrink: 0; }
.result p { font-size: 12px; margin: 8px 0 14px; color: var(--muted); }
.downloads { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.downloads a { font-size: 12px; color: var(--accent); }
.downloads a:first-child { font-weight: 650; }
.preset-field { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 24px; }
.preset-field label { font-size: 12px; color: var(--muted); }
.mapping-heading, .mapping-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; }
.mapping-heading { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.mapping-row { padding: 5px 0; }
.mapping-row > label { font-size: 12px; }
.mapping-row select { font-size: 12px; height: 34px; padding: 7px 8px; }
.alternate, .alternate-label { display: none; }
.show-alternates .mapping-heading, .show-alternates .mapping-row { grid-template-columns: 66px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.show-alternates .alternate, .show-alternates .alternate-label { display: block; }
.all-controls { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 12px; font-size: 12px; }
.all-controls summary { display: list-item; }
#key-count { color: #93988c; margin-left: 6px; font-size: 11px; }
#extra-controls { max-height: 370px; overflow: auto; padding: 12px 3px 0; }
.control-options { border-top: 1px solid var(--border); padding-top: 17px; margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px 18px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); margin: 0; width: 14px; height: 14px; }
.control-note { font-size: 11px; color: var(--muted); margin: 19px 0 0; line-height: 1.8; }
kbd { display: inline-block; border: 1px solid var(--border); padding: 0 4px; border-radius: 3px; font-size: 10px; background: #fafbf8; font-family: inherit; }
.error { border: 1px solid #ddb6ac; background: #fff1ed; color: #8d3023; padding: 12px 15px; font-size: 13px; line-height: 1.5; border-radius: 7px; overflow-wrap: anywhere; margin: 0 0 18px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--muted); padding: 24px 0 30px; font-size: 11px; line-height: 1.5; }
footer > div { display: flex; align-items: center; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer button { font-size: 11px !important; }
@media (max-width: 800px) {
    .shell { max-width: 630px; padding: 0 20px; }
    .workspace { grid-template-columns: 1fr; gap: 16px; }
    .intro { padding: 28px 0 24px; }
    h1 { font-size: 30px; }
    .intro p { font-size: 13px; }
}
@media (max-width: 430px) {
    .shell { padding: 0 14px; }
    .header { padding: 18px 0; }
    .intro { display: block; }
    .intro p { margin-top: 8px; }
    .panel { padding: 19px; }
    .build-form { gap: 14px 10px; }
    footer { flex-direction: column; align-items: flex-start; gap: 8px; }
    .control-options { gap: 12px; }
}
