.tool-css-minifier { max-width: 720px; margin: var(--space-6) auto 0; }

.cm-field {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--space-4);
    margin-bottom: var(--space-4);
}
.cm-label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-weight: 500; font-size: .9rem; margin-bottom: var(--space-2); color: var(--text);
}
.cm-count { font-size: .78rem; color: var(--text-muted); font-weight: 400; }
.cm-textarea {
    width: 100%; resize: vertical; padding: var(--space-3);
    border: 1px solid var(--border); border-radius: var(--radius);
    background: #fff; color: inherit; font: inherit; font-size: .9rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.55;
}
.cm-textarea:focus {
    outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary);
}
.cm-textarea--output { background: #f8fafc; word-break: break-all; }

.cm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }

.cm-btn {
    display: inline-block; padding: .6rem 1.1rem; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); border-radius: var(--radius);
    font: inherit; font-weight: 500; cursor: pointer;
    transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}
.cm-btn:hover, .cm-btn:focus-visible { border-color: var(--primary); color: var(--primary); outline: none; }
.cm-btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.cm-btn--primary:hover, .cm-btn--primary:focus-visible { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.cm-alert { margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4);
            border-radius: var(--radius); font-size: .9rem; }
.cm-alert--danger { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }

.cm-hint { font-size: .85rem; color: var(--success); min-height: 1.2em; }
.cm-hint.is-error { color: var(--danger); }

.cm-note {
    font-size: .78rem; color: var(--text-muted); line-height: 1.55; margin: 0;
    padding: var(--space-3) var(--space-4);
    background: var(--primary-light); border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.cm-note code {
    background: rgba(79, 70, 229, .15); color: var(--primary);
    padding: .1em .35em; border-radius: 4px; font-size: .9em;
}

@media (max-width: 380px) {
    .cm-actions { flex-direction: column; align-items: stretch; }
    .cm-actions .cm-btn { width: 100%; text-align: center; }
}