#templateCategoryWarning {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(6, 44, 34, .24);
}

#templateCategoryWarning::backdrop {
  background: rgba(10, 29, 24, .53);
}

#templateCategoryWarning h2 {
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 20px;
  line-height: 1.3;
}

#templateCategoryWarning p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

#templateCategoryWarning .template-warning-signals {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

#templateCategoryWarning footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

#templateCategoryWarning button {
  min-height: 44px;
}

#templateCategoryWarning button.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}

#templateCategoryWarning button:focus-visible {
  outline: 2px solid var(--brand2);
  outline-offset: 3px;
}

html[data-theme="dark"] #templateCategoryWarning button[value="adjust"] {
  color: #063f36;
}

@media (max-width: 460px) {
  #templateCategoryWarning { padding: 18px; }
  #templateCategoryWarning footer button { flex: 1 0 100%; }
}
