:root {
    --bg: #f6f6f8; --panel: #ffffff; --text: #1d1f27; --muted: #626879; --line: #d9dbe3;
    --accent: #2f6fd6; --warn-bg: #fff6e0; --warn: #7a5300; --ok: #1f7a43; --err: #b3261e;
    --check-a: #e4e6ec; --check-b: #ffffff;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14161c; --panel: #1c1f27; --text: #e8eaf0; --muted: #9aa1b2; --line: #313645;
        --accent: #79a8ff; --warn-bg: #3a2f12; --warn: #f3d27a; --ok: #6fd39a; --err: #ff8a80;
        --check-a: #2a2e39; --check-b: #20232c;
    }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 18px; margin: 0; }
.top h1 small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.meta { color: var(--muted); font-size: 12px; }
.layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 520px); gap: 20px; padding: 20px; max-width: 1280px; margin: 0 auto; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; padding: 16px; } }
.preview-col { min-width: 0; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.preview { position: relative; height: min(72vh, 640px); min-height: 360px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.preview.checker { background: repeating-conic-gradient(var(--check-a) 0 25%, var(--check-b) 0 50%) 0 0 / 24px 24px; }
.preview.light { background: #ffffff; }
.preview.dark { background: #0d0f14; }
.preview iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.status { font-size: 12px; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.warnings { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.warnings li { background: var(--warn-bg); color: var(--warn); padding: 6px 10px; border-radius: 6px; font-size: 12.5px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 16px 16px; min-width: 0; }
fieldset { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 12px 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 6px; float: left; width: 100%; }
.row { clear: both; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; margin-top: 6px; }
.row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 520px) { .row, .row.four, .row.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row .grow { grid-column: span 1; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); min-width: 0; }
label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
label.block { margin-top: 10px; clear: both; }
select, input, textarea, button { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0; width: 100%; }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
#url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
button { cursor: pointer; width: auto; background: var(--panel); }
button:hover { border-color: var(--accent); }
.copyrow { display: flex; gap: 6px; align-items: stretch; }
.copyrow button { flex: none; }
.note { clear: both; color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.note.warn { color: var(--warn); }
details { clear: both; margin-top: 10px; }
summary { cursor: pointer; color: var(--accent); }
table.items { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
table.items td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.items td:first-child { color: var(--muted); white-space: nowrap; }
table.items .sub { color: var(--warn); }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 10px 20px 24px; }
