* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Apple SD Gothic Neo", sans-serif; background: #f5f6f8; color: #1c1e21; }
header { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #fff; border-bottom: 1px solid #e2e5ea; }
header h1 { font-size: 16px; margin: 0; }
header a { color: #3b5bfd; text-decoration: none; font-size: 14px; }
header .who { font-size: 12px; color: #8a909b; }
main { padding: 16px 20px; }
button { border: 1px solid #cfd4dc; background: #fff; border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
button.primary { background: #3b5bfd; border-color: #3b5bfd; color: #fff; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid #cfd4dc; border-radius: 6px; padding: 6px 8px; font-size: 13px; width: 100%; font-family: inherit; }
label { font-size: 12px; color: #5b616e; display: block; margin: 10px 0 4px; }
.spacer { flex: 1; }
.panel { background: #fff; border: 1px solid #e2e5ea; border-radius: 8px; padding: 14px; max-width: 420px; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; }
.error { color: #d92d20; font-size: 12px; white-space: pre-wrap; }
.empty { color: #8a909b; font-size: 13px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #e2e5ea; border-radius: 8px; padding: 12px 16px; text-decoration: none; color: inherit; }
.list-row:hover { border-color: #b9c4f9; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #eef0f4; flex-shrink: 0; }
.badge.env-dev { background: #fff3d6; color: #8a5a00; }
.badge.env-prod { background: #feeceb; color: #d92d20; }
.badge.env-sim { background: #e6f4ea; color: #16794e; }
.row-main { min-width: 0; }
.row-title { font-size: 13px; font-weight: 600; }
.row-sub { font-size: 11.5px; color: #8a909b; font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 11px; color: #8a909b; white-space: nowrap; }
.row-del { border: none; background: transparent; padding: 4px 8px; border-radius: 6px; font-size: 12px; opacity: .5; flex-shrink: 0; }
.row-del:hover { background: #feeceb; opacity: 1; }

.live-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.ev-list { background: #10131a; border-radius: 8px; padding: 10px 14px; height: 70vh; overflow-y: auto; font-family: ui-monospace, monospace; font-size: 12px; }
.ev-row { border-bottom: 1px solid #232838; padding: 5px 0; }
.ev-line { display: flex; gap: 10px; align-items: baseline; cursor: default; color: #d7dae0; }
.ev-time { color: #6b7280; flex-shrink: 0; }
.ev-type { color: #7fd1ff; font-weight: 600; }
.ev-ver { color: #8a909b; font-size: 11px; }
.ev-toggle { margin-left: auto; color: #8a909b; cursor: pointer; font-size: 11px; }
.ev-props { margin: 6px 0 0; color: #b7bdc8; background: #171b26; border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; }

.hint { font-size: 11.5px; color: #5b616e; background: #f5f6f8; border: 1px solid #e2e5ea; border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; line-height: 1.6; }
.hint b { color: #1c1e21; }

.copy-btn { border: none; background: transparent; padding: 2px 5px; border-radius: 4px; font-size: 12px; opacity: .55; flex-shrink: 0; line-height: 1; }
.copy-btn:hover { background: #eef0f4; opacity: 1; }

.row-sub-line { display: flex; align-items: center; gap: 2px; min-width: 0; }
.row-sub-line .row-sub { flex-shrink: 1; }
.row-summary-line { margin-top: 2px; }
.row-summary { font-size: 11px; }
.row-summary.summary-ok { color: #16794e; }
.row-summary.summary-warn { color: #b06a00; }

.live-controls { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.live-controls input[type="text"] { width: 200px; }
.live-controls label.noise-toggle { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12px; color: #5b616e; white-space: nowrap; }
.live-controls label.noise-toggle input { width: auto; }
.hidden-count { font-size: 11px; color: #8a909b; }
