.utm-naming-generator-app { box-sizing: border-box; width: 100%; max-width: 100%; padding: clamp(16px, 3vw, 28px); color: #172033; }
.utm-naming-generator-app *, .utm-naming-generator-app *::before, .utm-naming-generator-app *::after { box-sizing: border-box; }
.utm-naming-generator-app > h2 { margin-top: 0; }
.ung-intro { max-width: 820px; color: #536174; line-height: 1.55; }
.ung-form { display: grid; gap: 16px; }
.ung-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 0; padding: 16px; border: 1px solid #dce3ec; border-radius: 9px; }
.ung-section legend { padding: 0 7px; font-weight: 700; }
.ung-field { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.ung-field label { font-size: .9rem; font-weight: 600; }
.ung-field input, .ung-field textarea, .ung-field select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #bac5d2; border-radius: 6px; background: #fff; color: #172033; font: inherit; }
.ung-field textarea { min-height: 110px; resize: vertical; }
.ung-field input:focus, .ung-field textarea:focus, .ung-field select:focus, .ung-button:focus-visible, .ung-batch-section summary:focus-visible, .ung-url-details summary:focus-visible { outline: 3px solid rgba(37, 99, 235, .27); outline-offset: 2px; border-color: #2563eb; }
.ung-field input[aria-invalid="true"] { border-color: #b42318; background: #fff8f7; }
.ung-template-field { grid-column: 1 / -1; }
.ung-help { margin: 0; color: #536174; font-size: .86rem; line-height: 1.5; }
.ung-check { display: flex; grid-column: 1 / -1; align-items: center; gap: 9px; min-height: 34px; cursor: pointer; }
.ung-check input { width: 18px; height: 18px; margin: 0; accent-color: #1d4ed8; }
.ung-inline-button { justify-self: start; }
.ung-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.ung-button { min-height: 42px; padding: 9px 14px; border: 1px solid #c4ceda; border-radius: 7px; background: #fff; color: #172033; font: inherit; font-weight: 600; cursor: pointer; }
.ung-button:hover { background: #f5f7fa; }
.ung-button.ung-primary { border-color: #1d4ed8; background: #1d4ed8; color: #fff; }
.ung-feedback, .ung-validation { margin: 0 0 12px; padding: 10px 12px; border-radius: 6px; }
.ung-feedback { border: 1px solid #b8dcc4; background: #f2fbf5; color: #245c36; }
.ung-validation, .ung-preview-error { border: 1px solid #e5aaa5; background: #fff5f4; color: #8e2118; }
.ung-feedback[hidden], .ung-validation[hidden], .ung-preview-error[hidden] { display: none; }
.ung-preview-section { min-width: 0; margin-top: 24px; }
.ung-preview-section > h3 { margin-top: 0; }
.ung-preview { min-width: 0; padding: clamp(16px, 3vw, 26px); border: 1px solid #dce3ec; border-radius: 9px; background: #fff; }
.ung-campaign-result { padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.ung-preview-template, .ung-raw-value { margin: 0 0 8px; color: #536174; font-size: .9rem; overflow-wrap: anywhere; }
.ung-preview-error { margin: 10px 0; padding: 9px 11px; }
.ung-campaign-name { display: block; margin: 8px 0; padding: 12px; border: 1px solid #dce3ec; border-radius: 7px; background: #f8fafc; color: #172033; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.ung-campaign-name.is-invalid { color: #8e2118; }
.ung-values-table, .ung-batch-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ung-values-table th, .ung-values-table td, .ung-batch-table th, .ung-batch-table td { padding: 10px 8px; border-bottom: 1px solid #e5eaf0; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ung-values-table th { width: 22%; color: #334155; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .87rem; }
.ung-value-cell { width: 35%; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.ung-raw-cell { color: #64748b; font-size: .86rem; }
.ung-url-details { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e2e8f0; }
.ung-url-details summary, .ung-batch-section > summary { font-weight: 700; cursor: pointer; }
.ung-url-preview { max-width: 100%; margin: 10px 0 0; padding: 12px; border-radius: 6px; background: #f8fafc; color: #334155; white-space: pre-wrap; overflow-wrap: anywhere; }
.ung-batch-section { margin-top: 22px; padding: 18px; border: 1px solid #dce3ec; border-radius: 9px; background: #fff; }
.ung-batch-section > .ung-help { margin: 12px 0; }
.ung-batch-section .ung-field { margin: 12px 0; }
.ung-batch-output { min-width: 0; margin-top: 16px; }
.ung-table-wrap { width: 100%; overflow-x: auto; }
.ung-batch-table { min-width: 560px; }
.ung-batch-table th { background: #f8fafc; }
.ung-batch-table .is-error { color: #8e2118; }
.ung-batch-table .is-duplicate { color: #8a4b08; font-weight: 600; }
.ung-reset-actions { justify-content: flex-end; margin-top: 16px; }
.ung-copy-fallback, .ung-download-link { position: fixed; left: -10000px; top: 0; }

@media (max-width: 650px) {
	.ung-section { grid-template-columns: 1fr; padding: 14px; }
	.ung-template-field { grid-column: auto; }
	.ung-values-table th { width: 30%; }
	.ung-value-cell { width: auto; }
	.ung-raw-cell { display: none; }
	.ung-actions { flex-direction: column; }
	.ung-button { width: 100%; }
	.ung-reset-actions { align-items: stretch; }
}
