*{box-sizing:border-box}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.6;margin:0;background:#f6f7f9;color:#222}
header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fff;border-bottom:1px solid #e5e7eb;position:sticky;top:0}
main{max-width:980px;margin:24px auto;padding:0 12px}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin-bottom:16px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
h1{font-size:20px;margin:0}h2{margin:0 0 12px;font-size:18px}
label{display:flex;gap:8px;align-items:center;margin:6px 0}
input,select{flex:1;padding:8px;border:1px solid #d1d5db;border-radius:8px;background:#fff}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
button{padding:8px 12px;border:none;border-radius:8px;background:#111827;color:#fff;cursor:pointer}
button.ghost{background:#e5e7eb;color:#111827}
.hide{display:none}

#groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.group-card{border:1px solid #e5e7eb;border-radius:12px;padding:12px;background:#fafafa}
.group-card h4{margin:0 0 8px}
.group-card .meta{font-size:12px;color:#6b7280}
.group-card .actions{display:flex;gap:8px;margin-top:8px}

.keyword-section{margin-bottom:16px}
.input-row{display:flex;gap:8px;margin-bottom:8px}
.input-row input{flex:1}
.tagbox{min-height:48px;border:1px dashed #cbd5e1;border-radius:12px;padding:10px;display:flex;gap:8px;flex-wrap:wrap;background:#fff;align-items:center}
.tagbox.static{background:#f8f9fa;border-style:solid}
.tag{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:20px;background:#3b82f6;color:#fff;font-size:14px;font-weight:500;transition:all 0.2s}
.tag:hover{background:#2563eb}
.tag.exclude{background:#ef4444}
.tag.exclude:hover{background:#dc2626}
.tag button{border:none;background:transparent;cursor:pointer;font-size:16px;color:#fff;padding:0;margin:0 -4px 0 2px;opacity:0.8;transition:opacity 0.2s}
.tag button:hover{opacity:1}
.tagbox[contenteditable="true"]:empty:before{content:attr(placeholder);color:#9ca3af}
pre{white-space:pre-wrap;background:#0b1020;color:#d1e7ff;padding:12px;border-radius:8px;overflow:auto}
.help-text{font-size:12px;color:#6b7280;font-weight:normal}
